[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UPS XPath and retrieving values question



Currently, you are calling http_url_post_xml() which parses XML that 
comes back from the server.

Change your program (temporarily) to call http_url_post() which won't 
parse the XML, it'll just save it to the IFS.  Then you can look at it 
to see what you're getting from UPS.

I'm not familiar with the CurrentStatus field being returned, but if 
they're sending it, you should see it in the IFS file you get back from 
UPS, and therefore adjust the code to retrieve it.


Steve Horst wrote:
>    Hi,
> 
> 
>    I am working on using the UPS tracking program that Scott provided
>    (which is a great tool) and have made a few mods which are working
>    however I am having issue getting a value back that I am expecting in
>    the TrackResponse message.  According to the UPS XML manual there
>    should be a container for "CurrentStatus".  I have tracked several
>    packages that when viewing via a browser on the UPS site show the
>    CurrentStatus elements such as "In Transit" but I cannot seem to
>    retrieve that value using the UPS tracking program via HTTPAPI.
> 
> 
>    I have added the following to the EndOfElement procedure
> 
> 
>           when path = '/TrackResponse/Shipment/Service'; // This one
>    works we are getting this container returned
> 
> 
>               select;
> 
>                 when name = 'Description';
> 
>                   scMethod = value;
> 
>               endsl;
> 
> 
>           when  path = '/TrackResponse/Shipment/CurrentStatus';  // This
>    one does not work and does not seem to be in the document
> 
> 
>               select;
> 
>               when name = 'Description';
> 
>                 scStat = value;
> 
>               endsl;
> 
> 
>    Q1:  Is there a way to capture the XML document being returned to see
>    the composition/document?
> 
>    Q2:  Is there a parameter is the TrackRequest that is missing to
>    return those details.
> 
> 
>    Any help would be greatly appreciated.
> 
> 
> 
>    Steve Horst
> 
>    Sr. Programmer / Analyst
> 
>    Tournament Sports Marketing Inc.
> 
>    185 Weber St. S
> 
>    Waterloo, ON. N2J 2B1
> 
>    Phone: 1-519-888-6500 xtn. 259
> 
>    Watts: 1-800-265-2454
> 
> 
> 
> ------------------------------------------------------------------------
> 
> -----------------------------------------------------------------------
> This is the FTPAPI mailing list.  To unsubscribe, please go to:
> http://www.scottklement.com/mailman/listinfo/ftpapi
> -----------------------------------------------------------------------

-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------