JavaToWS指令:
JavaToWS.main(new String[]{"-o","material.wsdl","-wsdl",IMaterialUpdateWebServiceBean.class.getName()});
java代码生成wsdl文件指令,-o代表在根目录生成,第二个为文件名,最后一个味生成webService的接口类名,生成后把
默认的<soap:address location=">改为
<soap:address location="http://10.33.45.32/services/materialUpdate" />,即把location改为部署服务器的service地址就好了。
WSDLToJava 指令:
WSDLToJava.main(new String[]{"-client","-d","src","material.wsdl"});
wsdl文件生成java调用代码,生成后把material.wsdl文件拷贝到调用代码目录就ok了,不然它会报错,说找不到wsdl文件
当然如果以下面方式就不用担心了,直接一步到位生成java调用代码:
WSDLToJava.main(new String[]{"-client","-d","src","http://10.33.45.32/services/materialUpdate?wsdl"});