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

RE: HTTPAPI for UPS Rate



StartofElement and EndofElement are invoked for each element of the XML returned by UPS. StartofElement when <someelement is found and EndOfElement when </someelement is found. You told it to do this in the http_url_post_xml at 130.

So, then it just a matter of figuring out what the XML looks like when it is returned to you and adapting those two procedures. The current setup you have will increment a counter (act) when it sees an element call Currencycode inside the path /RatingServiceSelectionResponse/RatedShipment/TransportationCharges/. The path being the XML elements shown in a "path" format. StartofElement does not know what is in CurrencyCode; it just knows that it is there (at that point in the XML). The EndOfElement knows where it is and what the last value was. So, it can pull the data out of the elements Date, Time, Description, etc. The data (in your current program) would be returned in the activity DS (from there you could return the values to your program in your ALIST).

If you have the WSDL for the UPS service, it should show you the "path" information as well as the actual fields you are interested. If not, send the debug listing and we can make some guesses about how to get those values.

Good luck


> -----Original Message-----
> From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx [mailto:ftpapi-
> bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of J. Carlos Lugo
> Sent: Thursday, September 09, 2010 10:36 AM
> To: 'HTTPAPI and FTPAPI Projects'
> Subject: HTTPAPI for UPS Rate
> 
> I am new in all this of the HTTPAOPI, I am making changes to the UPS
> Track
> program example 16 program, to adapt it for Rating Service Selection
> Response
> 
> I am passing parameters from another program to a carbon copy of the
> program
> example16, I have changed the POSTDATA to send info to UPS for the
> freight
> rate but I am stock of how to select from the reponse message and read
> the
> transportation charges values, service options charges values and the
> total
> charges values and put it back to a ALIST parms so I can get it back to
> my
> call program
> 
> I am attaching a copy of my source to see if at least I can get a Hint
> of
> how to read back the Reponse Message, Still have some code that I have
> to
> remove out of the program but I just want to find out how to read the
> message back
> 
> Thank you very much
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------