I am having a tough time getting a web service working on Websphere. I have an ejb-jar that has a defined web service, using the JAXWS annotation @WebService. This ejb-jar is then packaged into an ear. I have successfully deployed the ear onto Glassfish and have been able to access my WebService. However, when I try to deploy that same ear into Websphere 8.5, I don't see any exposed WebService. What are the steps I need to take to make this ear work in Websphere?
And how do I view what WebServices are available in the Websphere admin console?
Thanks
In order to view the available Web Services in the WebSphere cell, from the admin console, select Services and then Service Providers.
If you deployed an EAR containing a Web Service and you can't see the Web Service as being available in WAS, your best bet would be to first look at the WAS logs (regular logs + the FFDC logs) to see maybe WAS had a problem processing your service class (for whatever reason).
If that doesn't help, you can configure WAS to emit trace data for JAX-WS operations.
I encountered a similar problem before when WAS didn't process my Web Service class and wrote nothing about it to its logs. Only once I set up a trace, I figured out what the problem was, which may be similar to the problem you're having: it had to do with WAS trying to deploy a JAX-WS service when the following are true -
Explanation: when you deploy an EAR to WebSphere and specify that Web Services should be deployed (
-deployws
) when the EAR contains the source code for your application, WebSphere plays smart and goes ahead and tries to recompile your code. Why? beats the living hell out of me but it is what it is. If WebSphere fails to compile your JAX-WS Web Service class - or any class being used by your Web Service class - it simply gives up, writes nothing to the logs and your service doesn't get deployed at all.The only place where WebSphere would log this would be into a trace file, if the JAX-WS trace was activated.
(I was considering to open a PMR with IBM for this, but I already had about 10 PMRs open at that time...)
This works for WebModules that are not within an EAR (e.G. deployed as war directly). If you deploy the WebService as a Module of an EAR: deinstall the EAR, deploy the war separately and follow the steps below, the URLs are the same in the end.
<soap:address location=
There you have your WebService.I noticed that this won't work if I didn't provide a
.wsdl
File myself. I haven't figured out why that is, though. So if you are following this steps but there is no "Web-Service-Eigenschaften" block, then there are no Web Services in this war available (from WebSpheres point of view). Create a .wsdl File for your webservices in your project and deploy it with the.war
.I don't use websphere 8.5 but in websphere 7 there is one additional step required before you can access your web services (implemented as stateless ejb) by using soap/http (or JMS) - you must use endptEnabler tool. Use it on your ear file before deploying to WAS. Maybe the same procedure is needed on websphere 8.5.
In my websphere 7 installation the the tool can be found in [WEBSPHERE]/AppServer/bin directory. Just run it on command line and deploy the ear.