Jax-ws web service does not work in websphere 8.5

There was an attempt to get the jax-ws web service running in websphere 8.5 but without success. I tried Java bean and military packaging, ejb packaging and jar stateless, but it just doesn't work.

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

I do not generate any additional artifacts. I allow the search for websphere during deployment. There are no errors during deployment. After deployment, I try to run wsdl in a browser to make sure the web service is installed successfully, but I received nothing.

Not sure if I am doing something wrong during deployment or something else. Let me know if you would like more information.

Hello,

+4
source share
2 answers

In fact, websphere 8.5 corresponds to Java EE 6, which means that the container must scan the classpath of the web application to find the annotated @webservice classes and deploy them as running web services.

However, depending on the servlet specification used (given in the web.xml file), scanning will not be performed: it should be automatically performed starting from version 2.5 of the specification.

For older web applications, the Websphere solution must place a special attribute in the MANIFEST.MF of the corresponding war: the UseWSFEP61ScanPolicy key and true. See here for more details.

The servlet 3.0 specification also has a parameter that controls scanning (this is usually used to speed up the initialization of a cold start of an application). Inserting metadata-complete = "true" in the root tag of your web.xml 3.0 deployment descriptor will prevent crawling (and false allows)

+2
source

I more or less worked in the same problem as yours, but on WAS 8.0.

Make sure your web.xml is written for the Servlet 3.0 specification. I used web.xml for Servlet 2.4 and upgraded to version 3.0, fixed the problem for me.

Hope this helps ...

+1
source

All Articles