aspose file tools*
The moose likes Web Services and the fly likes Need to access USPS Web Service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Need to access USPS Web Service" Watch "Need to access USPS Web Service" New topic
Author

Need to access USPS Web Service

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1075
Ok, I've gotten Axis installed and got the first tutorial actually working: http://www.ammai.com/webservices/

This was a great start!!!

=========

My actual project, though (six hours later -- after getting the tutorial working ... <g> is to "consume" the Web Service that the USPS makes available to verify U.S. Postal addresses and such. It's also free!

The problem is they expect you to use their Microsoft DLL and Visual Basic. If you don't do that, well, you seem to be out of luck. Any in any case, there's no support.

I think I have the address of their server with the "dll" tacked on at the end, but that won't do me any good.

So, how do you go about doing the UDDI/WSDL stuff in this case.

That is, do I already know enough to get started or do I need to know some "discovery Web service" to get the actual APIs I can call?

I'm not sure what to do next.

I also doubt they're using axis, which may not matter at all.

I look forward to any and all replies.

Thanks very much in advance.

-- Mike
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2057
is that web service open to public?

all you need is its wsdl file. try search its web site for it.

with the wsdl on hand, you have 100% info on how to connect to the web service.

using stuff like wsdl2java, you can create the proxy.

you can then code your client program to connect via the proxy.

it doesnt matter if they use vb, dot net or any other, nor any server. they probably mean, they can assist in determining your problem, only if you are using the platform that they are prepared to support. if this is a production effort, it might be good to stick with the platform that has support.

by the way, for practice, you can try also to connect to google and other web services open to public.
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2057
if this is not open to public, like if it is a business-to-business thing, then you will most likely get the wsdl directly from usps.
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1075
Thanks for your reply!!!

Well, it's "open to the public" once you get a login, which is totally free.

You can see the technical documents they have here:

http://www.usps.com/webtools/technical.htm

The "tech support" folks I've talked to don't seem to have a clue about what UDDI or WSDL is.

I'll try to get this info and see how far I get.

Thanks for the information!!!

-- Mike
Jesus Angeles
Ranch Hand

Joined: Feb 26, 2005
Posts: 2057
i looked at the website. i am not familiar with vb.

they mentioned dll. that might be correspond to what proxy or stubs are used for in java.

they might provide the dll, and you will write your client program, to use that dll.

since web services are based on standards, e.g. soap, there can be many ways to implement it, including vb dot net, and java.
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1075
Right.

Since the Web Service client code (that is, the code that calls the USPS Address Verification Web Service) will run on a Linux box, VB is out! <g>

I've requested they send me the WSDL info as you suggested they probably have. Their tech docs say you can access their site using any programming language, but, as you noticed, they don't give specifics.

Plus, if their posted VB example code doesn't work, they won't help you with that either, so I'm probably just as well off trying to figure this out in Java.

Thanks for your great replies!!!

-- Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need to access USPS Web Service