0

This is my soap code

try{ 
    $client = new 
        SoapClient( 
            "https://www.tntexpress.com.au/webservices/booking.svc?Wsdl" ,
            array('username' => "xxx",'password' => "yyy")
        ); $params = array(
      "SenderAccount" => 30017823,
      "SenderDetails" => "ROSEHILL 2142 NSW EAST",
      "CollectionDetails" => "ROSEHILL 2142 NSW EAST",
      "ReceiverDetails" => "MELBOURNE 3002 VIC",
      "ItemCount" => 1,
      "TotalWeight" => 10,
      "MaxLength" => 10,
      "MaxWidth" => 10,
      "MaxHeight" => 10,
      "PackagingCode" => '',
      "CollectionDateTime" => '',
      "CollectionCloseTime" => '',
      "ServiceCode" => '',
      "IsDangerousGoods" => '',
      "Payer" => 'S',
      "ReceiverAccount" => '',
      "Specialinstructions" => '',
      "CustomerReference" => '',
      "DangerousGoodsUN" => '',
      "DangerousGoodsPackingGroup" => '',
      "ConsignmentNoteNumber" => ''
    );
    $response = $client->__soapCall("SubmitBookingRequest", array($params));
print_r($response);
} catch (Exception $e) { 
    print  'Caught exception: '.  $e->getMessage(). "\n"; 
    file_get_contents("https://www.tntexpress.com.au/webservices/booking.svc?Wsdl");
}

error...
Caught exception: Could not connect to host

Edited by happygeek: edited login details!

2
Contributors
2
Replies
19
Views
1 Year
Discussion Span
Last Post by Sohil_2
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.