当我尝试从命令提示符使用以下命令使用wsimport
时,它可以正常工作:
当我尝试使用下面的命令从命令提示符中使用wsimport
时,它可以正常工作:
wsimport -d generated C:\Users\generated\wsdlfile.xml
但是,当我尝试使用以下命令wsimport
时,它会抛出以下错误:
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.
我可以从浏览器中访问该URL,而且其他系统(来自我的PC)也可以正常工作。可能的原因是什么?