Q&A

Q1:SOAP uses HTTP as a transport, so does this mean that it is restricted to synchronous interaction?
A1: Any transport can be used for a SOAP message as long as someone creates a binding for it. SOAP bindings have been defined for SMTP, and such bindings can be created for any other transport mechanism, such as FTP or MQSeries, regardless of whether such mechanisms are synchronous or asynchronous.

Also, although HTTP is inherently synchronous, you can use it to pass XML documents that consist of business “messages” and that form part of a workflow. If the sender of the message is also capable of receiving such messages, it may receive a response of some form at some future point in time. This uses two synchronous interactions to create asynchronous behavior.

Q2:Can I use JAX-RPC to send an XML document rather than performing an XML-based RPC call?
A2: Although it is possible to send an XML document as a parameter to an RPC call using JAX-RPC, document-centric interactions are intended to be serviced by the SOAP with Attachments API for Java (SAAJ) and the Java API for XML Messaging (JAXM). You will encounter SAAJ and JAXM in more detail tomorrow.
Q3:What sort of information is contained in a WSDL document?
A3: A WSDL document contains two basic types of information. It contains the interface for the Web Service that consists of type information, message definitions (parameters and return types), operation definitions (methods that can be called), port types (groupings of methods), and bindings that define how port types are carried over different transports. A WSDL file also contains specific location information for a Web Service in the form of ports that provide a specific location for an instance of a port type and service descriptions that define groups of ports.
Q4:Why can I only expose stateless session EJBs as Web Services under JAX-RPC and not other types?
A4: Although JAX-RPC provides an RPC-style interface to a Web Service, the whole ethos of Web Services is based around a stateless model of operation. The maintenance of state in traditional RPC terms relies on either an ongoing connection or a protocol-specific token being passed. Neither of these suits the style and granularity of Web Service interaction. All Web Service implementations under JAX-RPC for J2EE are required to be stateless, so only stateless session EJBs match this requirement.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.50.222