
下面是联通发的一些接口和规范:
1、ClientInterface.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://smsmonitor.asiainfo.com" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://smsmonitor.asiainfo.com">
<wsdl:types>
<xsd:schema targetNamespace="http://smsmonitor.asiainfo.com" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:element name="report">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="messageID" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="mobileNumber" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="statusCode" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="timeStamp" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="reportResponse">
<xsd:complexType />
</xsd:element>
<xsd:element name="notification">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="mobileNumber" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="channelID" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="content" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="timeStamp" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="notificationResponse">
<xsd:complexType />
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="notificationRequest">
<wsdl:part element="tns:notification" name="parameters" />
</wsdl:message>
<wsdl:message name="reportResponse">
<wsdl:part element="tns:reportResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="reportRequest">
<wsdl:part element="tns:report" name="parameters" />
</wsdl:message>
<wsdl:message name="notificationResponse">
<wsdl:part element="tns:notificationResponse" name="parameters" />
</wsdl:message>
<wsdl:portType name="SpSMServicePortType">
<wsdl:operation name="report">
<wsdl:input message="tns:reportRequest" name="reportRequest" />
<wsdl:output message="tns:reportResponse" name="reportResponse" />
</wsdl:operation>
<wsdl:operation name="notification">
<wsdl:input message="tns:notificationRequest" name="notificationRequest" />
<wsdl:output message="tns:notificationResponse" name="notificationResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SpSMServiceHttpBinding" type="tns:SpSMServicePortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="report">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="reportRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="reportResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="notification">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="notificationRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="notificationResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SpSMService">
<wsdl:port binding="tns:SpSMServiceHttpBinding" name="SpSMServiceHttpPort">
<wsdlsoap:address location="SERVICE_URL" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
2、ServerInterface.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:tns="http://smsmonitor.asiainfo.com" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://smsmonitor.asiainfo.com">
<wsdl:types>
<xsd:schema targetNamespace="http://smsmonitor.asiainfo.com" elementFormDefault="qualified" attributeFormDefault="qualified">
<xsd:element name="send">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="taskID" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="mobileNumber" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="channelID" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="messageClass" type="xsd:int" minOccurs="1" maxOccurs="1" />
<xsd:element name="title" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="content" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="method" type="xsd:int" minOccurs="1" maxOccurs="1" />
<xsd:element name="scheduledTime" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="repeatTime" type="xsd:int" minOccurs="0" maxOccurs="1" />
<xsd:element name="repeatInterval" type="xsd:int" minOccurs="0" maxOccurs="1" />
<xsd:element name="repeatUnit" type="xsd:int" minOccurs="0" maxOccurs="1" />
<xsd:element name="permitedPeriod" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
<xsd:element name="priority" type="xsd:int" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="sendResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="out" type="xsd:string" nillable="true" minOccurs="1" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</wsdl:types>
<wsdl:message name="sendResponse">
<wsdl:part element="tns:sendResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="sendRequest">
<wsdl:part element="tns:send" name="parameters" />
</wsdl:message>
<wsdl:portType name="SMServicePortType">
<wsdl:operation name="send">
<wsdl:input message="tns:sendRequest" name="sendRequest" />
<wsdl:output message="tns:sendResponse" name="sendResponse" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="SMServiceHttpBinding" type="tns:SMServicePortType">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="send">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="sendRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="sendResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="SMService">
<wsdl:port binding="tns:SMServiceHttpBinding" name="SMServiceHttpPort">
<wsdlsoap:address location="SERVICE_URL" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
3、send-sms.xml
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Header>
<!--m:abc xmlns:m="http://smsmonitor.asiainfo.com">aaaa</m:abc-->
<m:SpInfo m:SpID="wujl" xmlns:m="http://smsmonitor.asiainfo.com" m:SpPassword="wujl"/>
<m:TransactionInfo xmlns:m="http://smsmonitor.asiainfo.com" m:LinkID="06151437320481010001"/>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:send xmlns:m="http://smsmonitor.asiainfo.com">
<m:taskID>1230002</m:taskID>
<m:mobileNumber>86接收号码</m:mobileNumber>
<m:channelID>接入号</m:channelID>
<m:messageClass>1</m:messageClass>
<m:title></m:title>
<m:content>abc333123sdfdsfdsafldskkss</m:content>
<m:method>1</m:method>
<m:scheduledTime>2008-06-12 17:20:00</m:scheduledTime>
<m:repeatTime>0</m:repeatTime>
<m:repeatInterval>0</m:repeatInterval>
<m:repeatUnit>0</m:repeatUnit>
<m:permitedPeriod>String</m:permitedPeriod>
<m:priority>0</m:priority>
</m:send>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
5、SOAP Header信息
5.1.SP认证信息:
SP认证信息SOAP头部标签为:SpInfo,包含两个属性:
SpID,必选,类型:xsd:string,SP唯一标识吗,由短信监控平台分配SP使用;
SpPassword,必选,类型:xsd:string,SP口令,由短信监控平台分配SP使用。
5.2.会话信息:
会话信息SOAP头部标签为:TransactionInfo,可选。当且仅当该下行通道已授权进行主动推送时,可以忽略该项信息。
具有一个属性:
LinkID,必选,类型:xsd:string,短消息的上下文标识。由短信监控平台在处理上行短消息时分配给SP,SP在发送下行消息时须携带此标识。对于SP主动推送短消息的情况,该属性值可为空。
6、其他信息
业务名称:行业服务短信
接入号码:10655xxxxxxxxxx
接入方式: Webservice接口
网关地址:61.240.233.235
网关端口:20000
用户名:rixxxx
密码:cxxxxxx
验证SP的IP地址为:58.20.xx.xxx
--------------------------------
在网上搜索了好多天,都是那种傻瓜式的添加web引用的例子,而联通的好像是用C++ gSOAP开发的,那种添加web引用的方法行不通,我又试着用wsdl.exe把联通给的两个wsdl文件生成了对应的CS代码文件,直接实例化,调用里面的send()方法,行不通

还望各位程序大牛们不吝赐教,给小弟一些指导,谢谢,谢谢!!!!