移动二次开发(openMas)cxf根据服务地址使用wsdl2java生成存根报错
C:\Users\DELL>wsdl2java -p org.tempuri -d E:\workspace\ship\src -impl -client ht
tp://111.1.3.11:9080/OpenMasService?wsdl
WSDLToJava Error: org.apache.cxf.wsdl11.WSDL
RuntimeException: Fail to create wsd
l definition from : http://111.1.3.11:9080/OpenMasService?wsdl
Caused by : WSDLException (at /wsdl:definitions/wsdl:import): faultCode=PARSER_E
RROR: Problem parsing 'http://127.0.0.1:9080/OpenMasService?wsdl=wsdl0'.: java.n
et.
ConnectException: Connection refused: connect
------解决方案--------------------不太记得这个语法了,import导入的这个路径是会动态去取的(一般是不是会在WSD文件?),你这个wsdl文件会去加载http://127.0.0.1:9080/OpenMasService?wsdl=wsdl0这个东西,但是事实上这个路径是非法的,根本就加载不到,所以路径应该是出在http://127.0.0.1:9080/OpenMasService?wsdl=wsdl0这个上面,不是wsdl发布的路径上面,楼主再看看吧