JAX-WS application deployment model
The administration function of the product is enhanced to support installing and deploying Java™ Application Programming Interface (API) for XML Web Services (JAX-WS) applications like any other WebSphere® Application Server applications.
A JAX-WS application is packaged as a web application archive (WAR) file or a WAR module within an Enterprise Archive (EAR) file. The JAX-WS application deployment model is similar to the Java API for XML Remote Protocol Call (JAX-RPC) web services application model. The main differences are JAX-RPC web services application requires you to add additional bindings and deployment descriptors for application deployment. A JAX-WS application does not require additional bindings and deployment descriptors for deployment. You can deploy your JAX-WS applications as you would deploy any other WebSphere Application Server application.
JAX-WS web services is a rewrite of JAX-RPC web services. The table compares the web services stack for both JAX-WS and JAX-RPC web services.
JAX-RPC web services | JAX-WS web services |
---|---|
Bindings are proprietary | Bindings are based on the open source Java API for XML Bindings (JAXB) |
Parsing is proprietary | Parsing is based on the open source Java Specification Request (JSR) 173 |
No Java annotations support | Support for Java annotations such as @WebService, @WebMethod, @WebParam, @WebResult, and @SOAPBinding |
During deployment, some deployment descriptor files are created
in a JAX-RPC based service and client. The following files are
created on the services side, when it is an EJB based web service
and EJB based module:
When the service is a JavaBeans-based or web module-based
service, the following files and deployment descriptors are required:
The web.xml exists in both EJB and JavaBeans based services. However, there
is no additional content added to the file during deployment of a
Web service application or module.
|
對於 JAX-WS Web 服務,webservices.xml 部署描述子是選用的,因為您可以利用註釋來指定部署描述子檔所包含的所有資訊。 您可以使用部署描述子檔來擴增或置換現有的 JAX-WS 註釋。 webservices.xml 部署描述子所定義的任何資訊會置換註釋所指定的任何對應資訊。 |
從 WebSphere Application Server 7.0 版和更新的版本開始,系統會掃描 Java EE 5 應用程式模組(Web 應用程式模組 2.5 版或更新版本,或是 EJB 模組 3.0 版或更新版本)中是否有註釋可識別 JAX-WS 服務和用戶端。 不過,為了效能考量,依預設,系統不會掃描 Java EE 5 之前的應用程式模組(Web 應用程式模組 2.4 版或更早版本,或 EJB 模組 2.1 版或更早版本)中是否有 JAX-WS 註釋。在 6.1 版 Feature Pack for Web Services 中,預設行為是在應用程式安裝期間,掃描 Java EE 5 之前的 Web 應用程式模組來識別 JAX-WS 服務,以及掃描 Java EE 5 之前的 Web 應用程式模組和 EJB 模組,來尋找服務用戶端。由於 WebSphere Application Server 7.0 版及更新版本的預設行為是不在安裝應用程式或啟動伺服器期間掃描 Java EE 5 之前的模組是否含有註釋,因此為了保留與舊版特性套件的舊版相容性,您必須在伺服器上配置 Web 應用程式保存檔 (WAR) 的 META-INF/MANIFEST.MF 中的 UseWSFEP61ScanPolicy 內容或 EJB 模組,或定義 Java 虛擬機器自訂內容 com.ibm.websphere.webservices.UseWSFEP61ScanPolicy,來要求在安裝應用程式及啟動伺服器期間進行掃描。如果要進一步瞭解註釋掃描,請參閱 JAX-WS 註釋資訊。