简体   繁体   中英

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

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 and com.sun.xml.ws.transport.http.servlet.WSServlet ).

In what situations is this needed? (I think JSR 109 servers?!)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM