import javax.xml.namespace.QName;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.rpc.ParameterMode;
public class TelWebService {
// String result = null;
String outxml = null;
public TelWebService() {
}
public String querySSHFFee(String areaCode, String phoneNumber) {
try {
String strXML="<?xml version=\"1.0\" encoding=\"utf-8\" ?><list><obj> ";
strXML +="<AreaId>"+ areaCode + "</AreaId>" + "<Number>"+ phoneNumber + "</Number>";
strXML+="</obj></list>";
String endpoint="http://loaclhost/InterfaceWs/SMService.asmx";
Service service = new Service();
Call call = (Call)service.createCall();
call.setTargetEndpointAddress(new java.net.URL(endpoint));
call.setOperationName(new QName("http://tempuri.org/SU","FeeTotalQueryXml"));
call.addParameter("strXML",org.apache.axis.encoding.XMLType.XSD_STRING,javax.xml.rpc.ParameterMode.IN);
call.setReturnType(org.apache.axis.encoding.XMLType.XSD_STRING);
call.setUseSOAPAction(true);
call.setSOAPActionURI("http://tempuri.org/Rpc");
outxml = (String)call.invoke(new Object[]{strXML});
}
catch (Exception e) {System.err.println(e.toString());}
return outxml;
}