📄 playtext.java
字号:
package test.acTest;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2005</p> * <p>Company: </p> * @author not attributable * @version 1.0 */import java.net.URL;import cn.com.chinatelecom.www.wsdl.ctcc.audio_call.v2_1.service.*;import cn.com.chinatelecom.www.wsdl.ctcc.audio_call.v2_1._interface.*;import cn.com.chinatelecom.www.schema.ctcc.common.v2_1.ChargingInformation;import cn.com.chinatelecom.www.schema.ctcc.audio_call.v2_1.*;import java.math.*;import org.apache.axis.types.URI;public class playText { public playText() { } public static void main(String[] args) { try { URL url = new URL("http://215.152.1.115:8086/sagWeb/services/AudioCall"); AudioCallServiceLocator locator = new AudioCallServiceLocator(); AudioCall service = locator.getAudioCall(url); URI address = null; String text = "test playTextMessage"; String language = "cn"; ChargingInformation charging = null; //异常测试:电话号码长度为0// address = new URI("tel:"); //异常测试:电话号码长度超长// address = new URI("tel:139777701110000139777701110000"); //异常测试:电话号码编码不对,"tel:" address = new URI("tel:13977770111"); charging = new ChargingInformation(); charging.setCode("code"); charging.setCurrency("RMB"); charging.setDescription("Description"); charging.setAmount(new BigDecimal("1000.00")); String textCallID = service.playTextMessage(address, text, language, charging); System.out.println("textCallID:" + textCallID); } catch (Exception ex) { ex.printStackTrace(); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -