notifysms.java~6~

来自「电信ISAG的服务连接和服务」· JAVA~6~ 代码 · 共 45 行

JAVA~6~
45
字号
package test.smsTest;import java.net.URL;import cn.com.chinatelecom.www.wsdl.ctcc.sms.notification.v2_1.service.SmsNotificationServiceLocator;import cn.com.chinatelecom.www.wsdl.ctcc.sms.notification.v2_1._interface.SmsNotification;import cn.com.chinatelecom.www.schema.ctcc.sms.v2_1.SmsMessage;import org.apache.axis.types.URI;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2006</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class notifySms {  public notifySms() {  }  public static void main(String ag[]){    try {      //URL url = new URL("http://10.40.58.252:8088/");      URL url = new URL("http://localhost:8092/spWeb/services/SmsNotification");      SmsNotificationServiceLocator snsl = new SmsNotificationServiceLocator();      SmsNotification sn = snsl.getSmsNotification(url);      java.lang.String correlator = "123";      SmsMessage message  = new SmsMessage();      message.setMessage("你好世界!");      message.setSenderAddress(new URI("tel:1111111"));      message.setSmsServiceActivationNumber(new URI("tel:3434"));      sn.notifySmsReception(correlator,message);      System.out.println("end");    }    catch (Exception ex) {      ex.printStackTrace();    }  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?