Implementing web services applications with JAX-RPC
You can use the Java™ API for XML-based RPC (JAX-RPC) programming model to develop web services.
Before you begin
Determine the existing JavaBeans or enterprise beans that you want to expose as a JAX-RPC web service.
最佳作法: 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-practicesAbout this task
To develop web services based on the JAX-RPC 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 bottom-up development approach.
When developing a JAX-RPC web service starting from existing JavaBeans or enterprise beans, you need develop a WSDL file. You can use existing JavaBeans or enterprise beans and then enable the implementation for web services. Enabling the bean for web services includes developing the service endpoint interface, developing a WSDL file that is the description of the web service, generating and configuring the deployment descriptors, assembling all artifacts required for the web service, and deploying the application onto the application server.
- Considerations when using JavaBeans
JavaBeans exposed as JAX-RPC web services are supported only over an HTTP transport.
- Considerations when using enterprise beans
- The enterprise bean must be a stateless session bean.
- Enterprise beans that are exposed as JAX-RPC web services must be packaged in EJB 2.1 or in EJB 3.0 or higher modules.
- For JAX-RPC web services using EJB 2.1 style endpoints, the Web service method parameters must be one of the supported JAX-RPC types. These requirements are documented in the JAX-RPC specification.
- JAX-RPC web services using enterprise beans are supported over an HTTP or Java Message Service (JMS) transport.
最佳作法: It is a best practice to use EJB 2.1 style enterprise beans with JAX-RPC
applications. bprac
Procedure
Results
You have developed a JAX-RPC web service application.
What to do next
After you deploy the EAR file, test the web service to make sure that the service works with the application server.
![[AIX Solaris HP-UX Linux Windows]](../images/dist.gif)
![[IBM i]](../images/iseries.gif)
作業主題