It's not a secret anymore!*
The moose likes Web Services and the fly likes Consume web service software Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Consume web service software" Watch "Consume web service software" New topic
Author

Consume web service software

Dan Parsons
Ranch Hand

Joined: May 30, 2007
Posts: 70
I am getting NetBeans 6.7 and will use that for consuming a web service. I will be building the client side on Tomcat 6.0.20 to fetch somebody elses web service that is located on another server.
Do I need to get Axis or other extra software on my Tomcat to consume a web service that is located on a another server?
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Your usage of "consume" is confusing. The purpose of a web service is to allow one application to communicate with another application. Netbeans is a development tool and does not "consume" anything.

The technology needed to use a web service is determined mostly by the "implementation" technology of the service itself. There are many different types of web service implementations. Describe the technology of the web service on the other server and we might be able to determine what you need for writing client code.
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
If you want to create clients to SOAP web services, then, strictly speaking, you are good to go with Java SE 6, since it contains things like SAAJ, JAXB etc. There may be newer versions of the APIs that may give you some benefits.

If you want to create clients to RESTful web services, then you usually need some kind of HTTP client, like the Apache HTTPClient or the Jetty client API to post HTTP requests to the service.
The JBoss RESTEasy framework has a client API that allows you to annotate an Java interface using JAX-RS annotations and it will then generate a client proxy which you then can use to interact with resource(s) of a RESTful web service.
The RESTlet framework also contains a client API.

This answer is not exhaustive - I am sure there are other good alternatives.
Best wishes!
Dan Parsons
Ranch Hand

Joined: May 30, 2007
Posts: 70
Thanks, As a client I need to get information from a Web Service where I will use an XML tag (CityRequest) to fetch a specific city and get the city information as an XML output.

I need to create an XML object:


Then call the City Web Service URL: http://cityService/URLConnector
I would then get the XML response with Boston information.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42289
    
  64
The SAAJ APi might be sufficient for that; see this example for a simple SAAJ client: http://faq.javaranch.com/java/WebServicesHowTo#saaj-client


Ping & DNS - my free Android networking tools app
 
 
subject: Consume web service software