简体   繁体   English

JAX-WS和sun-jaxws.xml

[英]JAX-WS and sun-jaxws.xml

I have read a lot of posts on public forums about deploying JAX-WS on different servet containers and I have following questions/queries based on that. 我已经在公共论坛上阅读了很多关于在不同的服务容器上部署JAX-WS的帖子,基于此我有以下问题/疑问。

Following is my understanding : 以下是我的理解:

1) sun-jaxws.xml is required ONLY BY Sun's RI (metro project) since com.sun.xml.ws.transport.http.servlet.WSServletContextListener class needs it. 1)Sun的RI(地铁项目)仅需要sun-jaxws.xml因为com.sun.xml.ws.transport.http.servlet.WSServletContextListener类需要它。 (looking at source for this class , it reads this file from hardcoded location). (查看此类的源代码,它从硬编码位置读取此文件)。

2)It is also required if servlet container is not Java EE 5 compliant. 2)如果servlet容器不Java EE 5 compliant. ,则也是必需的Java EE 5 compliant.

3)Different application servers like Jboss , GlassFish can use their own JAX-WS implementations (like Apache CXF,Metro ) 3)像Jboss , GlassFish这样的不同应用服务器可以使用自己的JAX-WS实现(例如Apache CXF,Metro

So my questions are : 所以我的问题是:

1)If I use Sun's RI (metro) on Java EE 5 container like JBoss or GlassFish , do I still need to use sun-jaxs.xml ? 1)如果我在Java EE 5容器(如JBoss或GlassFish)上使用Sun的RI(地铁),是否还需要使用sun-jaxs.xml

2)If I develope JAX-WS web service on Java EE 5 container like Jboss , can it be portable to another Java EE 5 container like GlassFish. 2)如果我在Java EE 5容器(如Jboss)上开发JAX-WS Web服务,可以将其移植到GlassFish等另一个Java EE 5容器中。 What I mean is can I deploy the war as it is on another container ? 我的意思是我可以像在另一个容器上一样部署战争吗?

Please help me sort out above queries since I am really confused about Sun's RI and sun-jaxws.xml descriptor usage. 由于我对Sun的RI和sun-jaxws.xml描述符的使用感到非常困惑,请帮助我对以上查询sun-jaxws.xml

Application servers have own web service client frameworks. 应用服务器具有自己的Web服务客户端框架。 You can think these are like jaxws. 您可以认为它们就像jaxws。 When you deploy an app to app server default option app server use own framework for web service call. 将应用程序部署到应用程序服务器默认选项时,应用程序服务器使用自己的Web服务调用框架。 Therefore if server need a configuration file like as sun-jaxws.xml you must put it relevant directory. 因此,如果服务器需要像sun-jaxws.xml这样的配置文件,则必须将其放在相关目录下。 But I dont think you need it. 但我认为您不需要它。

Second option is configuring the app server for using your third part jax-ws library. 第二种选择是配置应用服务器以使用您的第三部分jax-ws库。 It is an extra option. 这是一个额外的选择。 For example I made in WAS. 例如我在WAS中制作。 Because of that when you choose this choice you must use sun-jaxws.xml 因此,选择此选项时,必须使用sun-jaxws.xml

Hopefully I have been clear in my answer :) 希望我的回答很清楚:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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