WsdlToPhp / PackageGenerator

Generates a PHP SDK based on a WSDL, simple and powerful, WSDL to PHP
https://providr.io
MIT License
425 stars 73 forks source link

Include all files from classMap manually #295

Open cherrycoding opened 1 year ago

cherrycoding commented 1 year ago

Hi, when I run the tutorial.php I am getting an error: Fatal error: Uncaught Error: Class 'ServiceType\Create' not found ClassMap is included do I have to include all ServiceTypes, StructTypes and Enum manually? Because I got more than 500 files from the generator (it's a large wsdl) Or is there any full tutorial about how to work with the StructTypes? Thanks

mikaelcom commented 1 year ago

The tutorial.php file contains a line, require_once __DIR__ . '/vendor/autoload.php'; loading the composer autoloader class which takes care of loading any used class imported or used with its FQCN such as in https://github.com/WsdlToPhp/PackageEws365/blob/develop/tutorial.php.

cherrycoding commented 1 year ago

Thanks for your reply, I have this line in my file for the autoloader like generated from your class but I am still getting the error: Fatal error: Uncaught Error: Class 'ClassMap' not found

mikaelcom commented 1 year ago

Are you under Windows or a Unix system? Do you have a vendor dir with composer subdir and autoload files?

cherrycoding commented 1 year ago

I am running it on my managed server (ubuntu) and yes I have vendor directory with sub dirs like (bin, composer, wsdl2php, autoload.php).

mikaelcom commented 1 year ago

Did you succeed to make it work? I sincerely don't know why you can't make it work otherwise, you have to debug it on your side. Feel free to inform me about your discovery