wood burning stoves 2.0*
The moose likes Web Services and the fly likes Web Services jargon Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Web Services jargon" Watch "Web Services jargon" New topic
Author

Web Services jargon

Anand Athinarayanan
Greenhorn

Joined: May 20, 2011
Posts: 27
Hi,

This is my first experience with webservices. So need a little help here. We are supposed to write a client program to consume the webservice. I find some difficulties in understanding certain concepts, any help appreciated !

1. I now understand what is a webservice, and little googling has helped me to understand that 'Axis' is a SOAP implementation. We have many such implementations. So Axis helps in 'hosting' a webservice.
But what is JAX-WS? Is it like another SOAP implementation or Axis in turn uses JAX-WS to implement SOAP ?

2. Currently we are creating 'stubs' to call the webservice, the stubs were created using the WSDL2JAVA tool, so if we have a WSDL file can we create 'stubs' for any webservice which is hosted by a different SOAP implementation engine? Say for eg, if we have a webservice which is hosted using some SOAP engine other than axis, then can i use this WSDL2JAVA command to generate stubs for it and call methods on the stubs? Do we have any other tool like WSDL2JAVA to generate stubs? Can stubs be generated only for certain type of webservices or can be stubs be generated only if the webservice provider 'allows' us to do so?

3. If I call a webservice using stubs, it is just like calling a method on a local object.So where are we using JAX-WS in the client code? Do we have any types of webservice? Say if a webservice is implemented on axis, can i know that as a client?

4. In our case, after we created stubs, we were presented with a spec which contained details on which object to instantiate and what methods to call? If we are not provided with such spec then can we determine what objects to instantiate and call methods by interpreting the WSDL ?

Regards,

Anand
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
1. JAX-WS is a web service API.
JAX-WS is also a standard, stipulating what a web service stack should make available.
The reference implementation is Metro - available here: http://jax-ws.java.net/
2. Stubs can be generated for SOAP web services that make a WSDL available.
The WSDL also needs to adhere to certain rules; for example JAX-WS only supports RPC/Literal and Document/Literal and no other encoding styles.
3. The web service stack is used by the stubs.
4. Yes, the WSDL should be sufficient to generate stubs. However, the WSDL, without additional documentation, does not convey the semantics of the web service.
The additional documentation may be included in the WSDL for human consumption.
Best wishes!


My free books and tutorials: http://www.slideshare.net/krizsan
Anand Athinarayanan
Greenhorn

Joined: May 20, 2011
Posts: 27
Hello Ivan,
Thanks for the reply. It was really helpful. I have a couple of questions though,

1. Can a client find out what SOAP implementation the calling webservice is using?

2. If a webservice is deployed using Axis then can I use wsimport to generate stubs? If the service uses JAX-WS then can i use wsdl2java to generate the stubs?

BTW I have downloaded your notes on Webservice from slideshare, thank you so much !
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
1. No, unless the web service enclose some information about this.
2. You can use wsimport to generate stubs provided that the web service publishing the WSDL only use features supported by JAX-WS.
Some old JAX-RPC service use a type of encoding that JAX-WS does not support. This will cause problems with JAX-WS clients.
Disclaimer: I do not know much about Axis, since I tend to choose other web service stacks.
Best wishes!
Anand Athinarayanan
Greenhorn

Joined: May 20, 2011
Posts: 27
Ivan,

Thanks ! Marking this thread as solved.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Web Services jargon
 
Similar Threads
how to add JAX-WS webservice runtime environment within eclipse
invoking .asmx webservice in java?
Difference between JAX-WS2.0 and (JAX-WS2.1 RI integrated with JDK6)
Generating API dynamically from WSDL
How to write a java webservice client