aspose file tools*
The moose likes Web Services and the fly likes Web service to validate US states, city and zipcode Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web service to validate US states, city and zipcode" Watch "Web service to validate US states, city and zipcode" New topic
Author

Web service to validate US states, city and zipcode

Tahir Akram
Ranch Hand

Joined: Jul 03, 2007
Posts: 37
I want to validate city against selected state and zipcode against selected city.

--> State --> City --> Zipcode

Is there any free web service that I can use to validate it.

Kindly help...

thanks in advance.


Tahir Akram
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42910
    
  68
Welcome to JavaRanch.

You can find a large list of publicly accessible WS at www.xmethods.net. Maybe you'll find something there.
Tahir Akram
Ranch Hand

Joined: Jul 03, 2007
Posts: 37
Thanks Dittmer, your said site really contains a lot of handy webservices.

I have found another http://www.webservicex.net/uszip.asmx .

I am new to web services and still messing to start with it,
as I implement it in my GET action of form it gave me the response in xml. It is my desire result. I only want to ask, how can I get this xml tree (response) in my code.

Or there any way to call this webservice from code. They also provide soap-envelop, how to use it ???

Using in HTTP GET


Given SOAP Envelop



Please help or suggest any kick-start reading...

Thanks
[ July 03, 2007: Message edited by: Tahir Akram ]
Tahir Akram
Ranch Hand

Joined: Jul 03, 2007
Posts: 37
another thing, they also give a wsdl file. http://www.webservicex.net/uszip.asmx?WSDL

kindly tell how can I use it in my java code...?

hint??
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42910
    
  68
You would use the WSDL to create Java client classes for the WS, using a tool that the WS toolkit you use provides. E.g., Axis comes with the wsdl2java tool that does this.
Tahir Akram
Ranch Hand

Joined: Jul 03, 2007
Posts: 37
I have downloaded Java Web Services Developer Pack 2.0 (Java WSDP), will it works for me, what I want. Mean composing SOAP request and getting SOAP response (the xml file tree)?

Thanks.
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Hi Tahir,

Just read the Axis documentation on the net Get the wsdl2java utility, create the client side stubs and servicelocator which can be used to invoke the webservices.

Regards,
Amit Tank


Amit Tank
Linked In
Peer Reynders
Bartender

Joined: Aug 19, 2005
Posts: 2922
    
    5
Looking at the Axis 1.x documentation isn't going to help with a JAX-WS stack like JWSDP 2.0. According to Mustang: The fast track to Web services Web Services in Java 6 SE use a tool called wsimport - JWSDP 2.0 uses the same tool.

Though ultimately it may be simpler to use Axis 1.x WSDL2Java to generate the client stubs according to the steps described in 3. WSDL2Java: Generate the Server-side Wrapper Code and Stubs For Easy Client Access (followed by 6. Client: Write a Client That Uses the Generated Stubs to Easily Access the Web Service) � compared to using the JWSDP 2.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Web service to validate US states, city and zipcode