📄 smssendsmsstub.java
字号:
/**
*
*/
package test.sms;
import cn.com.chinatelecom.www.schema.ctcc.common.v2_1.RequestSOAPHeader;
import cn.com.chinatelecom.www.wsdl.ctcc.sms.send.v2_1.service.SendSmsBindingStub;
import org.apache.axis.AxisFault;
import test.RouteSoapHeader;
import java.net.URL;
import javax.xml.rpc.Service;
/**
* @author wangqijun
*
*/
public class SMSSendSmsStub extends SendSmsBindingStub
{
/**
* @throws AxisFault
*/
public SMSSendSmsStub() throws AxisFault
{
// TODO 自动生成构造函数存根
super();
}
/**
* @param endpointURL
* @param service
* @throws AxisFault
*/
public SMSSendSmsStub(URL endpointURL, Service service) throws AxisFault
{
super(endpointURL, service);
// TODO 自动生成构造函数存根
}
/**
* @param service
* @throws AxisFault
*/
public SMSSendSmsStub(Service service) throws AxisFault
{
super(service);
// TODO 自动生成构造函数存根
}
/**
* 短信发送
*
* @param addresses
* 目的地址
* @param senderName
* 发送者信息
* @param charging
* 计费方案
* @param message
* 短信内容
* @param receiptRequest
* 是否状态报告
* @param soapHeader
* 消息头对象
* @return 返回码
* @throws java.rmi.RemoteException
* @throws cn.com.chinatelecom.www.schema.ctcc.common.v2_1.PolicyException
* @throws cn.com.chinatelecom.www.schema.ctcc.common.v2_1.ServiceException
*/
public java.lang.String sendSms
(
org.apache.axis.types.URI[] addresses,
java.lang.String senderName,
cn.com.chinatelecom.www.schema.ctcc.common.v2_1.ChargingInformation charging,
java.lang.String message,
cn.com.chinatelecom.www.schema.ctcc.common.v2_1.SimpleReference receiptRequest,
RequestSOAPHeader soapHeader) throws java.rmi.RemoteException,
cn.com.chinatelecom.www.schema.ctcc.common.v2_1.PolicyException,
cn.com.chinatelecom.www.schema.ctcc.common.v2_1.ServiceException
{
if (super.cachedEndpoint == null)
{
throw new org.apache.axis.NoEndPointException();
}
org.apache.axis.client.Call _call = createCall();
// 设置soap头
// RouteSoapHeader soap = new RouteSoapHeader(".\\downsoap.properties");
RouteSoapHeader soap = new RouteSoapHeader(soapHeader);
soap.setSoapHeader(_call);
_call.setOperation(_operations[0]);
_call.setUseSOAPAction(true);
_call.setSOAPActionURI("");
_call.setEncodingStyle(null);
_call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR,
Boolean.FALSE);
_call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
Boolean.FALSE);
_call
.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
_call
.setOperationName(new javax.xml.namespace.QName(
"http://www.chinatelecom.com.cn/schema/ctcc/sms/send/v2_1/local",
"sendSms"));
setRequestHeaders(_call);
setAttachments(_call);
java.lang.Object _resp = _call.invoke(new java.lang.Object[] {
addresses, senderName, charging, message, receiptRequest });
if (_resp instanceof java.rmi.RemoteException)
{
throw (java.rmi.RemoteException) _resp;
}
else
{
extractAttachments(_call);
try
{
return (java.lang.String) _resp;
}
catch (java.lang.Exception _exception)
{
return (java.lang.String) org.apache.axis.utils.JavaUtils
.convert(_resp, java.lang.String.class);
}
}
}
/**
* @param args
*/
public static void main(String[] args)
{
// TODO 自动生成方法存根
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -