Network Programming Help - Fun with UPS

  • Thread starter Thread starter Scott C. Reynolds
  • Start date Start date
S

Scott C. Reynolds

I need to do something in an asp.net application to get shipping costs
from UPS.

a)does anyone have any C# code for this? That would be immensely
helpful as then I could examine it and apply it directly to my problem

2)if not, can someone help me out with the network programming? there
is no webservice. there is an endpoint that my app would have to talk
to and pass it the information in XML, and I would get some XML back,
which is all fine and good, but I don't know how to say "here's your
XML" and then "oh good, I got some XML back".

iii)Screw UPS for building some network thing that talks XML over HTTP,
but not actually setting up a web service.

any and all help greatly appreciated
 
Scott,

Do you have any specs on how to access this framework? That would go a
long way to determining how to access it.

Also, you will probably want to bone up on the HttpWebRequest and
HttpWebResponse classes to send a request and receive the response. Check
out the XmlDocument class for a method of formulating your XML as well.

Hope this helps.
 
yes...hundreds of pages of PDF

First, I know how to do the XML...that's the easy part.

Basically I have to make a POST (should have mentioned that in the first
place) to their thing. I can achieve that with HttpWebResponse and
HttpWebRequest? I will begin looking into it.
 
Scott C. Reynolds said:
I need to do something in an asp.net application to get shipping costs
from UPS.

a)does anyone have any C# code for this? That would be immensely
helpful as then I could examine it and apply it directly to my problem

2)if not, can someone help me out with the network programming? there
is no webservice. there is an endpoint that my app would have to talk
to and pass it the information in XML, and I would get some XML back,
which is all fine and good, but I don't know how to say "here's your
XML" and then "oh good, I got some XML back".

iii)Screw UPS for building some network thing that talks XML over HTTP,
but not actually setting up a web service.

any and all help greatly appreciated

There's a GotDotNet project - DotNETShipping - for an assembly which does
this. It currently supports rate requests for UPS, FedEx, Airborne Express
and USPS. You need to register with each of the individual providers before
you'll be able to use the code, but if you've gotten the UPS documentation
you must have already registered.

Check it out here (watch for wrapping):
http://www.gotdotnet.com/Community/Workspaces/Workspace.aspx?id=29bbb7fe-2d18-4f82-a273-9445b978d1bf

It's not complete, but it should definitely get you started even if you
decide not to use it.

Good luck,
Ryan LaNeve
 
Scott C. Reynolds said:
yes...hundreds of pages of PDF

First, I know how to do the XML...that's the easy part.

Basically I have to make a POST (should have mentioned that in the
first place) to their thing. I can achieve that with
HttpWebResponse and HttpWebRequest? I will begin looking into it.

For simple applications, System.Net.WebClient will work as well.

Cheers,
 
Back
Top