import org.apache.axis.client.Service;
import org.apache.axis.client.Call;
import javax.xml.namespace.QName;
public class TestNetService {
public TestNetService() {
}
public static void main(String[] args) {
try {
Integer i = new Integer(1);
Integer j = new Integer(2);
String endpoint="http://localhost/HelloService/Service1.asmx";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new (endpoint));
call.setOperationName(new QName("http://,"AddInt"));
call.addParameter("a",org.apache.axis.encoding.XMLType.XSD_DATE,javax.xml.rpc.ParameterMode.IN);
call.addParameter("b",org.apache.axis.encoding.XMLType.XSD_DATE,javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_INT);
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://);
Integer k = (Integer)call.invoke(new Object[]{i,j});
System.out.println( "result is " + k.toString() + ".");
}
catch (Exception e) {System.err.println(e.toString());}
}
}
只能给你提供这么多了,详细的资料还需要自己多费心去找