You can go to UPS.com to get how for the XML and read the response.
This is the code that I used to send the request to UPS. There are
different urls for tracking and for time in transit and for costing.
This code pushes about 4 to 6 requests to UPS's web server an hour. Of
course this was done during non peak time (in the middle of the night)
and very rarely would it fail or timeout. For FedEx and DHL I think
used the same code for them.
PROCEDURE cls_msxml
LPARAMETERS lcURL, lcXMLDOC, llUpper, lcPactrcno as String, lcType as String
IF PARAMETERS() = 0 OR EMPTY(lcURL) OR EMPTY(lcXMLDoc) OR ISNULL(lcURL)
OR ISNULL(lcXMLDoc)
RETURN ''
ENDIF
LOCAL loxml,lchost
lchost = SUBSTR(lcurl,ATC('//',lcurl)+2)
TRY
loXML = CreateObject("MSXML2.ServerXMLHTTP")
CATCH TO loErrMsxml1
TRY
loXML = CreateObject("MSXML2.ServerXMLHTTP")
CATCH TO loErrMsxml2
RETURN ''
ENDTRY
ENDTRY
loxml.Open("POST",lcURL,"false")
loxml.setRequestHeader("Referer","Company Name")
loxml.setRequestHeader("Host", lchost)
loxml.setRequestHeader("Accept","image/gif, image/jpeg,image/pjpeg,
text/plain, text/html, */*")
loxml.setRequestHeader("Content-Type","image/gif")
loxml.setRequestHeader("Content-Length", ALLTRIM(STR(LEN(lcxmldoc))))
loxml.send(lcxmldoc)
hold = STRCONV(loxml.responseBody,9)
RETURN (hold)
Whil Hentzen wrote:
> Kevin Cully wrote:
>
>> Cool. If hitting the UPS site is just a matter of formatting a URL
>> address, or populating some post variables and then reading the XML
>> response, that's pretty easy then.
>>
>> I was afraid that they had gone to a full Web Service XML request and
>> response scenario.
>>
>
> You CAN use that new fangled Web Service stuff if you like but the old
> post var stuff still works. I haven't changed our real-time requests
> against UPS, USPS and FedEx in at least 6 years and it's still working
> like a champ. Probably fails 2x/year, on a timeout or something funky.
>
> Whil
>
>
>> Thanks,
>> -Kevin
>> CULLY Technologies, LLC
>>
>>
>> Brian Erickson wrote:
>>
>>> I have built a tracking, and time in transit system for UPS, FedEx and
>>> DHL. All three use some kind of web service. I can share with you the
>>> jist of how I did it. Like Stephen said you can pass all the info to
>>> UPS and they will calculate the cost and when it should be there.
>>>
>>
>>
[excessive quoting removed by server]
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.