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


JavaRanch » Java Forums » Java » Web Services
Bookmark "Newbie Question" Watch "Newbie Question" New topic
Author

Newbie Question

Abhinav Srivastava
Ranch Hand

Joined: Nov 19, 2002
Posts: 349

A client communicates with a server by sending xml docs. Obviously
the underlying technology is JAXM. Where does WSDL fit in this scenario.
And also UDDI. And then what is the meaning of DOCUMENT style binding in WSDL.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Where does WSDL fit in this scenario.
If you have generated static stubs for the client-side, you won't need the WSDL anymore as it's only used once during development. If you're using dynamic stubs (i.e. generating a stub dynamically based on a WSDL document), then that's what the WSDL document is used for.
And also UDDI.
Most projects don't utilise a UDDI registry at all. UDDI can be used for publishing WSDL documents into a single "business registry" where (theoretically) analysts can browse for suitable web services, pick the one they like, and point their web service client to the WSDL document.
And then what is the meaning of DOCUMENT style binding in WSDL.
Document-style binding relates to how your requests and responses are encoded into the SOAP envelope. The document-style simply means that the SOAP-Envelope element can contain any valid XML and you promise to handle it appropriately. The other alternative, RPC-encoding relies on certain standardized bindings for basic data types such as numbers and strings, which enables you to access the web service in a way that resembles more RPC method calls than "a complex procedure involving sending and receiving XML messages".


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Abhinav Srivastava
Ranch Hand

Joined: Nov 19, 2002
Posts: 349

But, when using JAXM for soap messaging, we don't need stubs, do we?
So if I have a servlet which is ready to receive SOAP messages thereby providing a webservice, there is no role for wsdl. WSDL is needed only when we make R-P-calls. Thats what I have understood of it.
By the way I cudn't use the coffee-break servlet for jaxm in WSDK5 of IBM. It throws some FilePermission exception for jaxm.properties which is nowhere in my file system.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
The WSDL document describes to the client application which services are available, what kind of input they are expecting, what kind of output they will be generating, and where the requests should be sent, using which protocol. Thus, I do think that WSDL is needed at least during development of the client application.
Btw, you could post a question about the WSDK to our WebSphere forum.
 
GeeCON Prague 2014
 
subject: Newbie Question