Link to home
Start Free TrialLog in
Avatar of sonashish
sonashishFlag for United States of America

asked on

How to get Shipping Cost (Ratequote) from UPS.com

I like to to create a small application for getting shipping rate/quote from UPS. I got support document from UPS and tried but not able to use it, As I am new to XML. I created xml string and passit to url, but did not get result. Here is url samples

https://www.ups.com/ups.app/xml/Rate?
<?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
<AccessLicenseNumber></AccessLicenseNumber>
<UserId></UserId>
<Password></Password>
</AccessRequest><?xml version="1.0"?><RatingServiceSelectionRequest xml:lang="en-US"><Request><TransactionReference>
<CustomerContext>Bare Bones Rate Request</CustomerContext><XpciVersion>1.0001</XpciVersion></TransactionReference>
<RequestAction>Rate</RequestAction><RequestOption>Rate</RequestOption></Request><PickupType>
<Code>01</Code></PickupType><Shipment><Shipper><Address><PostalCode>44129</PostalCode>
<CountryCode>US</CountryCode></Address></Shipper><ShipTo><Address><PostalCode>44129</PostalCode>
<CountryCode>US</CountryCode></Address></ShipTo><ShipFrom><Address><PostalCode>32779</PostalCode>
<CountryCode>US</CountryCode></Address></ShipFrom><Service><Code>01</Code></Service><Package>
<PackagingType><Code>02</Code></PackagingType><Dimensions><UnitOfMeasurement><Code>IN</Code>
</UnitOfMeasurement><Length>20</Length><Width>20</Width><Height>20</Height></Dimensions>
<PackageWeight><UnitOfMeasurement><Code>LBS</Code></UnitOfMeasurement><Weight>23</Weight>
</PackageWeight></Package></Shipment></RatingServiceSelectionRequest>

I dont know whats wrong I am doing, can anyone help in this matter as well read XML response from UPS. I am stuck here. However I have successfully connected ABF/ROADWAY/FedexFreight and MyYello.

Looking forward to response from GURU's. This solution I am specially looking in ASP only.
Avatar of seanpowell
seanpowell
Flag of Canada image

This is a similar question that should solve your problem for you...
https://www.experts-exchange.com/questions/20581574/Connecting-to-UPS-Real-time-Rates-by-XML-in-ASP.html

Note - I've removed your License Number, Username and Password from your post above, and also added some line breaks to keep the page here from scrolling :-)

Thanks,
Sean
Avatar of sonashish

ASKER

Sean

Thanks for the information. I think I should give you 100 points for this. Becuase I already did this excercise, except in suggested url give some focus me for how to read XML file or you can say xml response. But After I faced one more problem, that whenever I run my application in under Local Network it wont run, probably we are using Proxy services using 8080 port, but if I runt same application out of the of network machine, it works perfectly. Is there any way to handle this situtation?

Again Thanks for the help.

Ashish
Hi Ashish,

Please forgive me as I have some difficulty in understanding your comment. I assume (believe) it's because Microsoft.XMLHTTP needs to be run from a server, and so won't function locally - but that is not my area of expertise, so I may be mistaken. You may also want to post a question in one of the Network or Web Server TA's for help with this ...

Thanks,
Sean
I have solver this problem with my own efforts. Dont think anyone will be awarded by reward point. I like to close this issue.
Actually UPS is not allowing get rate quote for unregistered user in XML format, So I registered my self as registered user and test same url. It is working fine.
ASKER CERTIFIED SOLUTION
Avatar of ee_ai_construct
ee_ai_construct
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial