package sample;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
public class Sample {
public static void main(String [] args) throws Exception {
Call call = (Call)new Service().createCall();
call.setTargetEndpointAddress(new URL("http://xxxx/interface/Dispatch.asmx"));
call.setOperationName(new QName("http://tempuri.org/","GetSress3"));
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://tempuri.org/GetSress3");
call.addParameter(new QName("http://tempuri.org/", "User"),XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter(new QName("http://tempuri.org/", "Pass"),XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter(new QName("http://tempuri.org/", "MobilePhone"),XMLType.XSD_STRING, ParameterMode.IN);
call.addParameter(new QName("http://tempuri.org/", "Type"),XMLType.XSD_STRING, ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);
Object result = call.invoke(new String[]{"Ha", "124443", "1233443123122", "14"});
System.out.println(result);
}
}