1、下载axis2-1.6.2-bin.zip 文件,并解压
2、配置环境变量 D:\开发文档\axis2-1.6.2\bin
3、将要转换的wsdl文件加放到bin目录下
4、shift + 鼠标右键 在此处打开命令窗口
5、在cmd窗口输入命令 wsdl2java -uri wsdl文件名 -p 文件地址 例如:wsdl2java -uri B_FScanDF.wsdl -p com.huaxin.serviceclient.bfscandf
6、接口调用
String xmlIn = createXmlin(params);
String url = params.getString("url");
String string;
try {
BaseStub stub = new BaseStub(url);
B_FScanDF b_FScanDF = new B_FScanDF();
b_FScanDF.setInput(xmlIn);
MonitorHeaderE monitorHeaderE = new MonitorHeaderE();
string = stub.b_FScanDF(b_FScanDF, monitorHeaderE).getB_FScanDFResult();
} catch (Exception e) {
// e.printStackTrace();
string = "<query type='error'> <error type='cancel'> <error code='internal-server-error' /> <text> 服务发生错误</text> </error> </query>";
}
return string;