下载地址 http://mirrors.shuosc.org/apache/axis/axis/java/1.4/ 下载axis文件解压在目录文件中新建 axis2java.bat 文件内容 set Axis_Lib=.\libset Java_Cmd=java -Djava.ext.dirs=%Axis_Lib%%Java_Cmd% org.apache.axis.wsdl.WSDL2J
下载地址 http://mirrors.shuosc.org/apache/axis/axis/java/1.4/
下载axis文件解压在目录文件中新建 axis2java.bat
文件内容
set Axis_Lib=.\lib set Java_Cmd=java -Djava.ext.dirs=%Axis_Lib% %Java_Cmd% org.apache.axis.wsdl.WSDL2Java -p com.lmb.client.ws C:\Users\Administrator\Desktop\ticketService.wsdl pausecom.lmb.client.wscom.lmb.client.ws 表示产生的文件路径相对于当前路径
将文件和lib下的jar包加入到项目中去 再加上mail.jar和activation.jar
调用时的代码
public static void main(String[] args) throws ServiceException { TicketService_Service service = new TicketService_ServiceLocator(); TicketService_PortType stub = service.getTicketService(); VoucherQueryRequest voucherQueryRequest = new VoucherQueryRequest(); voucherQueryRequest.setACT_ID(""); VoucherQueryResponse respone = null; try { respone = stub.voucherQuery(voucherQueryRequest); } catch (RemoteException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println(respone.getResult()); }