欢乐通信短信回执.net实现问题~对方无法调用
本帖最后由 qaz2wsc 于 2012-06-05 10:51:44 编辑 对方发过来的soap:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><EchoOfSendSMS soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><ucNum xsi:type="xsd:string">075782622229</ucNum><cee xsi:type="xsd:string">13827778228</cee><msgid xsi:type="xsd:int">44438</msgid><res xsi:type="xsd:int">1</res><recvt xsi:type="xsd:string">20120531110714</recvt></EchoOfSendSMS></soapenv:Body></soapenv:Envelope>
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://tempuri.org/" xmlns:types="http://tempuri.org/encodedTypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><tns:EchoOfSendSMS><ucNum xsi:type="xsd:string" /><cee xsi:type="xsd:string" /><msgid xsi:type="xsd:int">2</msgid><res xsi:type="xsd:int">1</res><recvt xsi:type="xsd:string" /></tns:EchoOfSendSMS></soap:Body></soap:Envelope>
[SoapRpcService(RoutingStyle = SoapServiceRoutingStyle.RequestElement)]
[WebService(Namespace = "http://61.142.172.186:200/EchoService.asmx")]
[WebServiceBinding(ConformsTo = WsiProfiles.None)]
public class EchoService : System.Web.Services.WebService
{
private DataBaseControl DB = new DataBaseControl(); //数据库对象
private OtherClass _oc = new OtherClass();
private string _sql = "";
[WebMethod]
[SoapRpcMethod(Action = "EchoOfSendSMS", RequestNamespace = "http://61.142.172.186:200/EchoService.asmx", ResponseNamespace = "http://61.142.172.186:200/EchoService.asmx")]
public void EchoOfSendSMS(String ucNum, String cee, int msgid, int res, String recvt)
{
string statemsg = "";
int state = 0;
switch (res)
{
case 1:
statemsg = "成功接收";
state = 2;
break;
case -2:
statemsg = "系统异常";
break;
case -12:
statemsg = "系统超时";
break;
case -92:
statemsg = "被叫号码不存在、对方短信中心异常、被叫号码状态异常等等";
break;
}
_sql = string.Format("UPDATE ShortMessage SET s_statemsg='{0}',s_state={1} WHERE s_id={2}", statemsg, state, msgid);
DB.DBConnBegin();
try
{
DB.ExecuteCommand(_sql);
}
catch (Exception ex)
{
_oc.ErrorLog(ex, this);
}
DB.DBConnEnd();
}
}