Edit report at https://bugs.php.net/bug.php?id=48283&edit=1
ID: 48283 Comment by: reto at casserini dot com Reported by: vanya at myfastmail dot com Summary: Invalid and wrong SOAP request using WSDL Status: Not a bug Type: Bug Package: SOAP related Operating System: Kubuntu 9.04 PHP Version: 5.2.9 Block user comment: N Private report: N New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2009-05-22 08:16:12] vanya at myfastmail dot com Bogus report, sorry. ------------------------------------------------------------------------ [2009-05-14 15:48:39] vanya at myfastmail dot com Ok, sorry guys, this was my fault. Service should be called like this: $param = new stdClass(); $param->lebenslageKey = $pkey; $param->kategorieIds = $kategorieIds; $param->mandantenIds = $mandantenIds; $param->operatorAnd = false; $param->profilData = $profilData; $treeInfo = $lebenslage->__soapCall('getLebenslageTree', array($param)); and not the way I used it. But still output is strange. You can just close this bug.. ------------------------------------------------------------------------ [2009-05-14 15:09:43] vanya at myfastmail dot com Description: ------------ PHP SOAP extension produces invalid and incorrect SOAP request, see actual result. __soapCall was tried, direct ->functionName(attributes) approach tried as well. Reproduce code: --------------- http://pastebin.com/d4a1551db Expected result: ---------------- No Exception thrown, SOAP request should be something like this: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://www.tsystems.com/zfinder/1.0"> <soapenv:Header/> <soapenv:Body> <ns:getLebenslageTree> <lebenslageKey> <id>93256</id> <mandantenId>0</mandantenId> </lebenslageKey> <kategorieIds>783160</kategorieIds> <kategorieIds>783161</kategorieIds> <mandantenIds>0</mandantenIds> <profilData> <ags>0</ags> <plz>0</plz> <sprache>deu</sprache> </profilData> </ns:getLebenslageTree> </soapenv:Body> </soapenv:Envelope> Actual result: -------------- Exception from server because of wrong request, SOAP request is the following: <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://www.tsystems.com/zfinder/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <SOAP-ENV:Body> <ns1:getLebenslageTree xsi:type="ns1:PrimaryKeyWs"> <id>93256</id> <mandantenId>0</mandantenId> </ns1:getLebenslageTree> <param1> <xsd:int>783160</xsd:int> <xsd:int>783161</xsd:int> </param1> <param2> <xsd:int>0</xsd:int> </param2> <param3>false</param3> <param4 xsi:type="ns1:ProfilDataWs"> <ags>0</ags> <plz>0</plz> <sprache>deu</sprache> <regionIds xsi:nil="true" /> <mandantenIds xsi:nil="true" /> <kategorien xsi:nil="true" /> <kategorienUndVerknuepfung /> </param4> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Which is TOTALLY wrong... :( ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=48283&edit=1