Problem calling a web service from a JBOSS EJB service

I have a simple web service sitting on our internal network. I used SOAPUI to do a little testing, generated service classes from WSDL, and wrote some Java code to access the service. Everything went as expected, as I was able to create service proxy classes and make calls. Pretty simple stuff. The only speed hit was java to trust the certificate from a web service machine. This was not a technical issue, but rather a lack of experience with SSL-based web services. Now about my problem. I encoded a simple EJB service and deployed it to JBoss Application Server 4.3 and now got the following error in the code that previously worked.

12:21:50,235 WARN  [ServiceDelegateImpl] Cannot access wsdlURL: https://WS-Test/TestService/v2/TestService?wsdl

I can access the wsdl file from a web browser running on the same computer as the application server using the URL in the error message. I can also run code that accesses a web service outside of the application server on the same computer as the application server (but not from the inside). I don’t understand where to go from here. I included debug logs in JBOSS and got nothing more than what I showed above. I did some searches on the net and found the same error in some questions, but these questions had no answers. Web service classes generated using JAX-WS 2.2 using the wsimport ant task and placed in a jar, which is included in the ejb package. JBoss is deployed in RHEL 5.4. I posted this on the JBOSS community forum forum , but there were no answers to this question.

+1
source share
1 answer

Having looked at ServiceDelegateImpl, he tries:

InputStream is = wsdlURL.openStream ();

where wsdlURL is nonzero URL. This means that the problem is openStream(). I expect the problem will be with the https root certificate; I can imagine that JBoss has its own supply of valid root certificates somewhere and that your root is missing there.

What I would do to verify this is to deploy the service on an HTTP server and make wsdlURL a URL http. If this works, this is the SSL level.

If this is the SSL level, try manually adding keyStore, specifying it on the command line, as in the answer to this SO question .

+1

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


All Articles