How can I generate a WSDL file from a WSDL URL?

emre picture emre · Jan 13, 2014 · Viewed 21.3k times · Source

My problem is that I created a web service client with wsimport and when creating its service object, it fails because of the HTTPS, like that:

MyService_Service service = new MyService_Service(
                                new URL("https://www.aaa.com/myws/MyService?WSDL"));

So, I am trying to initialize a service object from a WSDL file, but how can I create a WSDL file from that URL "https://www.aaa.com/myws/MyService?WSDL"?

Thanks a lot.

Answer

M21B8 picture M21B8 · Jan 13, 2014

Navigate to the URL in a browser and save the file it generates. You'll need to make sure you also save any schemas imported by the wsdl.