Implementing web services applications from existing WSDL files with JAX-WS
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
最佳作法: IBM® WebSphere® Application Server 支援 Java API for XML 型 Web 服務 (JAX-WS) 程式設計模型和 Java API for XML 型 RPC (JAX-RPC) 程式設計模型。JAX-WS 是延伸 JAX-RPC 程式設計模型所提供之基礎的下一代 Web 服務程式設計模型。
當使用策略性 JAX-WS 程式設計模型時,透過支援標準型註釋模型,簡化了 Web 服務和用戶端的開發工作。
雖然仍支援 JAX-RPC 程式設計模型和應用程式,但請利用易於實作的 JAX-WS 程式設計模型來開發新的 Web 服務應用程式和用戶端。best-practicesLocate 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.
Procedure
Results
You have created a JAX-WS web service by starting with an existing WSDL file.

作業主題