jax-ws web service does not work in websphere 8.5

2019-04-30 19:09发布

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.

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

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.

Regards,

4条回答
男人必须洒脱
2楼-- · 2019-04-30 19:22

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.

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.

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.

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)

查看更多
The star\"
3楼-- · 2019-04-30 19:31

I was more or less running into the same issue you have, but on WAS 8.0.

Make sure that your web.xml is written for the Servlet 3.0 specification. I was using a web.xml for Servlet 2.4 and updating the version to 3.0 fixed the issue for me.

Hope this helps...

查看更多
我命由我不由天
4楼-- · 2019-04-30 19:34

Make sure you java runtime and project facet are 1.6 if you are using WAS 8.0.

查看更多
孤傲高冷的网名
5楼-- · 2019-04-30 19:36

Faced similar problem with WAS8.5 It was due to annotation scanning done by both WAS and application. After disabling WAS annotation scanning with "DisableIBMJAXWSEngine" application is able to start.

DisableIBMJAXWSEngine: true
查看更多
登录 后发表回答