Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 72991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T20:07:53+00:00 2026-05-10T20:07:53+00:00

(If anything here needs clarification/ more detail please let me know.) I have an

  • 0

(If anything here needs clarification/ more detail please let me know.)

I have an application (C#, 2.* framework) that interfaces with a third-party webservice using SOAP. I used thinktecture’s WSCF add-in against a supplied WSDL to create the client-side implementation. For reasons beyond my control the SOAP message exchange uses WSE2.0 for security (the thinctecture implementation had to be modified to include the WSE2.0 reference). In addition to the ‘normal’ data package I attach a stored X509 cert and a binary security token from a previous call to a different web service. We are using SSL encryption of some sort – I don’t know the details.

All the necessary serialization/deserialization is contained in the web service client – meaning when control is returned to me after calling the client the entire XML string contained in the SOAP response is not available to me – just the deserialized components. Don’t get me wrong – I think that’s good because it means I don’t have to do it myself.

However, in order for me to have something worth storing/archiving I am having to re-serialize the data at the root element. This seems like a waste of resources since my result was in the SOAP response.

Now for my question: How can I get access to a ‘clear’ version of the SOAP response so that I don’t have to re-serialize everything for storage/archiving?

Edit- My application is a ‘formless’ windows app running as a network service – triggered by a WebsphereMQ client trigger monitor. I don’t think ASP.NET solutions will apply.

Edit – Since the consensus so far is that it doesn’t matter whether my app is ASP.NET or not then I will give CodeMelt’s (and by extension Chris’s) solution a shot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T20:07:54+00:00Added an answer on May 10, 2026 at 8:07 pm

    You can utilize SoapExtension from existing WSE2.0 framework to intercept the responses from the server.

    public class MyClientSOAPExtension : SoapExtension {       Stream oldStream;      Stream newStream;       // Save the Stream representing the SOAP request or SOAP response into      // a local memory buffer.      public override Stream ChainStream( Stream stream )      {             oldStream = stream;             newStream = new MemoryStream();             return newStream;      }      public override void ProcessMessage(SoapMessage message)     {        switch (message.Stage)         {             case SoapMessageStage.BeforeDeserialize:                 // before the XML deserialized into object.                 break;             case SoapMessageStage.AfterDeserialize:                 break;                     case SoapMessageStage.BeforeSerialize:                 break;             case SoapMessageStage.AfterSerialize:                 break;                         default:                 throw new Exception('Invalid stage...');         }            } } 

    At stage of SoapMessageStage.BeforeDeserialize, You can read the expected data you want from oldstream (e.g. use XmlReader). Then store the expected data somewhere for yourself to use and also you need forward the old stream data to the newstream for web service later stage to use the data, e.g. deserialize XML into objects.

    The sample of logging all the traffic for the web service from MSDN

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got an application here that needs to read in a bunch of data
my application needs a edit text ,when i enter anything in that edit text
For more clarification please look my for older post here Database normalization - who's
Had a good search here but can't see anything that gets my mind in
I can't find anything anywhere(search engines, docs, here, etc) that shows how to create
I can't see anything on here but I do remember being told that If
So here is my dilemma: I have a base class (Let's say a generic
I'm making a C# windows form application that needs to parse data from an
I have a queue that always needs to be ready to process items when
Here instead of SqlHelper I need to execute it through Oracle. Is there anything

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.