|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-06 20:19 UTC] mail at martin-probst dot com
[2006-11-07 14:06 UTC] mail at martin-probst dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 01:00:01 2025 UTC |
Description: ------------ I'm trying to access a web service using a .wsdl file, literal style. The wsdl defines two schemata with different namespaces where the first one refers to the latter. The message parameter in the SOAP envelope gets the wrong namespace. Reproduce code: --------------- The wsdl contains two schemata: <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xmlns:xi0="http://targetNS" xmlns:xi1="http://otherNS" targetNamespace="http://targetNS"> <xsd:import namespace="http://otherNS"/> <xsd:element name="EmployeeBasicDataByEmployeeQuery" type="xi1:EmployeeBasicDataByEmployeeQueryMessage"/> ... </xsd:schema> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl" xmlns:xi0="http://targetNS" xmlns:xi1="http://otherNS" xmlns="http://otherNS" targetNamespace="http://otherNS"> <xsd:complexType name="EmployeeBasicDataByEmployeeQueryMessage"> <xsd:sequence> <xsd:element name="EmployeeBasicDataSelectionByEmployee"> ... </xsd:schema> The calling PHP code: $res = $soap->EmployeeBasicDataByEmployeeQueryResponse_In( array("EmployeeBasicDataSelectionByEmployee" => array("EmployeeID" => 10)))); echo $soap->__getLastRequest() . "\n"; I also tried classmaps and various array combinations. If you add another array level (EmployeeBasicDataByEmployeeQuery) the above gives an error (object hasn't 'EmployeeBasicDataSelectionByEmployee' property). Expected result: ---------------- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/ soap/envelope/" xmlns:ns1="http://targetNS" xmlns:ns2="http://otherNS"> <SOAP-ENV:Body> <ns1:EmployeeBasicDataByEmployeeQuery> <ns2:EmployeeBasicDataSelectionByEmployee> <ns2:EmployeeID>10</ns2:EmployeeID> </ns2:EmployeeBasicDataSelectionByEmployee> </ns1:EmployeeBasicDataByEmployeeQuery> </SOAP-ENV:Body> </SOAP-ENV:Envelope> Actual result: -------------- <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/ soap/envelope/" xmlns:ns1="http://my/namespace/somewhere"> <SOAP-ENV:Body> <ns1:EmployeeBasicDataByEmployeeQuery> <EmployeeBasicDataSelectionByEmployee> <EmployeeID>10</EmployeeID> </EmployeeBasicDataSelectionByEmployee> </ns1:EmployeeBasicDataByEmployeeQuery> </SOAP-ENV:Body> </SOAP-ENV:Envelope>