An example of the request
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ws.interfaces.sessions.APILink.amdocs" xmlns:ns2="http://datainfo.APILink.amdocs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns3="http://io.datainfo.APILink.amdocs" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns4="http://awsi.amdocs.com" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:createBan><in0 xsi:type="ns3:InCreateBanInfo"><mAccountTypeInfo xsi:type="ns3:AccountTypeInfo"><mAccountType xsi:type="xsd:string">I</mAccountType>
......
</in0></ns1:createBan></SOAP-ENV:Body></SOAP-ENV:Envelope>
Code: Select all
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://SERVICE_HERE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
curl_setopt($ch, CURLOPT_POSTFIELDS, file_get_contents('data.xml'));
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close'));
$start = array_sum(explode(' ', microtime()));
$buffer = curl_exec($ch);
The result I am getting
Code: Select all
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client.NoSOAPAction</faultcode> <faultstring>no SOAPAction header!</faultstring> <detail> <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">petapps</ns2:hostname> </detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>Total time for request: 1.0137739181519 HTTP ERROR -> 500