📄 playvxml.java~1~
字号:
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 playVXML { public playVXML() { } public static void main(String[] args) { try { URL url = new URL("http://10.40.57.222:8083/sagWeb/services/AudioCall"); AudioCallServiceLocator locator = new AudioCallServiceLocator(); AudioCall service = locator.getAudioCall(url); URI address = null; ChargingInformation charging = null; URI vioceVxmlUrl = null; //playVoiceXmlMessage测试 //正常功能测试 address = new URI("tel:13977770117"); //异常测试:电话号码长度为0 //address = new URI("tel:"); //异常测试:电话号码长度超长 //address = new URI("tel:139777701110000"); //异常测试:电话号码编码不对,"tel:" //address = new URI("te:13977770111"); //正确的VXML文件 vioceVxmlUrl = new URI("tel:http://192.168.22.218:8080/ip_test.vxml"); //不存在的VXML文件 //vioceVxmlUrl = new URI("tel:http://192.168.22.218:8080/ABC.vxml"); charging = new ChargingInformation(); charging.setCode("code"); charging.setCurrency("RMB"); charging.setDescription("Description"); charging.setAmount(new BigDecimal("1000.00")); String voiceCallID = service.playVoiceXmlMessage(address, vioceVxmlUrl, charging); System.out.println("voiceCallID:" + voiceCallID); } catch (Exception ex) { ex.printStackTrace(); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -