1,593
社区成员
发帖
与我相关
我的任务
分享
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import javax.xml.namespace.QName;
import javax.xml.rpc.ServiceFactory;
import java.net.URL;
public class Client_testSMS {
public static void main(String [] args) throws Exception {
// 指出service所在URL
String endpoint = "http://181.5.xxx.xxx:8080/services/Sms";
// 创建一个服务(service)调用(call)
Service service = new Service();
Call call = (Call) service.createCall();// 通过service创建call对象
// 设置service所在URL
call.setTargetEndpointAddress(new java.net.URL(endpoint));
// 方法名(processService)与MyService.java方法名保持一致
//call.setOperationName("DoSendMobilePaper");
call.setOperationName("send");
// Object 数组封装了参数,参数为"This is Test!",调用processService(String arg)
String ret = (String) call.invoke(new Object[]{"mycp","test,test","123,123","158xxx88888","sms测试中文"});
System.out.println(ret);
}
}
HTTPRIO1.URL:='http://181.5.xxx.xxx:8080/services/Sms?wsdl';
edit1.Text:=(HTTPRIO1 as Sms).send('mycp','test,test','123,123','158xxx88888,'测试短信');