Errors running wsdl2phpgenerator

306 views
Skip to first unread message

mja...@gmail.com

unread,
Mar 24, 2015, 10:40:05 AM3/24/15
to wsdl2php...@googlegroups.com
All,

The "wsdl2phpgenerator" is generating the following error using several different .wsdl file (i.e. amazon, proprietary, etc...). Any recommendations?


PHP Fatal error: SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in '/opt/wsdl2phpgenerator/amazon.wsdl' in /opt/wsdl2phpgenerator/src/Xml/WsdlDocument.php on line 45
PHP Fatal error: Uncaught exception 'SoapFault' with message 'SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in '/opt/wsdl2phpgenerator/amazon.wsdl'' in /opt/wsdl2phpgenerator/src/Xml/WsdlDocument.php:45
Stack trace:
#0 [internal function]: SoapClient->SoapClient('amazon.wsdl', Array)
#1 /opt/wsdl2phpgenerator/src/Xml/WsdlDocument.php(45): ReflectionClass->newInstance('amazon.wsdl', Array)
#2 /opt/wsdl2phpgenerator/src/Generator.php(104): Wsdl2PhpGenerator\Xml\WsdlDocument->__construct(Object(Wsdl2PhpGenerator\Config), 'amazon.wsdl')
#3 /opt/wsdl2phpgenerator/src/Generator.php(89): Wsdl2PhpGenerator\Generator->load('amazon.wsdl')
#4 /opt/wsdl2phpgenerator/gen.php(11): Wsdl2PhpGenerator\Generator->generate(Object(Wsdl2PhpGenerator\Config))
#5 {main}

Next exception 'Exception' with message 'Unable to load WSDL: SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in '/opt/wsdl2phpgenerator/amazon.wsdl'' in /opt/wsdl2phpgenerator/src/Xml/WsdlDocument.php:48
Stack trace:
#0 /opt/wsdl2phpgenerator/src/Generator.php(104): in /opt/wsdl2phpgenerator/src/Xml/WsdlDocument.php on line 48


Thanks in advance!!
MJ

Kasper Garnæs

unread,
Mar 27, 2015, 8:35:28 AM3/27/15
to wsdl2php...@googlegroups.com, mja...@gmail.com

On Tuesday, March 24, 2015 at 3:40:05 PM UTC+1, mja...@gmail.com wrote:
The "wsdl2phpgenerator" is generating the following error using several different .wsdl file (i.e. amazon, proprietary, etc...).  Any recommendations?


PHP Fatal error:  SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in '/opt/wsdl2phpgenerator/amazon.wsdl' in /opt/wsdl2phpgenerator/src/Xml/WsdlDocument.php on line 45
PHP Fatal error:  Uncaught exception 'SoapFault' with message 'SOAP-ERROR: Parsing WSDL: Couldn't find <definitions> in '/opt/wsdl2phpgenerator/amazon.wsdl'' in /opt/wsdl2phpgenerator/src/Xml/WsdlDocument.php:45

The problem you describe occurs when wsdl2phpgenerator tries to instantiate a PHP SoapClient object from the WSDL. This fails and thus causes the generation to fail. 

Have you tried creating a SoapClient object from the WSDL directly?

Can you provide a link to the public WSDLs that you have tried?

Since the generation process is tested across multiple versions of PHP through Travis my bet is that the problem is with the WSDL or your local setup.

lae...@googlemail.com

unread,
Sep 28, 2015, 3:42:47 AM9/28/15
to wsdl2phpgenerator, mja...@gmail.com
You should try to validate your WSDL with some external tool, You can also try to use a different generator like java wsgen to validate your WSDL can be parsed sucessfull.
Reply all
Reply to author
Forward
0 new messages