📄 makecall.java
字号:
package test.tpcTest;
/**
* <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 org.apache.axis.types.*;
import java.math.*;
import cn.com.chinatelecom.www.wsdl.ctcc.third_party_call.v2_1.service.*;
import cn.com.chinatelecom.www.wsdl.ctcc.third_party_call.v2_1._interface.*;
import cn.com.chinatelecom.www.schema.ctcc.common.v2_1.ChargingInformation;
public class makeCall {
public makeCall() {
}
public static void main(String[] args) {
try {
URL url = new URL("http://10.40.43.200:8082/sagWeb/services/ThirdPartyCall");
ThirdPartyCallServiceLocator locator = new ThirdPartyCallServiceLocator();
ThirdPartyCall service = locator.getThirdPartyCall(url);
//正常功能测试
URI calling = new URI("tel:jj13977770117");
URI called = new URI("tel:13977770118");
//异常测试,号码不是"tel"
// URI calling = new URI("tel:139777701151397777011513977770115");
// URI called = new URI("tel:13977770111");
ChargingInformation charging = new ChargingInformation();
charging.setCode("code");
charging.setCurrency("RMB");
charging.setDescription("Description");
charging.setAmount(new BigDecimal("1000.00"));
String callID = service.makeCall(calling, called, charging);
System.out.println(callID);
}
catch (Exception ex) {
ex.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -