Edit report at https://bugs.php.net/bug.php?id=49155&edit=1
ID: 49155
Comment by: jeroen at asystance dot nl
Reported by: jeroen at asystance dot nl
Summary: SoapServer passes parameters as null if one has
special wsdl definition
Status: Feedback
Type: Bug
Package: SOAP related
Operating System: linux
PHP Version: 5.3.3
Block user comment: N
Private report: N
New Comment:
Still not fixed in PHP 5.4.19-dev
Previous Comments:
------------------------------------------------------------------------
[2013-08-02 04:26:54] [email protected]
Please try using this snapshot:
http://snaps.php.net/php5.4-latest.tar.gz
For Windows:
http://windows.php.net/snapshots/
I see several fixes in soap module. Could you try 5.4?
------------------------------------------------------------------------
[2012-04-26 08:30:22] nicolodien at gmx dot de
Hi everybody
I just want to confirm that this is still an issue! I've spent more than 3
hours debugging until I finally found this bug description giving me a
solution.
Please DO fix this problem...
Thanks
------------------------------------------------------------------------
[2011-02-11 12:25:22] jeroen at asystance dot nl
Just wanted to verify that this bug is still present in 5.3.3
------------------------------------------------------------------------
[2009-08-05 12:22:29] jeroen at asystance dot nl
Sorry for posting yet another comment, but it gets even weirder:
<wsdl:message name="someRequest">
<wsdl:part name="customerId" element="tns:customerId"></wsdl:part>
<wsdl:part name="customerDetails" element="tns:customer"></wsdl:part>
</wsdl:message>
This will not work, because in the first part, the name==element
However,
<wsdl:message name="someRequest">
<wsdl:part name="customerId" element="tns:customerId"></wsdl:part>
<wsdl:part name="customer" element="tns:customer"></wsdl:part>
</wsdl:message>
_will_ work! Notice that now both parts are specified with name==element!
My conclusion so far is that either _all_ of the parts need to be specified
with the name==element pattern, or _none_. If one of the parts uses the
pattern, the rest needs to conform, or else the SoapServer passes them as null.
I sure hope this helps! I've been struggling with this for a while now.
------------------------------------------------------------------------
[2009-08-05 11:53:25] jeroen at asystance dot nl
I have been able to further pin down the bug. The 2nd parameter is passed as
null if, in the <wsdl:message> definition, the 1st <wsdl:part> element's name
attribute is the same as the element attribute!
<wsdl:message name="someRequest">
<wsdl:part name="customerId" element="tns:customerId"></wsdl:part>
<wsdl:part name="fail" element="tns:customerId"></wsdl:part>
</wsdl:message>
Here the 1st parameter works, but the second is always null!
<wsdl:message name="someRequest">
<wsdl:part name="cid" element="tns:customerId"></wsdl:part>
<wsdl:part name="win" element="tns:customerId"></wsdl:part>
</wsdl:message>
Now both parameters work.
More generally, if one <wsdl:part> is specified in this way (name and element
are the same), _every other parameter_ is passed as null:
<wsdl:message name="someRequest">
<wsdl:part name="p1" element="tns:customerId"></wsdl:part>
<wsdl:part name="customerId" element="tns:customerId"></wsdl:part>
<wsdl:part name="p3" element="tns:customerId"></wsdl:part>
</wsdl:message>
Here, p1 and p2 will be null, and customerId will work.
Happy bugfixing! :)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=49155
--
Edit this bug report at https://bugs.php.net/bug.php?id=49155&edit=1