0

We have deployed our webservice in liberty server.Earlier it was on IBM WAS. After deploying in liberty, we came to know that Webservices is running on CXF webservice framework. In WAS, it was Axis framework. Another difference is that , changes happened in wsdl url & content. The old wsdl url is http://localhost:8080/Hello/HelloServices/Helloservices.wsdl and it contains xsd schema definition.

In the liberty server above wsdl url is not working and throwing file not found. But if we try to invoke http://localhost:8080/Hello/HelloServices?wsdl it's working.

Could anyone tell why old url is not working in New server. Is it due to server or inbuilt cxf framework in server.

Another team is using wsdl url to consume this webservice, with this new url they are not able to achieve it.

Any thoughts or suggestions are appreciated..

Thanks in Advance

Geetha
  • 1
  • 1

1 Answers1

0

The main reason for this is the change in the JAX-WS implementations used by the different WebSphere profiles. CXF, unfortunately, hard codes the WSDL url to append ?wsdl in several locations and so this is something that is not possible to change in configuration. The easiest solution would to add a ServletFilter to check the incoming request url for http://localhost:8080/Hello/HelloServices/Helloservices.wsdl and then redirect the request to http://localhost:8080/Hello/HelloServices/Helloservices?wsdl.

There's a good SO post that shows how to write a ServletFilter to redirect here:

How to use a servlet filter in Java to change an incoming servlet request url?

The other option would be to have the client side update either their code or configuration to account for the change to the WSDL URL.

  • Thankyou Thomas. But we could see the changes in WSDL content. For example, in WAS deployed service, for one of the method it shows 4 required properties whereas in Liberty it shows 5 required properties. This is happening when we try to import the WSDL's in Soap UI or whoever is using this wsdl for client connection. Could you advise here – Geetha Jan 10 '22 at 13:23
  • @Geetha do you mean that specific method signatures have changed when you deploy the service on Liberty? Could you provide an example? – Thomas Johnson Jan 10 '22 at 16:37
  • yes, method signature changed. – Geetha Jan 25 '22 at 16:25