📄 getinfo.java~1~
字号:
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;
import cn.com.chinatelecom.www.schema.ctcc.third_party_call.v2_1.*;
public class getInfo {
public getInfo() {
}
public static void main(String[] args) {
try {
URL url = new URL("http://215.152.1.115:8086/sagWeb/services/ThirdPartyCall");
ThirdPartyCallServiceLocator locator = new ThirdPartyCallServiceLocator();
ThirdPartyCall service = locator.getThirdPartyCall(url);
String callID = "70604241911151000371";
//service.endCall(callID);
//service.cancelCallRequest(callID);
CallInformation status = service.getCallInformation(callID);
System.out.println("CallStatus:" + status.getCallStatus().toString());
if (!status.getCallStatus().equals(CallStatus.CallInitial)) {
System.out.println("StartTime:" +
status.getStartTime().getTime().toString());
}
if (status.getCallStatus().equals(CallStatus.CallTerminated)) {
System.out.println("Duration:" + status.getDuration());
System.out.println("TerminationCause:" +
status.getTerminationCause().toString());
}
}
catch (Exception ex) {
ex.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -