5

The Aramex Rate calculator API is returning the error code ISE01 and and the following error message:

Internal Server Error has occurred while getting calculating rate` while requesting

What it the reason for this error?

The following is the sample code for the Aramex rate calculator API:

<?php
$params = array(
    'ClientInfo'            => array(
                                'AccountCountryCode'    => 'JO',
                                'AccountEntity'         => 'AMM',
                                'AccountNumber'         => '00000',
                                'AccountPin'            => '000000',
                                'UserName'              => 'user@company.com',
                                'Password'              => '000000000',
                                'Version'               => 'v1.0'
                            ),

    'Transaction'           => array(
                                'Reference1'            => '001' 
                            ),

    'OriginAddress'         => array(
                                'City'                  => 'Amman',
                                'CountryCode'               => 'JO'
                            ),

    'DestinationAddress'    => array(
                                'City'                  => 'Dubai',
                                'CountryCode'           => 'AE'
                            ),
    'ShipmentDetails'       => array(
                                'PaymentType'            => 'P',
                                'ProductGroup'           => 'EXP',
                                'ProductType'            => 'PPX',
                                'ActualWeight'           => array('Value' => 5, 'Unit' => 'KG'),
                                'ChargeableWeight'       => array('Value' => 5, 'Unit' => 'KG'),
                                'NumberOfPieces'         => 5
                            )
);

$soapClient = new SoapClient('http://url/to/wsdl.wsdl', array('trace' => 1));
$results = $soapClient->CalculateRate($params); 

echo '<pre>';
print_r($results);
die();
?>
Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63
Jethik
  • 1,860
  • 1
  • 22
  • 26
  • 1
    An Internal Server Error indicates an unhandled exception or bug in the service provider's code. You need to contact the service provider; there's nothing anyone on SO is going to be able to do to help you. – BadZen Jan 07 '15 at 15:24
  • Visit https://askleo.com/whats_an_internal_server_error_and_how_do_i_fix_it/ and according to that there is an issue on server, and I have tried using sample code ans wsdl file but since I don't have username, pswd and account info, it is giving me Validation error. – Gaurav Dave Jan 08 '15 at 07:45
  • "ISE01" does not appear to be a [valid error code](http://navigator.aramex.com/LinkClick.aspx?fileticket=sIThrEKQOA4%3D&tabid=172). – Scott Solmer Jan 08 '15 at 17:21
  • and what is http://url/to/wsdl.wsdl ? hard to tell whats wrong when not having WSDL file... Internal Server Error may not be server side, I mean error itself is, but It may appear instead of `400 Bad Request` in some cases... – Flash Thunder Jan 08 '15 at 17:45
  • ...or `502 Bad Gateway` if it is cloud system... or even `403 Forbbidden` or `404 Not Found` ... in fact there are alot of servers that do return `503` instead of `404`, when they use rewritting... and it may be on purpose. – Flash Thunder Jan 08 '15 at 17:54

1 Answers1

1

Just download WSDL FILE, put it somewhere on your server, and change this line to correct one (fix the url!):

$soapClient = new SoapClient('http://url/to/wsdl.wsdl', array('trace' => 1));

-

Your SOAP Client simply doesn't really recognize CalculateRate command without directions...

PS. Worked for me, just tried.

Flash Thunder
  • 11,672
  • 8
  • 47
  • 91
  • Hi. Can you share your response? The URL isn't the issue(atleast in my case) as I was changing it. Also if the correct URL/path for the WSDL wasn't being entered, the server wouldn't have responded with an internal server error. The server does respond with validations such as incorrect credentials etc. However with a proper request, it returns an internal error. – sohaibbbhatti Jan 12 '15 at 09:27
  • This is the correct answer, can you accept it? You must replace `http://url/to/wsdl.wsdl` with an URL that points to the WDSL file hosted on your server. Aramex should provide you with the WDSL file. – Rolf Oct 06 '17 at 13:17