• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Consume web service software

 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The SAAJ APi might be sufficient for that; see this example for a simple SAAJ client: http://faq.javaranch.com/java/WebServicesHowTo#saaj-client
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic