Misc 1.6 Provision 正向接口

该博客为转载内容,转载自https://www.cnblogs.com/ddxy505/archive/2005/04/29/147393.html ,但未提及具体信息技术相关关键信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

None.gifImports System
None.gif
Imports System.Data
None.gif
Imports System.Data.OracleClient
None.gif
Imports System.ComponentModel
None.gif
Imports System.Runtime.InteropServices
None.gif
Imports System.Web.Services
None.gif
Imports System.Web.Services.Protocols
None.gif
Imports System.Xml.Serialization
None.gif
Imports System.Configuration
None.gif
Imports System.IO
None.gif
None.gif
None.gif
ExpandedBlockStart.gifContractedBlock.gif
<SoapDocumentService(RoutingStyle:=SoapServiceRoutingStyle.RequestElement), WebService(Namespace :Namespace:="http://www.monternet.com/dsmp/schemas/")> _
ExpandedSubBlockStart.gifContractedSubBlock.gif
Public Class ProvisionClass Provision
InBlock.gif    
Inherits WebService
InBlock.gif    
Friend WithEvents OraConn As System.Data.OracleClient.OracleConnection
InBlock.gif    
Friend WithEvents OraCommand As System.Data.OracleClient.OracleCommand
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
Public Class TransactionIDClass TransactionID
InBlock.gif        
Inherits SoapHeader
InBlock.gif        
<XmlText(GetType(String))> _
InBlock.gif        
Public TransactionID As String
ExpandedSubBlockEnd.gif    
End Class

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
Public Structure Send_AddressStructure Send_Address
InBlock.gif        
Dim DeviceType As Integer
InBlock.gif        
Dim DeviceId As String
ExpandedSubBlockEnd.gif    
End Structure

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
Public Structure Dest_AddressStructure Dest_Address
InBlock.gif        
Dim DeviceType As Integer
InBlock.gif        
Dim DeviceId As String
ExpandedSubBlockEnd.gif    
End Structure

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
Public Structure FeeUser_IDStructure FeeUser_ID
InBlock.gif        
Dim User_ID_Type As Integer
InBlock.gif        
Dim MSISDN As String
InBlock.gif        
Dim PseudoCode As String
ExpandedSubBlockEnd.gif    
End Structure

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
Public Structure DestUser_IDStructure DestUser_ID
InBlock.gif        
Dim User_ID_Type As Integer
InBlock.gif        
Dim MSISDN As String
InBlock.gif        
Dim PseudoCode As String
ExpandedSubBlockEnd.gif    
End Structure

InBlock.gif
InBlock.gif    
Public SoapHead As TransactionID
InBlock.gif
InBlock.gif    
Private objcontext As HttpContext
InBlock.gif
InBlock.gif    
<SoapDocumentMethod(RequestNamespace:="http://www.monternet.com/dsmp/schemas/", _
InBlock.gif    RequestElementName:
="SyncOrderRelationReq", ResponseElementName:="SyncOrderRelationResp"), _
InBlock.gif    SoapHeader(
"SoapHead", Direction:=SoapHeaderDirection.InOut), WebMethod()> _
ExpandedSubBlockStart.gifContractedSubBlock.gif    
Public Function SyncOrderRelationReq()Function SyncOrderRelationReq(ByRef Version As String, _
InBlock.gif                                    
ByRef MsgType As String, _
ExpandedSubBlockStart.gifContractedSubBlock.gif                                    
<XmlElement(Namespace :Namespace:="http://www.monternet.com/dsmp/schemas/")> _
InBlock.gif                                    
ByVal Send_Address As Send_Address, _
InBlock.gif                                    
ByVal Dest_Address As Dest_Address, _
InBlock.gif                                    
ByVal FeeUser_ID As FeeUser_ID, _
InBlock.gif                                    
ByVal DestUser_ID As DestUser_ID, _
InBlock.gif                                    
ByVal LinkID As String, _
InBlock.gif                                    
ByVal ActionID As Integer, _
InBlock.gif                                    
ByVal ActionReasonID As Integer, _
InBlock.gif                                    
ByVal SPID As String, _
InBlock.gif                                    
ByVal SPServiceID As String, _
InBlock.gif                                    
ByVal AccessMode As Integer, _
InBlock.gif                                    
ByVal FeatureStr As Byte(), _
InBlock.gif                                    
<Out()> ByRef hRet As Integer)
InBlock.gif        Version 
= "1.5.0"
InBlock.gif
        MsgType = "SyncOrderRelationResp"
InBlock.gif
        Dim dbs, usr, pwd, conn_s As String
InBlock.gif        
Dim objReader As OracleDataReader
InBlock.gif        
Dim objStreamWriter As StreamWriter
InBlock.gif        
Dim strtt As String
InBlock.gif        dbs 
= ConfigurationSettings.AppSettings("dbs")
InBlock.gif        usr 
= ConfigurationSettings.AppSettings("usr")
InBlock.gif        pwd 
= ConfigurationSettings.AppSettings("pwd")
InBlock.gif        conn_s 
= "user id=" + usr + ";data source=" + dbs + ";password=" + pwd
InBlock.gif
InBlock.gif        OraConn 
= New OracleClient.OracleConnection
InBlock.gif        OraCommand 
= New OracleClient.OracleCommand
InBlock.gif        OraConn.ConnectionString 
= conn_s
InBlock.gif        OraCommand.Connection 
= OraConn
InBlock.gif        
Try
InBlock.gif            OraConn.Open()
InBlock.gif            OraCommand.CommandText 
= "INSERT INTO t_sms_misc_provision (Version,MsgType,TransactionID,DeviceType_S," & _
InBlock.gif                                         
"DeviceId_S,DeviceType_D,DeviceId_D,User_ID_Type_F,MSISDN_F,PseudoCode_F," & _
InBlock.gif                                         
"User_ID_Type_D,MSISDN_D,PseudoCode_D,LinkID,ActionID,ActionReasonID,SPID," & _
InBlock.gif                                         
"SPServiceID,AccessMode,FeatureStr) VALUES('" + Version + "','" + MsgType + "','" + SoapHead.TransactionID.ToString + "','" + Send_Address.DeviceType.ToString + "','" + Send_Address.DeviceId + "','" + Dest_Address.DeviceType.ToString + "','" + Dest_Address.DeviceId + "','" + FeeUser_ID.User_ID_Type.ToString + "','" + FeeUser_ID.MSISDN + "','" + FeeUser_ID.PseudoCode + "','" + DestUser_ID.User_ID_Type.ToString + "','" + DestUser_ID.MSISDN + "','" + DestUser_ID.MSISDN + "','" + LinkID + "','" + ActionID.ToString + "','" + ActionReasonID.ToString + "','" + SPID + "','" + SPServiceID + "','" + AccessMode.ToString + "','" + System.Text.Encoding.UTF8.GetString(FeatureStr) + "')"
InBlock.gif
            OraCommand.ExecuteNonQuery()
InBlock.gif            
'objStreamWriter = New StreamWriter(Server.MapPath(objcontext.Current.Request.ApplicationPath & "/count.inc"), True)
InBlock.gif
            'objStreamWriter.WriteLine(OraCommand.CommandText)
InBlock.gif
            'objStreamWriter.Close()
InBlock.gif
            'OraCommand.CommandText = "commit"
InBlock.gif
            'OraCommand.ExecuteNonQuery()
InBlock.gif

InBlock.gif        
Catch ex As Exception
InBlock.gif            hRet 
= 1
InBlock.gif            OraCommand.CommandText 
= "rollback"
InBlock.gif
            OraCommand.ExecuteNonQuery()
InBlock.gif            OraConn.Close()
InBlock.gif        
Finally
InBlock.gif            hRet 
= 0
InBlock.gif            OraCommand.CommandText 
= "commit"
InBlock.gif
            OraCommand.ExecuteNonQuery()
InBlock.gif            OraConn.Close()
InBlock.gif        
End Try
ExpandedSubBlockEnd.gif    
End Function

InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    
Private Sub InitializeComponent()Sub InitializeComponent()
InBlock.gif        
Me.OraConn = New System.Data.OracleClient.OracleConnection
InBlock.gif        
Me.OraCommand = New System.Data.OracleClient.OracleCommand
InBlock.gif
ExpandedSubBlockEnd.gif    
End Sub

ExpandedSubBlockEnd.gif
End Class

InBlock.gif
InBlock.gif
InBlock.gif
InBlock.gif
InBlock.gif

转载于:https://www.cnblogs.com/ddxy505/archive/2005/04/29/147393.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值