jax-ws Web服务在websphere 8.5中不起作用 [英] jax-ws web service does not work in websphere 8.5

查看:195
本文介绍了jax-ws Web服务在websphere 8.5中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

试图让jax-ws web服务在websphere 8.5中运行但没有成功。
我试过Java bean&战争包装,无国籍的ejb&罐子包装,但它只是不起作用。

Been trying to get jax-ws web service working in websphere 8.5 but no success. I have tried Java bean & war packaging, stateless ejb & jar packaging but it just does not work.

我试图让它与@webservice注释一起使用。

I am trying to get it work with @webservice annotation.

我没有产生任何额外的工件。我让websphere在部署期间弄明白了。在部署期间没有错误。部署之后,我尝试在浏览器中运行wsdl以查看Web服务是否已成功安装但我什么都没得到。

I am not generating any extra artifacts. I am letting websphere figure out during the deployment. During deployment there is no error. After deployment, I try to run wsdl in the browser to see if web service is installed successfully but I get nothing.

在部署期间我不确定是否出错或者是其他东西。
如果您想要更多信息,请告诉我。

Not sure if I am doing something wrong during the deployment or something else. Let me know if you want more info.

问候,

推荐答案

实际上,websphere 8.5符合Java EE 6,这意味着容器应该扫描Web应用程序的类路径以查找@webservice注释类并将它们部署为正在运行的Web服务。

Actually websphere 8.5 is Java EE 6 compliant which means that the container should scan the classpath of the web application to find @webservice annotated classes and deploy them as running web services.

但是,根据您使用的servlet规范(在web.xml文件中给出),扫描不会发生:它应该从规范的2.5版本开始自动进行。

However depending on the servlet specification you are using (given in the web.xml file) the scanning will not take place : it should automatically take place starting from version 2.5 of the specification.

对于较旧的Web应用程序,Websphere解决方案是在相关战争的MANIFEST.MF中放置一个特殊属性:关键是UseWSFEP61ScanPolicy,值为true。
参见这里了解更多详情。

For older web applications the Websphere solution is to put a special attribute in the MANIFEST.MF of the related war : the key is UseWSFEP61ScanPolicy and the value true. see here for more details.

servlet 3.0规范还有一个控制扫描的参数(通常是用于加速应用程序的冷启动初始化)。将metadata-complete =true放在web.xml 3.0部署描述符的根标记中将阻止扫描发生(并且false启用它)

The servlet 3.0 specification also has a parameter controlling the scanning (it is usually used to speed up the cold start initialization of the application). Putting metadata-complete="true" in the root tag of your web.xml 3.0 deployment descriptor will prevent the scanning to happen (and false enables it)

这篇关于jax-ws Web服务在websphere 8.5中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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