简体   繁体   中英

implementing a SOAP web service with a wrong wsdl

I am trying to implement a soap ws client in my java application. I have a WSDL file to generate the client stubs. When I implemented the code, I saw that the WSDL file is out of date and I can not get the response as expected in the WSDL. I do not have an option to make the vendor update WSDL.

What are my options to implement the client properly?

Is it possible to fix the WSDL manually or intercept the response before generated codes receive the response?

Thank you.

You can always get the most updated WSDL by accessing the URL from the browser. Since you are able to communicate with the server application I assume you have the server application endpoint.

The URL should be simller to the folliwng

http[s]://(IP or Domain Name)[:port]/.../...?WSDL

Here is an example for a common WSDL online for global weather as an example of how WSDL URL look like

http://www.webservicex.net/globalweather.asmx?WSDL

Additional Details:

You can re-generate the stub classes from WSDL URL directly using many tools like:

Axis

Code Generator Wizard Guide for Eclipse Plug-in

Code Generator Tool Guide for Command Line and Ant Task

Apache CXF

Generate a JAX-WS Web Service Client from a WSDL document using Apache CXF

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM