Forum Moderators: coopster
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<MethodName xmlns="http://www.example.com/">
<ClassName>
<MemberOne>string</MemberOne>
<MemberTwo>string</MemberTwo>
</ClassName>
</MethodName>
</soap:Body>
</soap:Envelope>
As seen above, the method expects an object type as parameter. The web service does not provide any means of fetching the class definition for this, so I tried the following:
$scli = new SoapClient('http://www.example.com/?WSDL', array('trace'=>1));
$scli->__soapCall('MethodName', array('ClassName' => array('MemberOne' => 'Somevalue', 'MemberTwo' => 'SomeOtherValue')));
This does not work, so I examine the request sent by PHP. For some reason, all that is sent is this:
<SOAP-ENV:Envelope>
<SOAP-ENV:Body>
<ns1:MethodName/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Can anyone give me a hint on what I'm not doing right? I don't understand why the parameters aren't in my request? Or is this a problem with SoapClient->__getLastResponse()?