Mobile MISC interface 1.6 program [ASP]

xiaoxiao2021-04-04  246

The following is default.asp file

<%

Rem -------------------------------------------

REM file name: SyncorderReLanceReq.asp

REM effect: parse the XML of the POST request, the detection processing result

Rem Author:

REM MSN:

Rem -------------------------------------------

%>

<%

Function Writelog (STR)

DIM OFS, OFILE, M_TEMPI

Spath = "out_syncorderrelerationReq.txt"

Set ofs = server.createObject ("scripting.filesystemobject")

sfilename = server.mappath (spath)

Set ofile = OFS.OpenTextFile (SfileName, 8, True)

Ofile.writeLine Str

Set OFS = Nothing

END FUNCTION

%>

<%

Response.contentType = "text / xml"

Response.Charset = "UTF-8"

Dim receiveddoc, Oresponsedom

WriteLog "Synchro Request Begin" Synchronous Request Start

Set receiveddoc = server.createObject ("msxml2.domdocument")

ReceivedDoc.async = false

'Is it synchronized?

ReceivedDoc.Load Request

'Get a POST request

'///

IF (receiveddoc.parseerror.errorcode <> 0) THEN

SET MYERR = ReceivedDoc.parseerror

Set OresponseSoapBody = OresponseDom.Selectsinglenode ("// SyncorderReranceResp")

OresponseSoapBody.selectsingLenode ("hret"). Text = "9014"

'Unable to resolve SOAP and XML structures

Oresponsedom.save (response)

WriteLog "Have Error" & merr.reason

'Response.end ()

END IF

If ReceivedDoc.childNodes.Length = 0 THEN

Set OresponseSoapBody = OresponseDom.Selectsinglenode ("// SyncorderReranceResp")

OresponseSoapBody.selectsingLenode ("hret"). Text = "9014"

Oresponsedom.save (response)

WriteLog "Unable to resolve the SOAP and XML structure."

'Response.end ()

END IF

'//

'Get the XML documentation from POST

a = receiveddoc.selectsinglenode ("// TransactionID"). Textwritelog "TransactionID =" & A

'Message number

B = receiveddoc.selectsinglenode ("// version"). Text

WriteLog "Version =" & B

'The version number of the interface message

C = receiveddoc.selectsinglenode ("// msgtype"). Text

WriteLog "MsgType =" & C

'Message type

D = receiveddoc.selectsinglenode ("// send_address / deviceType"). Text

WriteLog "DeviceType =" & D

E = receiveddoc.selectsinglenode ("// send_address / deviceid). Text

WriteLog "DeviceID =" & E

f = receiveddoc.selectsinglenode ("// dest_address / deviceType"). Text

WriteLog "DeviceType =" & f

g = receiveddoc.selectsinglenode ("// dest_address / deviceid). Text

WriteLog "DeviceID =" & g

h = receiveddoc.selectsinglenode ("// feed _ / useridtype"). Text

WriteLog "UseridType =" & H

i = receiveddoc.selectsinglenode ("// feedr_id / msisdn). Text

WriteLog "msisdn =" & i

j = receiveddoc.selectsinglenode ("// feed"). TEXT

WriteLog "pseudocode =" & j

K = receiveddoc.selectsinglenode ("// Destuser_id / UserIdType"). Text

WriteLog "UseridType =" & K

L = receiveddoc.selectsinglenode ("// Destuser_id / MSISDN"). Text

WriteLog "msisdn =" & l

m = receiveddoc.selectsinglenode ("// Destuser_id / pseudocode"). TEXT

WriteLog "pseudocode =" & m

n = receiveddoc.selectsinglenode ("// linkid"). Text

WriteLog "linkid =" & n

o = receiveddoc.selectsinglenode ("// actionid"). Text

WriteLog "ActionID =" & O

p = receiveddoc.selectsinglenode ("// ActionReasonID"). TextWritelog "ActionReasonId =" & P

Q = ReceivedDoc.selectsinglenode ("// spid"). Text

WriteLog "spid =" & q

R = receiveddoc.selectsinglenode ("// spserviceid"). Text

WriteLog "spserviceid =" & r

s = receiveddoc.selectsinglenode ("// accessmode"). Text

WriteLog "AccessMode =" & S

T = receiveddoc.selectsinglenode ("// featureStr"). Text

WriteLog "featureStr =" & t

Set receivedDoc = Nothing

WriteLog "End of Synchronous Request" & now ()

WriteLog ""

IF NRET <> 0 TEN 'Rem --------- Error Processing Interface

NRET = 1

WriteLog "Synchronous Positive Order Relationship Failure" & now ()

Else

'Rem -------- correctly return results

SQL = "SELECT * from TB_TEST WHERE I = '" & I & "' and r = '" & r & "'"

RS.Open SQL, CONN, 1, 3

IF (rs.eof and ly) Then 'does not exist of the same number of service code

IF o = 1 THEN

Logout = "0"

Logindate = now ()

Rs.addnew 'increase

RS ("Logindate" = logindate

RS ("Logout") = logout

RS ("a") = a

RS ("b") = B

RS ("c") = C

RS ("d") = d

RS ("e") = e

RS ("f") = f

RS ("g") = g

RS ("h") = h

RS ("i") = i

RS ("j") = j

RS ("k") = k

RS ("L") = L

RS ("m") = m

RS ("n") = n

RS ("o") = O

RS ("p") = P

RS ("Q") = Q

RS ("r") = r

RS ("s") = s

RS ("t") = t

Rs.Update

END IF

Else '

IF o = 2 or o = 4 THEN

Logout = "1"

LogOutdate = now ()

RS ("Logout") = logout

RS ("LogOutdate") = logoutdaters.Update

Else

Logout = "0"

RS ("Logout") = logout

Rs.Update

END IF

END IF

Rs.close

SET RS = Nothing

Conn.close

Set conn = Nothing

END IF

NRET = 0

WriteLog "Synchronous Answer"

Set OresponseDom = Server.createObject ("msxml2.domdocument")

Oresponsedom.Assync = false 'is synchronized

ORESPONSEDOM.LOAD (Server.MAppath ("SyncorderReranceResp.xml") 'get a reply format

Oresponsedom.selectsinglenode ("// TransactionID"). Text = a

Writelog "TransactionID =" & A

Oresponsedom.selectsinglenode ("// hret"). Text = nret

WriteLog "hret =" & nret

'---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Oresponsedom.save (response)

Set OresponseDom = Nothing

WriteLog "Synchronous Answer End"

WriteLog "==================================="

WriteLog ""

WriteLog ""

%>

Connect database file Conn.asp

<%

DIM CONN, STRCONN

StrConn = "provider = SQLOLEDB; Database = provider; persist security info = true; uid = sa; pwd = Owen; data source = 127.0.0.1"

Set conn = server.createObject ("adoDb.connection")

Conn.open straconn

SET RS = Server.createObject ("AdoDb.Recordset")

%>

Create a table below in SQL

if EXISTS (Select * from dbo.sysObjects where id = Object_id (n '[dbo]. [TB_TEST]') And ObjectProperty (ID, n'uSERTABLE ') = 1)

DROP TABLE [DBO]. [TB_TEST]

Go

Create Table [DBO]. [TB_TEST]

[ID] [Decimal] (18, 0) Identity (1, 1) Not Null,

[logindate] NULL,

[logout] [varchar] (50) collate chinese_prc_ci_as null, [logoutdate] [datetime] NULL,

[a] [varchar] (50) collate Chinese_prc_ci_as null,

[b] [text] collate chinese_prc_ci_as null,

[C] [varchar] (50) collate chinese_prc_ci_as null,

[d] [varchar] (50) collate chinese_prc_ci_as null,

[e] [varchar] (50) collate chinese_prc_ci_as null,

[f] [varchar] (50) collate chinese_prc_ci_as null,

[g] [varchar] (50) collate chinese_prc_ci_as null,

[h] [varchar] (50) collate chinese_prc_ci_as null,

[i] [varchar] (50) collate Chinese_prc_ci_as null,

[j] [varchar] (50) collate chinese_prc_ci_as null,

[K] [varchar] (50) collate chinese_prc_ci_as null,

[l] [varchar] (50) collate chinese_prc_ci_as null,

[m] [varchar] (50) collate chinese_prc_ci_as null,

[n] [varchar] (50) collate chinese_prc_ci_as null,

[o] [varchar] (50) Collate Chinese_prc_ci_as null,

[p] [varchar] (50) collate chinese_prc_ci_as null,

[q] [varchar] (50) collate chinese_prc_ci_as null,

[r] [varchar] (50) collate chinese_prc_ci_as null,

[s] [varchar] (50) collate chinese_prc_ci_as null,

[T] [varchar] (50) Collate Chinese_prc_ci_as null

) On [primary] textImage_on [primary]

Go

Established in the same class: OUT_SYNCORDERRELATIONREQ.TXT file

Establish the following syncorderReranceResp.xml file

XMLns: xsd = "http://www.w3.org/2001/xmlschema"

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/"

XMLns: soap-enc = "http://schemas.xmlsoap.org/soap/encoding/">

">

1.5.0

SyncORDERRELATIONRESP

转载请注明原文地址:https://www.9cbs.com/read-131755.html

New Post(0)