Websphere 8.5 web services not deployed

I find it very difficult to get a web service working on Websphere. I have an ejb-jar that has a specific web service using the JAXWS @WebService annotation. This ejb-jar is then packaged in the ear. I successfully placed my ear on Glassfish and gained access to my WebService. However, when I try to deploy the same ear in Websphere 8.5, I do not see the open WebService. What steps should I take to make this ear work in Websphere?

And how do I know which WebServices are available in the Websphere admin console?

thanks

+4
source share
3 answers

To view available web services in a WebSphere cell, from the admin console, select Services, and then Service Providers.

If you deployed an EAR containing a web service and you cannot see that the web service is available in WAS, the best option would be to first look at the WAS logs (regular logs + FFDC logs) to see if the WAS might have a problem with the processing of your class of service (for any reason).

If this does not help, you can configure WAS to extract trace data for JAX-WS operations.

I ran into a similar problem before WAS did not process my web service class and wrote nothing about it in its logs. Only after I installed the trace did I understand what the problem is, which may be similar to the problem you are facing: this is due to the WAS attempt to deploy the JAX-WS service when the following is true:

  • The EAR contains the source code for the JAX-WS service; and
  • An EAR does not contain all the classes needed to compile the web service class (or any of the classes used directly by the web service class).

Explanation : When deploying an EAR in WebSphere and determining the deployment of Web services ( -deployws ), when the EAR contains the source code for your application, WebSphere plays smart and goes ahead and tries to recompile your code. What for? living hell beats out of me, but that's what it is. If WebSphere cannot compile your JAX-WS Web Service class — or any class used by your web service class — it simply refuses, writes nothing to the logs, and your service does not deploy at all.

The only place WebSphere will log this will be in the trace file if JAX-WS tracing has been activated.

(I was considering opening a PMR with IBM for this, but I already had about 10 PMR open at that time ...)

+3
source

I do not use websphere 8.5, but websphere 7 requires one more step before you can access your web services (implemented as stateless e-bit) using soap / http (or JMS) - you should use the tool endptEnabler. Use it on your ear file before deploying it to WAS. Perhaps the same procedure is needed for websphere 8.5.

In my websphere 7 installation, this tool can be found in the [WEBSPHERE] / AppServer / bin directory. Just run it on the command line and expand your ear.

+1
source

How do I find out which WebServices are available in the Websphere admin console?

This works for WebModules that are not part of the EAR (eG deployed as a war directly). If you are deploying WebService as an EAR module: uninstall the EAR, deploy the war separately and follow the instructions below, in the end the URLs match.

  • Open admin cosole and login
  • Anwendungen
  • Geschäftsanwendungen
  • Open web application
  • On the right side you have the "Web-Service-Eigenschaften" area
  • There is a link "WSDL-Dateien veröffentlichen" to open it.
  • Download the zip file.
  • In it you will find wsdl for all active web services in this module.
  • In WSDL you will find the entry <soap:address location= There you have your WebService.

I noticed that this would not work if I did not provide the .wsdl file .wsdl . I did not understand why this is so. Therefore, if you follow these steps, but there is no Web-Service-Eigenschaften block, there are no web services available in this war (from the point of view of WebSpheres). Create a .wsdl file for your web services in your project and deploy it with .war .

0
source

Source: https://habr.com/ru/post/1494582/


All Articles