USPS Web Service

  • Thread starter Thread starter Darin
  • Start date Start date
D

Darin

I would like to connect to the USPS web service which
validates address' and looks up zip codes but the USPS
examples are in in Visual Basic 6 while I want to do it
in C#.

I am reading about web services but am lost. Can someone
share some guidance if they have been able to accomplish
this?

Thanks
Darin
 
Hi Darin,
I would like to connect to the USPS web service which
validates address' and looks up zip codes but the USPS
examples are in in Visual Basic 6 while I want to do it
in C#.

I am reading about web services but am lost. Can someone
share some guidance if they have been able to accomplish
this?

Thanks
Darin


I took a look at docs on the USPS site. As far as I see, there is nothing
special. This is not exactly a web service in the terms of .net/c#.
It seems that there is a http server, to which you make simple http requests
and receive responses.
So, to start, read about XmlDocument and related classes to see how to
prepare the XML for the requests.
After that you may use WebClient classes from the .net framework, to process
the request and to receive the response.

Actually, first you have to try is just to prepare a plain xml file with the
request, and to try (with browser) to pass it to the server to see what
happens. I guest that you'll receive an xml response with the requested
data.

There is nothing complicated, the WebClient class is just the thing which
replaces the browser :)

Sorry for the simplified answer, but I guess you need the starting point.

Hope that helps
Sunny
 
Thanks Sunny!
-----Original Message-----
Hi Darin,



I took a look at docs on the USPS site. As far as I see, there is nothing
special. This is not exactly a web service in the terms of .net/c#.
It seems that there is a http server, to which you make simple http requests
and receive responses.
So, to start, read about XmlDocument and related classes to see how to
prepare the XML for the requests.
After that you may use WebClient classes from the .net framework, to process
the request and to receive the response.

Actually, first you have to try is just to prepare a plain xml file with the
request, and to try (with browser) to pass it to the server to see what
happens. I guest that you'll receive an xml response with the requested
data.

There is nothing complicated, the WebClient class is just the thing which
replaces the browser :)

Sorry for the simplified answer, but I guess you need the starting point.

Hope that helps
Sunny
.
 
Back
Top