I'm trying to implement the AAA Cooper Freight's SOAP API via PHP. When I send XML request to http://wsportal.aaacooper.com:8188/wsportal20/wsGenEst, it via Postman, works fine, but when using CURL, it doesn't return anything
I use the direct url(from the wsdl file), because their WSDL file seems to be broken and its not working with it: http://wsportal.aaacooper.com:8188/wsGenRateEstimate.wsdl
Here is screenshot from Postman(Working!)
and my php code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://wsportal.aaacooper.com:8188/wsportal20/wsGenEst" );
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt($ch, CURLOPT_POST, 1 );
curl_setopt($ch, CURLOPT_POSTFIELDS, $input_xml );
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml; charset=ISO-8859-1'));
$data = curl_exec($ch);
print_r($data);
curl_close($ch);
I'm using same XML string on both places.
charset=ISO-8859-1
. Server may or may not ignore that so it could be breaking the request. - LMC