Question : PHP Soap Parameter issue

I am attempting to connect to a SOAP service and am unsuccessful in retrieving the data. I get the structure but no data. The person at the provider has sent me the corrections to my request however, I am not sure how to change my request to accomplish this. Below is my code and the request I am sending and the corrected request they are suggesting. Can anyone help with how to modify?

Thanks!

CODE:

$URL = 'http://addressof?wsdl';

$client = new SoapClient(null, array(
    "location" => $URL,
        "uri"      => "http://givenbyprovider",
        "style"    => SOAP_RPC,
        "use"      => SOAP_ENCODED
    ));

$return = $client->__soapCall("getEsnInfo",
   array('esn' => '12345678')
);


MYREQUEST:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://xxxx"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getEsnInfo>
<param0 xsi:type="xsd:string">12345678</param0>
</ns1:getEsnInfo></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

SUGGESTED REQUEST:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://xxxx"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:getEsnInfo>
<param0 > <esn xsi:type="xsd:string">12345678</esn></param0>
</ns1:getEsnInfo></SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Answer : PHP Soap Parameter issue

From what I see, you can NOT format it any other way than the way you have it.  It is not your choice.  It is the defined by PHP.  One way to check things out it to setup a test server and see.  You will need to find out the specific version of the SOAP software they are running.  "Pure soap" I believe just means they installed whatever SOAP software and didn't change the configuration.  They still have to install a soap framework such as Apache CXF.
Random Solutions  
 
programming4us programming4us