I am executing the following php code while trying to get request from a SOAP API server
try {
$soap = new SoapClient($wsdl, $options);
$data = $soap->GetXYZ($params);
}
catch(Exception $e) {
$Lastresponse = $soap->__getLastResponse();
}
All I got was "looks like we got no XML document" response code.
But when I looked at the $Lastresponse variable in the catch block, I found it as below:
------=_Part_1134075_393252946.1482317378966 Content-Type: application/xop+xml; charset=utf-8; type="text/xml" <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> ......all valid data ... </SOAP-ENV:Body> </SOAP-ENV:Envelope> ------=_Part_1134075_393252946.1482317378966--
Note: the $options parameters I am using is:
$options = array(
'uri'=>'http://schemas.xmlsoap.org/soap/envelope/',
//'style'=>SOAP_RPC,
//'use'=>SOAP_ENCODED,
'soap_version'=>SOAP_1_1,
'cache_wsdl'=>WSDL_CACHE_NONE,
'connection_timeout'=>15,
'trace'=>true,
'encoding'=>'UTF-8',
'exceptions'=>true
);
Although I did a workaround to parse the xml, does anyone has any idea about those extra -----Part bits? Is there something I am doing wrong?