Java Reference
In-Depth Information
3.2.3.1 <operation> element
A service may have one or more operations (or methods). Each operation is independently
defined with one input message, one output message, and an optional fault message. These
messages are defined using the message element. Similar to a Java class definition, each
operation defines a behavior of a service.
3.3 WSDL Implementation
The <binding> element of the WSDL connects the WSDL abstract interface to concrete im-
plementation. In this section, we will pay specific attention to the <binding> element where
the connection takes place. Thus, in some way, <binding> is the central element of the entire
WSDL specification. This is where the two worlds meet.
3.3.1 <binding> element
Binding maps <portType> to a implementation specified in the <service> element. From
listing 3-1, <portType> HelloWorld is bound to <port> HelloWorldPort inside the <ser-
vice> element. The implementation of HelloWorld is SOAP over HTTP (<soap:binding>).
SOAP specifies data formats and HTTP is a specific protocol to be used for the service
offering.
Binding does not specify any particular language in its implementation. The way in which
the service is implemented is beyond the scope of the WSDL.
3.3.2 <service> element
A service is a collection of network-specific addresses (<port>) where the service may be
rendered. <port> and <portType> are linked via a <binding> element. The connection is
critical for runtime dynamic binding between the service consumers and providers.
The <port> element describes the network address that enables a service consumer to inter-
act with the service being offered. A service with multiple ports is possible; thus, the choice
is left to the consumer. In the sample WSDL, only one port is provided and its location is
specified as http://localhost:9999/java- ws/hello . Note that the host name and port number
can be modified at runtime to point to whichever server is hosting the service.
Search WWH ::




Custom Search