Web services expose one or more endpoints to which messages can
be sent. A web service endpoint is an entity, processor, or resource
that can be referenced and to which web services messages can be
addressed. Endpoint references convey the information needed to
address a web service endpoint. Clients need to know this information
before they can access a service.
Typically, web services package endpoint descriptions and use a
WSDL file to share these descriptions with clients. Clients use the
web service endpoint description to generate code that can send SOAP
messages to and receive SOAP messages from the web service
7.2. Creating a Client from WSDL
To create a web service client that can access and consume a web
service provider, you must obtain the information that defines the
interoperability requirements of the web service provider. Providers
make this information available by means of WSDL files. WSDL files may
be made available in service registries or published on the Internet
using a URL (or both). You can use a web browser or NetBeans IDE to
obtain WSDL files.
A WSDL file contains descriptions of the following:
Network services: The description
includes the name of the service, the location of the service,
and ways to communicate with the service, that is, what
transport to use.
Web services policies: Policies
express the capabilities, requirements, and general
characteristics of a web service. Web service providers use
policies to specify policy information in a standardized way.
Policies convey conditions on interactions between two web
service endpoints. Typically, the provider of a web service
exposes a policy to convey conditions under which it provides
the service. A requester (a client) might use the policy to
decide whether or not to use the service.
Web Services Metadata Exchange (WS-MEX) is the protocol for
requesting and transferring the WSDL from the provider to the client.
This protocol is a bootstrap mechanism for communication.
7.3. Client From WSDL Examples
The following sections, found in other chapters of this
tutorial, explain how to create a client from a WSDL file using the
example files in the tutorial bundle: