T
T.Horton
Currently in a VB6 application we are using SOAP to send an XML file
to another application. I have not been successfull in finding a way
to convert the code below to something similar in ASP.NET (VB.NET):
-----------
Dim Connector
Dim Serializer
Dim Reader
'On Error GoTo cleanUp
Set Connector = CreateObject("MSSOAP.HttpConnector")
Set Serializer = CreateObject("MSSOAP.SoapSerializer")
Set Reader = CreateObject("MSSOAP.SoapReader")
' The following Connector settings establish the SOAP Listener
' connection
Connector.Property("EndPointURL") = "http://" + txbHostListener +
":8080/ssc/servlet/SUGSoap"
Connector.Property("SoapAction") = "uririncipal-" & txbComponent
Connector.Property("Timeout") = 300000
Connector.Connect
Dim StartTime
Dim ElapsedTime
StartTime = Now()
' The following builds the SOAP Message by Using the
' Serializer which generates the XML SOAP Message
' and executes the SOAP Request
Connector.BeginMessage
Serializer.Init Connector.InputStream
Serializer.startEnvelope
Serializer.SoapNamespace "xsi",
"http://www.w3.org/1999/XMLSchema-instance"
Serializer.startBody
Serializer.startElement txbMethod, "Principal-" &
txbComponent, , "m"
Serializer.startElement "strPayload"
Serializer.SoapAttribute "xsi:type", "", "xsd:string"
Serializer.writeString sscPayload
Serializer.endElement
Serializer.endElement
Serializer.endBody
Serializer.endEnvelope
Connector.EndMessage
' The following Reader object opens the SOAP Response
' and evaluates if any SOAP Fault was raised
' The SOAP Response is placed in the strResult variable
Reader.Load Connector.OutputStream
Dim strResult
If Not Reader.Fault Is Nothing Then
strResult = Reader.faultstring.Text
Else
strResult = Reader.RPCResult.Text
End If
------------------
Can anyone give me some assitance on this?
Thanks,
Tom
to another application. I have not been successfull in finding a way
to convert the code below to something similar in ASP.NET (VB.NET):
-----------
Dim Connector
Dim Serializer
Dim Reader
'On Error GoTo cleanUp
Set Connector = CreateObject("MSSOAP.HttpConnector")
Set Serializer = CreateObject("MSSOAP.SoapSerializer")
Set Reader = CreateObject("MSSOAP.SoapReader")
' The following Connector settings establish the SOAP Listener
' connection
Connector.Property("EndPointURL") = "http://" + txbHostListener +
":8080/ssc/servlet/SUGSoap"
Connector.Property("SoapAction") = "uririncipal-" & txbComponent
Connector.Property("Timeout") = 300000
Connector.Connect
Dim StartTime
Dim ElapsedTime
StartTime = Now()
' The following builds the SOAP Message by Using the
' Serializer which generates the XML SOAP Message
' and executes the SOAP Request
Connector.BeginMessage
Serializer.Init Connector.InputStream
Serializer.startEnvelope
Serializer.SoapNamespace "xsi",
"http://www.w3.org/1999/XMLSchema-instance"
Serializer.startBody
Serializer.startElement txbMethod, "Principal-" &
txbComponent, , "m"
Serializer.startElement "strPayload"
Serializer.SoapAttribute "xsi:type", "", "xsd:string"
Serializer.writeString sscPayload
Serializer.endElement
Serializer.endElement
Serializer.endBody
Serializer.endEnvelope
Connector.EndMessage
' The following Reader object opens the SOAP Response
' and evaluates if any SOAP Fault was raised
' The SOAP Response is placed in the strResult variable
Reader.Load Connector.OutputStream
Dim strResult
If Not Reader.Fault Is Nothing Then
strResult = Reader.faultstring.Text
Else
strResult = Reader.RPCResult.Text
End If
------------------
Can anyone give me some assitance on this?
Thanks,
Tom