1.首先利用Apache组织开发的Axis组件编译你所要调查的方法(以jws结尾).它所生的wsdl文件路径(http://localhost:8080/axis/MyMath.jws?wsdl)
2.然后可以在你的项目中调用了:
public class MyMathCleint {
private static final String endPoint = "http://localhost:8080/axis/MyMath.jws?wsdl";
public static void main(String[] args) {
Service service = new Service();
try{
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new URL(endPoint));
Integer result =(Integer)call.invoke("Squert",new Object[]{new Integer(10)});
System.out.println("result"+result);
}catch(ServiceException e){
e.printStackTrace();
}catch(MalformedURLException e){
e.printStackTrace();
}catch(RemoteException e){
e.printStackTrace();
}
}
}