Trouble Migrating VB6 App to ASP.NET

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") = "uri:principal-" & 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top