sun-jaxws.xml - 何时需要,何时不需要? [英] sun-jaxws.xml - When is it needed and when not?

查看:1133
本文介绍了sun-jaxws.xml - 何时需要,何时不需要?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在给JAX-WS一个高概述,并注意到对 sun-jaxws.xml 的一些引用(以及 com.sun.xml) .ws.transport.http.servlet.WSServletContextListener com.sun.xml.ws.transport.http.servlet.WSServlet )。

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).

在什么情况下需要这个? (我认为JSR 109服务器?!)

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

推荐答案

sun-jaxws.xml 是使用SUN的参考实现将Web服务部署为非Java EE5 servlet容器上的标准 WAR 存档时所需的专有部署描述符。

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的RI使用 WSServletContextListener 作为servlet上下文事件的监听器和 WSServlet 作为调度程序servlet;两者都必须在 web.xml 中声明。然后需要 sun-jaxws.xml 文件来定义 WSServlet 的Web服务端点,让它知道哪个端点必须分派服务请求。

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.

通过这种方式,Web服务可以在任何 JAX-WS RI启用的servlet容器中运行,尽管他们赢了不便携。

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+标准的应用服务器,例如 Glassfish,参考实现,符合JSR 109( Web服务1.2 / 1.3 )和JSR 224( JAX-WS 2.0 / 2.1 / 2.2) )并且不需要非标准的 sun-jaxws.xml 部署描述符。

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

这篇关于sun-jaxws.xml - 何时需要,何时不需要?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆