答案:<!--#include file = "conn.asp" -->
<%
Rem -------------------------------------------
Rem 文件名:SyncOrderRelationReq.asp
Rem 作用:解析POST请求的XML,检测处理结果
Rem 作者:Dengpc
Rem QQ :
Rem -------------------------------------------
Response.ContentType="text/xml"
Response.CharSet="utf-8"
dim ReceivedDoc
Set ReceivedDoc = server.CreateObject("MSXML2.DOMDocument")
'Set ReceivedDoc =Server.CreateObject("Microsoft.XMLDOM")ReceivedDoc.async=False
'是否同步
ReceivedDoc.load Request
'取得post请求
TransactionID=ReceivedDoc.selectSingleNode("//TransactionID").text
'消息类型
version=ReceivedDoc.selectSingleNode("//Version").text
'该接口消息的版本号,本次所有的接口消息的版本都为“1.5.0”
msgtype=ReceivedDoc.selectSingleNode("//MsgType").text
'消息类型
send_devicetype=ReceivedDoc.selectSingleNode("//Send_Address/DeviceType").text
'devicetype为0是表示网关发过来的。
send_deviceid=ReceivedDoc.selectSingleNode("//Send_Address/DeviceID").text
'不知道具体意思。log记录就行了。
'这里的send_deviceid/deviceid表示网关ID号。重庆是0004
dest_devicetype=ReceivedDoc.selectSingleNode("//Dest_Address/DeviceType").text
dest_deviceid=ReceivedDoc.selectSingleNode("//Dest_Address/DeviceID").text
'不知道具体意思。log记录就行了。
fee_useridtype=ReceivedDoc.selectSingleNode("//FeeUser_ID/UserIDType").text
'附费用户标识 1手机号码 2伪码
fee_msisdn=ReceivedDoc.selectSingleNode("//FeeUser_ID/MSISDN").text
'手机号码
fee_pseudocode=ReceivedDoc.selectSingleNode("//FeeUser_ID/PseudoCode").text
'伪码
dest_useridtype=ReceivedDoc.selectSingleNode("//DestUser_ID/UserIDType").text
'目标用户标识 1手机号码 2伪码
dest_msisdn=ReceivedDoc.selectSingleNode("//DestUser_ID/MSISDN").text
'手机号码
dest_pseudocode=ReceivedDoc.selectSingleNode("//DestUser_ID/PseudoCode").text
'伪码
linkid=ReceivedDoc.selectSingleNode("//LinkID").text
'linkid
actionid=ReceivedDoc.selectSingleNode("//ActionID").text
'服务状态管理动作代码,具体值如下:
'1: 开通服务;2: 停止服务;3: 激活服务;4: 暂停服务;
actionreasonid=ReceivedDoc.selectSingleNode("//ActionReasonID").text
'产生服务状态管理动作原因的代码,具体值如下:
'1:用户发起行为 2:系统发起行为 3:扣费失败导致的服务取消 4:其他
spid=ReceivedDoc.selectSingleNode("//SPID").text
'SP 的企业代码
spserviceid=ReceivedDoc.selectSingleNode("//SPServiceID").text
'SP 中该服务的服务代码
accessmode=ReceivedDoc.selectSingleNode("//AccessMode").text
'服务的访问方式 1:WEB 2:WAP 3:SMS
featurestr=ReceivedDoc.selectSingleNode("//FeatureStr").text
'服务订购参数
Set ReceivedDoc =nothing'response.write "spid="&spid&"<br>"
'response.write "spserviceid="&spserviceid&"<br>"
if fee_useridtype=1 then fee_phone=fee_msisdn else fee_phone=fee_pseudocode end if
if dest_useridtype=1 then dest_phone=dest_msisdn else dest_phone=dest_pseudocode end if
sql="insert into provision_log (TransactionID,version,msgtype,send_devicetype,send_deviceid,"
sql=sql&"dest_devicetype,dest_deviceid,feeuser_type,feeuser_phone,destuser_type,destuser_phone,actionid,actionreasonid,spid,"
'sql=sql&"spserviceid,accessmode,featurestr) values("
sql=sql&"spserviceid,accessmode) values("
sql=sql&"'"&TransactionID&"','"&version&"','"&msgtype&"','"&send_devicetype&"','"&send_deviceid&"',"
sql=sql&"'"&dest_devicetype&"','"&dest_deviceid&"','"&fee_useridtype&"','"&fee_phone&"','"&dest_useridtype&"','"&dest_phone&"',"
'sql=sql&"'"&actionid&"','"&actionreasonid&"','"&spid&"','"&spserviceid&"','"&accessmode&"','"&featurestr&"'"
sql=sql&"'"&actionid&"','"&actionreasonid&"','"&spid&"','"&spserviceid&"','"&accessmode&"')"
'response.write sql
'打开数据库
dbopen()
conn.execute(sql)
'关闭数据库
hret=get_hret()
dbclose()
Set ReceivedDoc=nothing
上一个:WAP技术研究综述
下一个:构建WAP应用程序开发环境