Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting response from SOAP
Message
De
01/03/2010 21:58:41
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Web Services
Titre:
Getting response from SOAP
Versions des environnements
Environment:
VB 9.0
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01451885
Message ID:
01451885
Vues:
99
This is a subset of my Web Service class which intercepts the SOAP message and stores it into the HTTPContext so I can access it from my application.
        Public Overrides Sub ProcessMessage(ByVal message As SoapMessage)
            Dim loStreamReader As StreamReader = Nothing
            Dim lcString As String = ""

            Select Case message.Stage

                Case SoapMessageStage.BeforeSerialize

                Case SoapMessageStage.AfterSerialize
                    WriteOutput(message)

                Case SoapMessageStage.BeforeDeserialize
                    WriteInput(message)

                    ' Retrieve the SOAP Message from the Input Stream
                    ' Save the SOAP Message in Request-scope State Bag

                    System.Web.HttpContext.Current.Request.InputStream.Position = 0

                    loStreamReader = New StreamReader(System.Web.HttpContext.Current.Request.InputStream)
                    lcString = loStreamReader.ReadToEnd()

                    System.Web.HttpContext.Current.Items("HTTPInputStream") = lcString

                Case SoapMessageStage.AfterDeserialize

            End Select

        End Sub
So, basically, later on in the application, I can know what was received in the SOAP envelope. Now, we need to do the same thing for the response. This is the difficult part. Has anyone done that before? Basically, I need to know what was sent to the client.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Répondre
Fil
Voir

Click here to load this message in the networking platform