Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage oh php2wsdl #17

Open
fregian opened this issue Mar 9, 2017 · 2 comments
Open

Usage oh php2wsdl #17

fregian opened this issue Mar 9, 2017 · 2 comments

Comments

@fregian
Copy link

fregian commented Mar 9, 2017

I not use one php framework and have never used composer to install php packeges.
Now on my linux box i have installed composer and i go to my project dir and exec

$ composer require php2wsdl/php2wsdl

this create one dir structure:
./vendor
--- composer

       ----- php2wsdl

       ------ wingu

autolad.php

In the file mysoapclass.php i insert

require DIR . '/vendor/autoload.php';

and at end of this file i insert:

line 261-268

$class = 'ibr';

$serviceURI = "http://127.0.0.1/soap/finale";
$wsdlGenerator = new PHPClass2WSDL($class, $serviceURI);
// Generate thw WSDL from the class adding only the public methods that have @soap annotation.
$wsdlGenerator->generateWSDL(true);
$wsdlXML = $wsdlGenerator->dump();

file_put_contents ( 'finale.wsdl', $wsdXML );

running 'php mysoapclass.php' i get

PHP Fatal error: Uncaught Error: Class 'PHPClass2WSDL' not found in /var/www/html/soap/finale/mysoapclass.php:263

I have try some require/include modification without success.

Thank's for your reply

Gian Luca

@bmichaux
Copy link

bmichaux commented Mar 16, 2017

I had the same problem.
Try with:
"
$wsdlGenerator = new PHP2WSDL\PHPClass2WSDL($class, $serviceURI);
"

@dragosprotung
Copy link
Owner

Make sure you import the class before

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants