Unable to get response of the status of Fedex tracking-id from their code
I am trying to get status of a fededx tracking-id from the code sample which I have got from Fedex developer section, but unable to get required info of status of tracking id. I need help on this as I
am novice to it. Please help how to get the response of status of tracking id of Fedex.
This file I'm executing => TrackWebServiceClient.php
When executing this file I'm getting an error, which I have mentioned
below:
---------------------------
PHP_Common initialized
Fault
Code:HTTP
String:Unable to parse URL
--------------------------
TrackWebServiceClient.php file code given below =>
<?php
// Copyright 2009, FedEx Corporation. All rights reserved.
// Version 6.0.0
require_once('fedex-common.php');
//The WSDL is not included with the sample code.
//Please include and reference in $path_to_wsdl variable.
$path_to_wsdl = "TrackService_v16.wsdl";
ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient($path_to_wsdl, array('trace' => 1)); // Refer
to http://us3.php.net/manual/en/ref.soap.php for more information
$request['WebAuthenticationDetail'] = array(
'ParentCredential' => array(
'Key' => getProperty('parentkey'),
'Password' => getProperty('parentpassword')
),
'UserCredential' => array(
'Key' => getProperty('key'),
'Password' => getProperty('password')
)
);
$request['ClientDetail'] = array(
'AccountNumber' => getProperty('shipaccount'),
'MeterNumber' => getProperty('meter')
);
$request['TransactionDetail'] = array('CustomerTransactionId' => '***
Track Request using PHP ***');
$request['Version'] = array(
'ServiceId' => 'trck',
'Major' => '16',
'Intermediate' => '0',
'Minor' => '0'
);
$request['SelectionDetails'] = array(
'PackageIdentifier' => array(
'Type' => 'TRACKING_NUMBER_OR_DOORTAG',
'Value' => '781193603730' //getProperty('trackingnumber') //
Replace 'XXX' with a valid tracking identifier
)
);
try {
if(setEndpoint('changeEndpoint')){
$newLocation = $client-
>__setLocation(setEndpoint('endpoint'));
}
$response = $client ->track($request);
if ($response -> HighestSeverity != 'FAILURE' && $response ->
HighestSeverity != 'ERROR'){
if($response->HighestSeverity != 'SUCCESS'){
echo '<table border="1">';
echo '<tr><th>Track Reply</th><th> </th></tr>';
trackDetails($response->Notifications, '');
echo '</table>';
}else{
if ($response->CompletedTrackDetails->HighestSeverity !=
'SUCCESS'){
echo '<table border="1">';
echo '<tr><th>Shipment Level Tracking Details</th>
<th> </th></tr>';
trackDetails($response->CompletedTrackDetails, '');
echo '</table>';
}else{
echo '<table border="1">';
echo '<tr><th>Package Level Tracking Details</th>
<th> </th></tr>';
trackDetails($response->CompletedTrackDetails-
>TrackDetails, '');
echo '</table>';
}
}
printSuccess($client, $response);
}else{
printError($client, $response);
}
writeToLog($client); // Write to log file
} catch (SoapFault $exception) {
printFault($exception, $client);
}
?>
tracking fedex
add a comment |
I am trying to get status of a fededx tracking-id from the code sample which I have got from Fedex developer section, but unable to get required info of status of tracking id. I need help on this as I
am novice to it. Please help how to get the response of status of tracking id of Fedex.
This file I'm executing => TrackWebServiceClient.php
When executing this file I'm getting an error, which I have mentioned
below:
---------------------------
PHP_Common initialized
Fault
Code:HTTP
String:Unable to parse URL
--------------------------
TrackWebServiceClient.php file code given below =>
<?php
// Copyright 2009, FedEx Corporation. All rights reserved.
// Version 6.0.0
require_once('fedex-common.php');
//The WSDL is not included with the sample code.
//Please include and reference in $path_to_wsdl variable.
$path_to_wsdl = "TrackService_v16.wsdl";
ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient($path_to_wsdl, array('trace' => 1)); // Refer
to http://us3.php.net/manual/en/ref.soap.php for more information
$request['WebAuthenticationDetail'] = array(
'ParentCredential' => array(
'Key' => getProperty('parentkey'),
'Password' => getProperty('parentpassword')
),
'UserCredential' => array(
'Key' => getProperty('key'),
'Password' => getProperty('password')
)
);
$request['ClientDetail'] = array(
'AccountNumber' => getProperty('shipaccount'),
'MeterNumber' => getProperty('meter')
);
$request['TransactionDetail'] = array('CustomerTransactionId' => '***
Track Request using PHP ***');
$request['Version'] = array(
'ServiceId' => 'trck',
'Major' => '16',
'Intermediate' => '0',
'Minor' => '0'
);
$request['SelectionDetails'] = array(
'PackageIdentifier' => array(
'Type' => 'TRACKING_NUMBER_OR_DOORTAG',
'Value' => '781193603730' //getProperty('trackingnumber') //
Replace 'XXX' with a valid tracking identifier
)
);
try {
if(setEndpoint('changeEndpoint')){
$newLocation = $client-
>__setLocation(setEndpoint('endpoint'));
}
$response = $client ->track($request);
if ($response -> HighestSeverity != 'FAILURE' && $response ->
HighestSeverity != 'ERROR'){
if($response->HighestSeverity != 'SUCCESS'){
echo '<table border="1">';
echo '<tr><th>Track Reply</th><th> </th></tr>';
trackDetails($response->Notifications, '');
echo '</table>';
}else{
if ($response->CompletedTrackDetails->HighestSeverity !=
'SUCCESS'){
echo '<table border="1">';
echo '<tr><th>Shipment Level Tracking Details</th>
<th> </th></tr>';
trackDetails($response->CompletedTrackDetails, '');
echo '</table>';
}else{
echo '<table border="1">';
echo '<tr><th>Package Level Tracking Details</th>
<th> </th></tr>';
trackDetails($response->CompletedTrackDetails-
>TrackDetails, '');
echo '</table>';
}
}
printSuccess($client, $response);
}else{
printError($client, $response);
}
writeToLog($client); // Write to log file
} catch (SoapFault $exception) {
printFault($exception, $client);
}
?>
tracking fedex
add a comment |
I am trying to get status of a fededx tracking-id from the code sample which I have got from Fedex developer section, but unable to get required info of status of tracking id. I need help on this as I
am novice to it. Please help how to get the response of status of tracking id of Fedex.
This file I'm executing => TrackWebServiceClient.php
When executing this file I'm getting an error, which I have mentioned
below:
---------------------------
PHP_Common initialized
Fault
Code:HTTP
String:Unable to parse URL
--------------------------
TrackWebServiceClient.php file code given below =>
<?php
// Copyright 2009, FedEx Corporation. All rights reserved.
// Version 6.0.0
require_once('fedex-common.php');
//The WSDL is not included with the sample code.
//Please include and reference in $path_to_wsdl variable.
$path_to_wsdl = "TrackService_v16.wsdl";
ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient($path_to_wsdl, array('trace' => 1)); // Refer
to http://us3.php.net/manual/en/ref.soap.php for more information
$request['WebAuthenticationDetail'] = array(
'ParentCredential' => array(
'Key' => getProperty('parentkey'),
'Password' => getProperty('parentpassword')
),
'UserCredential' => array(
'Key' => getProperty('key'),
'Password' => getProperty('password')
)
);
$request['ClientDetail'] = array(
'AccountNumber' => getProperty('shipaccount'),
'MeterNumber' => getProperty('meter')
);
$request['TransactionDetail'] = array('CustomerTransactionId' => '***
Track Request using PHP ***');
$request['Version'] = array(
'ServiceId' => 'trck',
'Major' => '16',
'Intermediate' => '0',
'Minor' => '0'
);
$request['SelectionDetails'] = array(
'PackageIdentifier' => array(
'Type' => 'TRACKING_NUMBER_OR_DOORTAG',
'Value' => '781193603730' //getProperty('trackingnumber') //
Replace 'XXX' with a valid tracking identifier
)
);
try {
if(setEndpoint('changeEndpoint')){
$newLocation = $client-
>__setLocation(setEndpoint('endpoint'));
}
$response = $client ->track($request);
if ($response -> HighestSeverity != 'FAILURE' && $response ->
HighestSeverity != 'ERROR'){
if($response->HighestSeverity != 'SUCCESS'){
echo '<table border="1">';
echo '<tr><th>Track Reply</th><th> </th></tr>';
trackDetails($response->Notifications, '');
echo '</table>';
}else{
if ($response->CompletedTrackDetails->HighestSeverity !=
'SUCCESS'){
echo '<table border="1">';
echo '<tr><th>Shipment Level Tracking Details</th>
<th> </th></tr>';
trackDetails($response->CompletedTrackDetails, '');
echo '</table>';
}else{
echo '<table border="1">';
echo '<tr><th>Package Level Tracking Details</th>
<th> </th></tr>';
trackDetails($response->CompletedTrackDetails-
>TrackDetails, '');
echo '</table>';
}
}
printSuccess($client, $response);
}else{
printError($client, $response);
}
writeToLog($client); // Write to log file
} catch (SoapFault $exception) {
printFault($exception, $client);
}
?>
tracking fedex
I am trying to get status of a fededx tracking-id from the code sample which I have got from Fedex developer section, but unable to get required info of status of tracking id. I need help on this as I
am novice to it. Please help how to get the response of status of tracking id of Fedex.
This file I'm executing => TrackWebServiceClient.php
When executing this file I'm getting an error, which I have mentioned
below:
---------------------------
PHP_Common initialized
Fault
Code:HTTP
String:Unable to parse URL
--------------------------
TrackWebServiceClient.php file code given below =>
<?php
// Copyright 2009, FedEx Corporation. All rights reserved.
// Version 6.0.0
require_once('fedex-common.php');
//The WSDL is not included with the sample code.
//Please include and reference in $path_to_wsdl variable.
$path_to_wsdl = "TrackService_v16.wsdl";
ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient($path_to_wsdl, array('trace' => 1)); // Refer
to http://us3.php.net/manual/en/ref.soap.php for more information
$request['WebAuthenticationDetail'] = array(
'ParentCredential' => array(
'Key' => getProperty('parentkey'),
'Password' => getProperty('parentpassword')
),
'UserCredential' => array(
'Key' => getProperty('key'),
'Password' => getProperty('password')
)
);
$request['ClientDetail'] = array(
'AccountNumber' => getProperty('shipaccount'),
'MeterNumber' => getProperty('meter')
);
$request['TransactionDetail'] = array('CustomerTransactionId' => '***
Track Request using PHP ***');
$request['Version'] = array(
'ServiceId' => 'trck',
'Major' => '16',
'Intermediate' => '0',
'Minor' => '0'
);
$request['SelectionDetails'] = array(
'PackageIdentifier' => array(
'Type' => 'TRACKING_NUMBER_OR_DOORTAG',
'Value' => '781193603730' //getProperty('trackingnumber') //
Replace 'XXX' with a valid tracking identifier
)
);
try {
if(setEndpoint('changeEndpoint')){
$newLocation = $client-
>__setLocation(setEndpoint('endpoint'));
}
$response = $client ->track($request);
if ($response -> HighestSeverity != 'FAILURE' && $response ->
HighestSeverity != 'ERROR'){
if($response->HighestSeverity != 'SUCCESS'){
echo '<table border="1">';
echo '<tr><th>Track Reply</th><th> </th></tr>';
trackDetails($response->Notifications, '');
echo '</table>';
}else{
if ($response->CompletedTrackDetails->HighestSeverity !=
'SUCCESS'){
echo '<table border="1">';
echo '<tr><th>Shipment Level Tracking Details</th>
<th> </th></tr>';
trackDetails($response->CompletedTrackDetails, '');
echo '</table>';
}else{
echo '<table border="1">';
echo '<tr><th>Package Level Tracking Details</th>
<th> </th></tr>';
trackDetails($response->CompletedTrackDetails-
>TrackDetails, '');
echo '</table>';
}
}
printSuccess($client, $response);
}else{
printError($client, $response);
}
writeToLog($client); // Write to log file
} catch (SoapFault $exception) {
printFault($exception, $client);
}
?>
tracking fedex
tracking fedex
edited Nov 21 '18 at 6:28


Zain Farooq
1,9752927
1,9752927
asked Nov 21 '18 at 6:17
Soumik ChakrabortySoumik Chakraborty
187
187
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
I found a solution to it. Its now working. I missed out defining endpoint in fedex-common.php file, after I provided correct end point to it, it worked fine.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53406253%2funable-to-get-response-of-the-status-of-fedex-tracking-id-from-their-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I found a solution to it. Its now working. I missed out defining endpoint in fedex-common.php file, after I provided correct end point to it, it worked fine.
add a comment |
I found a solution to it. Its now working. I missed out defining endpoint in fedex-common.php file, after I provided correct end point to it, it worked fine.
add a comment |
I found a solution to it. Its now working. I missed out defining endpoint in fedex-common.php file, after I provided correct end point to it, it worked fine.
I found a solution to it. Its now working. I missed out defining endpoint in fedex-common.php file, after I provided correct end point to it, it worked fine.
answered Nov 22 '18 at 12:05
Soumik ChakrabortySoumik Chakraborty
187
187
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53406253%2funable-to-get-response-of-the-status-of-fedex-tracking-id-from-their-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown