Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Getting Tracking info from FedEx with CFINVOKE and WSDL

177 views
Skip to first unread message

PulizziGuy

unread,
Aug 31, 2007, 7:00:48 PM8/31/07
to
Hello all, any help on this problem would be greatly appreciated! I'm trying to
submit a query to FedEx to get a tracking number using CFINVOKE and the WSDL
file from FedEx but to no avail. The FedEx WSDL has several optional values
that I have tried to ommit using the OMMIT="true" option with the
CFINVOKEARGUMENT tag. No Matter what I do I still get the following error:

=== THE ERROR ===
Web service operation "Track" with parameters
{parameters here...}
could not be found.

Here is a link to the WSDL file - Can anybody give me any suggestions??
http://pulizzi.azon1.com/Fedex/TrackService.wsdl

=== My Code ===
<CFINVOKE WEBSERVICE="http://pulizzi.azon1.com/FedEx/TrackService.wsdl"
returnVariable ="T2" Method="Track">
<cfinvokeargument name="UserCredential" Value="OSTgJ9WpY9KxYyjl">
<cfinvokeargument name="AccountNumber" Value="510087240">
<cfinvokeargument name="MeterNumber" Value="1194638">
<cfinvokeargument name="Value" Value="698970753640">
<cfinvokeargument name="Type" Value="TRACKING_NUMBER_OR_DOORTAG">
</CFINVOKE>
<CFDUMP VAR="#T2#">


GArlington

unread,
Sep 3, 2007, 8:29:29 AM9/3/07
to
On 1 Sep, 00:00, "PulizziGuy" <webforumsu...@macromedia.com> wrote:
> Hello all, any help on this problem would be greatly appreciated! I'm trying to
> submit a query to FedEx to get a tracking number using CFINVOKE and the WSDL
> file from FedEx but to no avail. The FedEx WSDL has several optional values
> that I have tried to ommit using the OMMIT="true" option with the
> CFINVOKEARGUMENT tag. No Matter what I do I still get the following error:
>
> === THE ERROR ===
> Web service operation "Track" with parameters
> {parameters here...}
> could not be found.
>
> Here is a link to the WSDL file - Can anybody give me any suggestions??http://pulizzi.azon1.com/Fedex/TrackService.wsdl

>
> === My Code ===
> <CFINVOKE WEBSERVICE="http://pulizzi.azon1.com/FedEx/TrackService.wsdl"
> returnVariable ="T2" Method="Track">
> <cfinvokeargument name="UserCredential" Value="OSTgJ9WpY9KxYyjl">
> <cfinvokeargument name="AccountNumber" Value="510087240">
> <cfinvokeargument name="MeterNumber" Value="1194638">
> <cfinvokeargument name="Value" Value="698970753640">
> <cfinvokeargument name="Type" Value="TRACKING_NUMBER_OR_DOORTAG">
> </CFINVOKE>
> <CFDUMP VAR="#T2#">

Who is writing the web service?
<operation name="track" parameterOrder="parameters"> from wsdl does
not look right to me...

Shanet

unread,
Sep 5, 2007, 2:51:27 PM9/5/07
to
I did come across the same thing but did find a way around it..

You have to submit the information as a structure (i think) at least you get
around this problem... Try the following code instead..


<cfset MyStruct= structNew()>
<cfset TrackRequest.AuthenticationDetail.UserCredential="OSTgJ9WpY9KxYyjl">
<cfset Trackrequest.ClientDetail.AccountNumber="510087240">
<cfset Trackrequest.ClientDetail.MeterNumber="1194638">
<cfset Trackrequest.PackageIdentifier.Value="698970753640">
<cfset Trackrequest.PackageIdentifier.Type="TRACKING_NUMBER_OR_DOORTAG">


<CFINVOKE WEBSERVICE="http://pulizzi.azon1.com/FedEx/TrackService.wsdl"
returnVariable ="T2" Method="Track">

<cfinvokeargument name="Trackrequest" value="#MyStruct#">
</CFINVOKE>

This will get you past the error that you are experiencing but will present
you with another which is "Non nillable element 'authenticationDetail' is
null." At least the service is recognized but there seems to be some problem
with referencing the specific arguments..

I am glad to know that someone else is trying this same thing.. Please let
know what else you come across on this perhaps together we can solve this
maddening issue..

Shane


teknomusik

unread,
Sep 7, 2007, 11:39:22 AM9/7/07
to
Try this:


<cfset TrackRequest = StructNew()>
<cfset TrackRequest.AuthenticationDetail.UserCredential="OSTgJ9WpY9KxYyjl">
<cfset TrackRequest.ClientDetail.AccountNumber="510087240">
<cfset TrackRequest.ClientDetail.MeterNumber="1194638">
<cfset TrackRequest.PackageIdentifier.Value="698970753640">
<cfset TrackRequest.PackageIdentifier.Type="TRACKING_NUMBER_OR_DOORTAG">

<cfdump var="#TrackRequest#">

<cfinvoke webservice="http://pulizzi.azon1.com/FedEx/TrackService.wsdl"

returnVariable ="T2" Method="Track">

<cfinvokeargument name="Trackrequest" value="#TrackRequest#">
</cfinvoke>

<cfdump var="#T2#">

PulizziGuy

unread,
Sep 7, 2007, 1:16:26 PM9/7/07
to
teknomusik - That code looks very promising! I tried it however it seems that
Coldfusion is hanging at CFINVOKE. It's not returning an error but the page
evently after about 2 min just times out. If I remove CFINVOKE I can see the
stucture is setup properly.... Any ideas?

Shanet

unread,
Sep 7, 2007, 1:42:15 PM9/7/07
to
Well I'll be darned.... This did it... Thank you so much I have been pulling
my hair out on this.. As far as outputting the results in the
T2.getTrackDetails all I see is the following
"[Lcom.fedex.ws.track.TrackDetail;@1b8c0cf " My assumption is that this is a
structure of some kind and has to be pulled apart? In VB and C# the
TrackingNumber and StatusDescription values are within the Trackdetails..

How should I go about referencing these?

Shanet

unread,
Sep 7, 2007, 1:43:53 PM9/7/07
to
Pulizziguy,
The code does work... It does take a while to come up initially. How long of a timeout do you have?

PulizziGuy

unread,
Sep 7, 2007, 2:27:46 PM9/7/07
to
Gosh it must be about 3 min... you can check it out yourself at
http://pulizzi.azon1.com/Fedex/FTest2.html. The code in the page is as follows:

<HTML><HEAD><TITLE>Test2</TITLE></HEAD><BODY>

<cfdump var="#TrackRequest#">

<cfdump var="#T2#">

</BODY></HTML>

It does adventually dump TrackRequest but nothing after it.

Shanet

unread,
Sep 7, 2007, 2:38:59 PM9/7/07
to
Try this code.

<cfset TrackRequest = StructNew()>
<cfset TrackRequest.AuthenticationDetail.UserCredential="OSTgJ9WpY9KxYyjl">
<cfset TrackRequest.ClientDetail.AccountNumber="510087240">
<cfset TrackRequest.ClientDetail.MeterNumber="1194638">
<cfset TrackRequest.PackageIdentifier.Value="698970753640">
<cfset TrackRequest.PackageIdentifier.Type="TRACKING_NUMBER_OR_DOORTAG">

<cfdump var="#TrackRequest#">

<cfinvoke webservice="http://pulizzi.azon1.com/FedEx/TrackService.wsdl"

returnVariable ="T2" Method="Track">

<cfinvokeargument name="Trackrequest" value="#TrackRequest#">
</cfinvoke>

<cfdump var="#T2#">
<cfoutput>
#T2.hashCode()#<BR>
#T2.getVersion()#<BR>
#T2.getNotifications()#<BR>
#T2.getNotifications()#<BR>
#T2.getTypeDesc()#<BR>
#T2.getTransactionDetail()#<BR>
#T2.getPagingToken()#<BR>
#T2.getHighestSeverity()#<BR>
#T2.getDuplicateWaybill()#<BR>
#T2.getMoreData()#<BR>
#T2.getTrackDetails()#<BR>
#T2.getClass()#<BR>
#T2.toString()#<BR>
</cfoutput>

Let me know if that returns anything for you.. The tracking information is
kept I believe in a structure in GetTrackDetails.. I am not certain how to
extract that information, hopefully after continued attepts I can get it and
end the week on a high note..

teknomusik

unread,
Sep 7, 2007, 2:39:40 PM9/7/07
to
Try this (after the previous code):

<cfdump var="#T2.getTrackDetails(0)#">

<cfdump var="#T2.getTrackDetails(0).getDeliverySignatureName()#">

PulizziGuy

unread,
Sep 7, 2007, 3:03:24 PM9/7/07
to
I have inplimented your codes as http://pulizzi.azon1.com/FedEx/Ftest3.html and
http://pulizzi.azon1.com/FedEx/Ftest4.html respectfully. Is maybe something in
my coldfusion MX7 server misconfigured so it does not properly use SOAP or WSDL
formats somehow??


Shanet

unread,
Sep 7, 2007, 3:20:54 PM9/7/07
to
Thank you tek for your help... This really made my week..
For future reference...

<cfset TrackRequest = StructNew()>
<cfset TrackRequest.AuthenticationDetail.UserCredential="OSTgJ9WpY9KxYyjl">
<cfset TrackRequest.ClientDetail.AccountNumber="510087240">
<cfset TrackRequest.ClientDetail.MeterNumber="1194638">
<cfset TrackRequest.PackageIdentifier.Value="698970753640">
<cfset TrackRequest.PackageIdentifier.Type="TRACKING_NUMBER_OR_DOORTAG">

<cfdump var="#TrackRequest#">

<cfinvoke webservice="http://pulizzi.azon1.com/FedEx/TrackService.wsdl"

returnVariable ="T2" Method="Track">

<cfinvokeargument name="Trackrequest" value="#TrackRequest#">
</cfinvoke>

<cfdump var="#T2#">
<cfdump var="#T2.getTrackDetails(0).getDestinationAddress()#">
<cfdump var="#t2.getTrackDetails(0).getStatusDescription()#">
<cfdump var="#t2.getTrackDetails(0).getDestinationAddress().getCity()#">
<cfdump
var="#t2.getTrackDetails(0).getDestinationAddress().getStateOrProvinceCode()#">
<cfdump var="#t2.getTrackDetails(0).getDestinationAddress().getCountryCode()#">

The above will work with FedEx's implementation to return some simple values
such as status destination etc. Good Luck..


Shanet

unread,
Sep 7, 2007, 4:20:24 PM9/7/07
to
PulizziGuy ,
I did try your pages and it never really loaded... I noticed that it had
HTML after the file name? Shouldn't it be CFM unless you have some other
setting on your server. Also, are you able to just dujmp the var T2 or does
that timeout as well??

Are you able to access other services as well? Perhaps there is some security
setting keeping you from doing this?

dbldutch

unread,
Nov 2, 2007, 2:48:43 PM11/2/07
to
Sorry to jump in on this thread so late but have either of you had any success
with getting rates or rate availability (rateAvailableServices)?

It uses RateAvailableServicesService_v2.wsdl

I'm looking for some general code to help me get on my way.
Thanks.

SorryNicknameTaken

unread,
Dec 20, 2007, 5:06:41 PM12/20/07
to
For RateAvailableServicesService_v2.wsdl:

<cfset Rate = StructNew()>
<cfset Rate.WebAuthenticationDetail.UserCredential.Key = "xxxxxxxxxxxxxxxx">
<cfset Rate.WebAuthenticationDetail.UserCredential.Password =
"xxxxxxxxxxxxxxxxxxxxxxxxx">
<cfset Rate.ClientDetail.AccountNumber = "xxxxxxxxx">
<cfset Rate.ClientDetail.MeterNumber = "xxxxxxx">
<cfset Rate.Version.ServiceId = "crss">
<cfset Rate.Origin.PostalCode = "81505">
<cfset Rate.Origin.CountryCode = "US">
<cfset Rate.Destination.PostalCode = "90210">
<cfset Rate.Destination.CountryCode = "US">
<cfset Rate.ShipDate = DateFormat(now(),"yyyy-mm-dd")>
<cfset Rate.RateRequestPackageSummary.TotalWeight.Units = "LB">
<cfset Rate.RateRequestPackageSummary.TotalWeight.Value = "10.0">
<cfset Rate.Version.Major = "2">

<cfinvoke
webservice="http://www.yourwebsite.com/RateAvailableServicesService_v2.wsdl"
returnVariable="response" Method="rateAvailableServices">
<cfinvokeargument name="RateAvailableServicesRequest" value="#Rate#">
</cfinvoke>

<cfloop array="#response.getOptions()#" index="thisRate">
#thisRate.getServiceDetail().getServiceType().getValue()# -

#thisRate.getRatedShipmentDetails(0).getShipmentRateDetail().getTotalNetCharge()
.getAmount()#<br>
</cfloop>

0 new messages