PHP | SOAP 1.2 | HTTP Soap Action

1k views Asked by At

The WSDL can be found HERE.

SOAP call

$wsdl = 'https://api.krollcorp.com/EBusinessTest/Kroll.Dealer.EBusiness.svc/Docs?singleWsdl';

try {
    $client = new SoapClient($wsdl, array('soap_version' => SOAP_1_2, 'trace' => 1));
    $result = $client->SubmitPurchaseOrder();
} catch (SoapFault $e) {
    printf("ERROR: %s\n\n", $e->getMessage());
}
print_r($result);

$lastHeaders = $client->__getLastRequestHeaders();
print_r($lastHeaders);
printf("END\n");

Output

ERROR: The SOAP action specified on the message, '', does not match the HTTP SOAP Action, 'http://tempuri.org/IEBusinessService/SubmitPurchaseOrder'.

POST /EBusinessTest/Kroll.Dealer.EBusiness.svc HTTP/1.1
Host: api.krollcorp.com
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.6.19
Content-Type: application/soap+xml; charset=utf-8; action="http://tempuri.org/IEBusinessService/SubmitPurchaseOrder"
Content-Length: 200

END

Related Questions

  1. PHP SoapClient: Action mismatch
  2. PHP Fatal error: "The SOAP action specified on the message, '', does not match the HTTP SOAP Action"

Most "solutions" I have found indicate that I need to set the action in Content-Type Header. I am not sure how to do this, however I also do not believe that this approach would work. Because! If you look ... the Content-Type Header is already the same as it is in the WSDL ..

SOAPUI

I have used SOAPUI. My understanding of it is limited. All the methods seem to "pass" with WSHTTPBinding.

I am wondering what I am missing in order to not throw these errors?

0

There are 0 answers