Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web service to validate US states, city and zipcode

 
Tahir Akram
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 257
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic