Error when I try to create files using wsimport on a WSDL exposed over https

998 views Asked by At

I am using Apache Geronimo Server for my Development. I need to generate code from a WSDL exposed over https. I used the following command:

wsimport -keep -verbose https://devurl:7443/process-engine/soap/CustomerByNumber_v1?wsdl

But I am getting this error:

parsing WSDL...

[ERROR] Received fatal alert: protocol_version

Failed to read the WSDL document: https://devurl:7443/process-engine/soap/CustomerByNumber_v1?wsdl, because 1) could not find the document; /2) the document could not be read; 3) the root element of the document is not wsdl:definitions.

[ERROR] failed.noservice=Could not find wsdl:service in the provided WSDL(s):

At least one WSDL with at least one service definition needs to be provided.

Failed to parse the WSDL.

When we hit the WSDL URLs it has a username/password authentication.

How can I solve this problem?

1

There are 1 answers

7
Bogdan On

The error message mentions the possible reasons:

  1. could not find the document;
  2. the document could not be read;
  3. the root element of the document is not <wsdl:definitions>.

You mention that the service requires username/password authentication. Is that the case for accesing the WSDL also? So the protocol might not necessarily be the problem.

Do the following:

  • open the WSDL URL in the browser. Your browser will have no issue with HTTPS.
  • provide username/password if it is required to access the WSDL.
  • make sure the document that opens is a WSDL and contains a <wsdl:definitions> root element.
  • download the WSDL to your computer with a .wsdl extension.
  • use wsimport with this file: wsimport -keep -verbose yourSavedFile.wsdl