When starting with an existing Web Services Description
Language (WSDL) file, you can use a top-down approach to developing
web services based on the Java API
for XML-Based Web Services (JAX-WS) programming model.
Before you begin
Best practice: IBM® WebSphere® Application
Server supports the Java API
for XML-Based Web Services (JAX-WS) programming model and the Java API for XML-based RPC (JAX-RPC)
programming model. JAX-WS is the next generation web services programming
model extending the foundation provided by the JAX-RPC programming
model. Using the strategic JAX-WS programming model, development of
web services and clients is simplified through support of a standards-based
annotations model. Although the JAX-RPC programming model and applications
are still supported, take advantage of the easy-to-implement JAX-WS
programming model to develop new web services applications and clients.
best-practices
Locate
the WSDL file that defines the web service that you want to implement.
You can develop a WSDL file or obtain one from an existing web service
through email, downloading or a Uniform Resource Locator (URL).
About this task
To develop web services based on the JAX-WS programming
model, you can use a bottom-up development approach starting from
existing JavaBeans or enterprise beans
or you can use a top-down development approach starting with an existing
Web Services Description Language (WSDL) file. This task describes
the steps when using the top-down development approach.
- Considerations when using JavaBeans
-
- JavaBeans exposed as JAX-WS web services
are supported only over an HTTP transport.
- JavaBeans may use Contexts and Dependency
Injection (CDI). Note that constructor injection is not supported.
- Considerations when using enterprise beans
-
- The enterprise bean must be a stateless or singleton session bean.
- Enterprise beans that are exposed as JAX-WS web services must
be packaged in EJB 3.0 or higher modules.
- JAX-WS web service applications containing enterprise beans must
be deployed with the endptEnabler command.
- JAX-WS web services using enterprise beans are supported over
an HTTP or Java Message Service (JMS) transport.
- Enterprise beans may use CDI. Note that constructor injection
is not supported.