Writing Session Bean Web Services 107 Some good news first before we look at some of the details: Relax, you don t have to write this XML document yourself. This interface description was automatically generated from a Java interface using a generator tool: the wscompile tool that comes with the J2EE SDK. A number of things are worth noting about the HelloWorld WSDL: The number of language concepts used here is larger than in Java. We have a service that provides one or more ports at an address. Ports represent the service interfaces and have bindings to protocols. The service description includes an endpoint address. The WSDL is thus like a Java interface and an object reference joined together. In other words, Web Services do not have distinct identities. They are not objects and must be viewed as modules. There is no client-visible state, and you cannot compare two references for equality! Operations are specified in terms of input and output messages rather than parameters and return values. These have to be represented as elements ( parts ) of input and output messages. Here, there is only the part that is actually transferred inside a message: the result part of type xsd:string in the HelloInterface_helloResponse message. The binding for the service is a SOAP binding. There can be other bindings in theory, but in practice SOAP is the only available option today. Also note that the soap:binding has an attribute style= rpc , so there must be other possible styles. Currently, the only other style for exchanging SOAP messages is document-style, which means that there is no specific representation of a called operation in the SOAP message s body. Do you want truly affordable web hosting? With us, what you see is what you get, just click on affordable web hosting services.
This entry was posted
on Tuesday, December 25th, 2007 at 11:13 am and is filed under The J2EE Technology.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.