sun-jaxws.xml - When is it needed and when not?

前端 未结 1 1606
野趣味
野趣味 2021-01-30 17:30

I\'m giving JAX-WS a high overview and noticed some references to sun-jaxws.xml (along with com.sun.xml.ws.transport.http.servlet.WSServletContextListener

相关标签:
1条回答
  • 2021-01-30 18:22

    sun-jaxws.xml is a proprietary deployment descriptor needed when web services are deployed as a standard WAR archive on a non-Java EE5 servlet container using the SUN's reference implementation.

    Sun's RI uses WSServletContextListener as the listener for servlet context events and WSServlet as the dispatcher servlet; both of which have to be declared in web.xml. The sun-jaxws.xml file is then required to define web service end points for the WSServlet to let it know to which end point a service request must be dispatched.

    In this way, web services can be run in any JAX-WS RI enabled servlet container, although they won't be portable.

    Java EE 5+ compliant application servers such as Glassfish, the reference implementation, comply to JSR 109 (Web services 1.2/1.3) and JSR 224 (JAX-WS 2.0/2.1/2.2) and do not require non-standard sun-jaxws.xml deployment descriptors.

    Please see here for more information:

    http://jax-ws.java.net/nonav/2.2.1/docs/UsersGuide.html#1.0_Introduction

    http://www.ibm.com/developerworks/java/library/j-jws9/index.html

    0 讨论(0)
提交回复
热议问题