C:/Users/zhangya>wsimport -d E:/temp -keep -verbose -p test http://localhost:8888/ns?wsdl -keep -verbose -p test http://localhost:8888/ws01?wsdl-d <directory> specify where to place generated output files(指定生成文件的路径)-verbose output messages about what the compiler is doing(输出详细信息)-keep keep generated files(生成java文件,不带此参数将只生成class文件)-p <pkg> specifies the target package 生成代码的目标包执行上面命令生成如下代码
编写测试类
package test;public class Test { public static void main(String[] args) { MyServiceipmlService msis = new MyServiceIpmlService(); IMyService ms = msis.getMyServiceIpmlPort(); ms.minus(10,1); } }
新闻热点
疑难解答