📄 sptest.java
字号:
package test.cngp;
import java.io.IOException;
import org.apache.log4j.Logger;
import com.grail.comm.cngp.message.CNGPSubmitMessage;
import com.grail.comm.cngp.message.CNGPSubmitRespMessage;
import com.grail.smproxy.CNGPSMProxy;
import com.grail.util.Args;
import com.grail.util.Cfg;
/**
* <p>
* Title: CMCA 项目
* </p>
* <p>
* Description:
* </p>
* <p>
* Copyright: Copyright (c) 2004 arefa
* </p>
* <p>
* Company: arefa
* </p>
* <p>
* 所有类均以开源项目为基础,感谢他们对 JAVA 世界作出的贡献
* </p>
*
* @author lyw / 刘有位
* @version 1.0
*/
public class SpTest {
/**
* Logger for this class
*/
private static final Logger logger = Logger.getLogger(SpTest.class);
public static void main(String[] args) {
Args arg = null;
try {
arg = new Cfg("app.xml").getArgs("CNGPConnect");
} catch (IOException e) {
e.printStackTrace();
}
CNGPSMProxy proxy = new CNGPSMProxy(arg);
String info = "你好吗";
String[] rcvMobile = new String[3];
rcvMobile[0] = "02482630655";
rcvMobile[1] = "02481675881";
rcvMobile[2] = "02481675881";
CNGPSubmitMessage msg = new CNGPSubmitMessage("3024617409", 1, 1, 1,
"test", "01", 0, "8", 15, null, null, "02411111111", "02411111111",
rcvMobile.length, rcvMobile, info.getBytes().length, info, 0);
try {
CNGPSubmitRespMessage respMsg = (CNGPSubmitRespMessage) proxy.send(msg);
logger.debug(respMsg.toString());
} catch (IOException e1) {
e1.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -