joseferrao / php-wsdl-creator

The original project from
https://code.google.com/archive/p/php-wsdl-creator/
GNU General Public License v3.0
0 stars 0 forks source link

Compatibility with Firefox SOA client plugin #12

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I wanted to test the php-wsdl-creator using a nifty Firefox SOA plugin (which 
you can find here: https://addons.mozilla.org/en-us/firefox/addon/soa-client/)

The above mentioned plugin uses the WSDL to auto discover the SOAP features and 
it can then generate a "form" with which to test your SOAP server.

However, I quickly ran into trouble as the plugin wouldn't create any of the 
input fields. It seems that it requires a strict compliance with the xmlns name 
for the XSD namespace. The php-wsdl-creator by default simply uses 's' where 
the standard seem to lean towards 'xsd'.

You will notice this when looking at fields such as:
<wsdl:part name="SomeField" type="s:string">

The Firefox plugin expects:
<wsdl:part name="SomeField" type="xsd:string">

It seems that the problem can be resolved adding the following configuration 
line just after calling PhpWsdl::CreateInstance():
PhpWsdl::$Config['xsd'] = 'xsd';

I am using version 2.3 of the PHP WSDL library and hope that this information 
might help someone.

Original issue reported on code.google.com by ta.maxi...@gmail.com on 28 Aug 2012 at 2:52

GoogleCodeExporter commented 8 years ago
Ok it seems that just having the s: namespace changed to xsd: is not enough as 
it doesn't change everywhere and that causes trouble with some stricter SOAP 
clients. Using s: as a namespace causes trouble in some clients, I think those 
clients may be ignoring the namespace declaration and simply looks for xsd: 
instead of s:. As a result I had to replace all instances of s: to xsd: in the 
code which is obviously not ideal.

I think the code should use the $Config['xsd'] setting everywhere. Currently 
most of the code is hard coded to use s: and a developer might need to be able 
to change that if required.

Original comment by ta.maxi...@gmail.com on 3 Sep 2012 at 10:52