SECURITY_VIOLATION in new version
Closed this issue · 10 comments
Hello,
does anybody already use this latest version with DHL-Geschäftskundenportal?
In production mode (not using the sandbox) I always get the following error message from DHL:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>SECURITY_VIOLATION</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
The funny thing is, that the request is perfectly working in the sandbox environment.
I would appreciate if anybody already had this problem and knows what was missing.
Cheers,
Hannes
PS: Yes, I have a valid AppID with the necessary approved action items.
You'll want to contact DHL about this. I've not seen it before.
I already did. But till now, I didn't get any helpful responses.
Do you already use this latest version with the new endpoints?
Which new endpoints are you referring to?
To the new one: https://cig.dhl.de/services/production/soap
I figured out what the problem was. The namespace for the envelope was wrong. I used SOAP 1.2 with the Envelope namespace for SOAP 1.1. (or other way arround? doesn't matter anymore)
Hi vinett-de.
Could you please provide more information on how you solved the problem?
I am using Soap::Lite (v1.1) and getting the same error. My Envelope exactly looks like on the developer pages but my code is only working in sandbox mode.
Thanks,
Chris
Hi vinett-de.
I also have the same issue and i am not able to find the solution. Could you please explain how you did it.
Hello.
I have like same eroor "SECURITY_VIOLATION". I have sent several queries to DHL support - and in last i got reason - this error can be in name of action - example for live mode SOAPAction: "urn:getVersion" but for test SOAPAction: "getVersion". so in php SOAP class function just set :
example for createShipmentOrder:
$location = "https://cig.dhl.de/services/production/soap";
$options = array(
'login' => $user, //ApplikationsID
'password' => $password, //Applikationstoken
'soap_version' => SOAP_1_1,
'exceptions' =>false,
'trace' => 1,
);
$client = new SoapClient($wsdl,$options);
$answer = $client->__doRequest($request,$location, 'urn:createShipmentOrder',1);
This error can also occur, if you do not have set the correct permissions for your application inside your dhl developer account. Each method you want to call needs to be activated there.
This error can also occur, if you do not have set the correct permissions for your application inside your dhl developer account. Each method you want to call needs to be activated there.
how to activated?the status of the application is Approval granted.
To fix SECURITY_VIOLATION, the following notice on this page helped me:
Zusätzlich ist für die Geschäftskundenversand-API folgendes zu beachten:
In der Produktivumgebung ist im Header zusätzlich zwingend die SOAPAction der jeweiligen Operation mit anzugeben, bspw. "SOAPAction: "urn:createShipmentOrder"
After setting this header, the error was gone.