|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-08-05 11:11 UTC] jeroen at asystance dot nl
Description: ------------ When two <wsdl:operation>s have the same API (that is, have the same <wsdl:message>s), the SoapServer calls the function corresponding to the _first_ <wsdl:operation> specified in the <wsdl:binding>, even although the SoapClient sends the correct "SOAP action" header, which is correctly received on the server. Reproduce code: --------------- Download http://jayvee.nl/soaptest2.tar, untar and change the URL in interface.wsdl call SAOPTest.php, which is both a client and server. The server will produce a log that the client outputs, so you can see what the server is doing. Expected result: ---------------- Independent of the order in which the <wsdl:operation>s are listed in the <wsdl:binding> element, the SoapServer should call the function corresponding to the "SOAP action" header specified in the request. Actual result: -------------- The SoapServer always calls the function corresponding to the _first_ <wsdl:operation> specified. In the test case, the server will call "function operation1()" twice, even though the second call is to operation2, and the "SOAP action" header's value is "operation2" To verify, switch the <wsdl:operation> elements in the <wsdl:binding> element and run SOAPTest.php. You will see that the server will call "function operation2()" twice, even though the "SOAP action" headers are different. PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 21:00:02 2025 UTC |
Another workaround. Instead of <message name="getCourses"> <part name="parameters" type="xsd:int"/> </message> <message name="getUsers"> <part name="parameters" type="xsd:int"/> </message> which always leads to a call of the first operation "getCourses", I define two new types: <xsd:element name="getCoursesInput" type="xsd:int"/> <xsd:element name="getUsersInput" type="xsd:int"/> and use them for the messages: <message name="getCourses"> <part name="parameters" element="tns:getCoursesInput"/> </message> <message name="getUsers"> <part name="parameters" element="tns:getUsersInput"/> </message> works fine for me.