2014-03-26 87 views
3

我一直在瀏覽JAX-WS RI文檔,並且遇到了非Java EE 5 servlet和Java EE 5 servlet容器的術語。非Java EE 5 servlet和Java EE 5 servlet容器之間有什麼區別?

The documentation/samples discusses how to use JAX-WS in a non-Java EE 5 servlet container using a proprietary deployment descriptor sun-jaxws.xml and servlet com.sun.xml.ws.transport.http.servlet.WSServlet. This means that you can run JAX-WS RI applications in any servlet container that has been enabled with the JAX-WS RI. Applications that use the proprietary DD and servlet will run in a JAX-WS RI enabled Java EE 5 servlet container, but they will be non-portable. If you wish to use JAX-WS in a Java EE container in a Java EE portable manner you need to use the standard Java EE 5 deployment descriptor; please refer to the Java EE 5 or Glassfish documentation/samples

那麼究竟是非Java EE 5的servlet和Java EE 5的servlet容器?是否因爲不同的java和servlet規範版本?

回答

2

在J2EE介紹JAX-WS實現5
非全如Tomcat J2EE servlet容器不理解太陽jaxws.xml,
所以你需要添加庫,使其工作。

+0

這是否意味着Java EE 5 servlet容器帶有自己的Jax-Ws API實現? – user68883

+0

@ user68883,是http://en.wikipedia.org/wiki/Java_API_for_XML_Web_Services#Implementations和Metro是參考實現。 – chro

+0

這不僅是JAX-WS。有更多的API不包含在非JEE容器中。例如,EJB3。 – kaqqao

0

不確定,但我將它讀作「在Java EE 5 servlet容器之前的版本中」,例如, J2EE 1.4 servlet容器