When I try to use wsimport
using the below command from command prompt, it's working fine:
wsimport -d generated C:\Users\generated\wsdlfile.xml
However, when I try to use wsimport
as below, it's throwing the following error:
wsimport -d generated https://example.com/exampleService.svc?wsdl
Failed to read the WSDL document: https://example.com/exampleService.svc?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.
I can access the URL from a browser, and the same thing is working from other systems (from my PC). What could be the reason?