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

  • SEARCH
  • Home
  • 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 6047535
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:21:42+00:00 2026-05-23T07:21:42+00:00

I have a web service proxy. On that proxy there is a method that

  • 0

I have a web service proxy. On that proxy there is a method that takes two custom types. When I call the web service, a soap message is generated.

In my scenario, I capture that soap message manually (using fiddler). I would like to be able to de-serialize a string containing this soap message (that I read from a manually created file) back into instances of my two original types.

I know this is easy enough to do with Xml DOM, XPath, and Xml serialization for those two types. I’m already doing this, though currently with two separate files. I’d like to combine them, and like to avoid manual formatting of the captured Soap message.

Is there a more automatic way to leverage the existing Soap infrastructure to do this deserialization? I’d like to write that serialization code once and simply expect it to work.

  • 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. Editorial Team
    Editorial Team
    2026-05-23T07:21:43+00:00Added an answer on May 23, 2026 at 7:21 am

    It appears the .Net framework doesn’t expose this in an easy to use manner. The custom code that writes/reads the data (in SoapHttpClientProtocol and SoapServerProtocol) is not directly exposed to the user.

    You can use this code to at least get the guts of the request to map correctly:

    XmlTypeMapping xmlTypeMapping = new SoapReflectionImporter()
        .ImportTypeMapping(typeof(T));
    var xmlSerializer = new XmlSerializer(xmlTypeMapping);
    

    The rest of the serialization/deserialization you will have to do yourself (via writing the SOAP header and body with custom code, and skipping your XML reader ahead to your content, respectively).

    You could also try using SoapFormatter, though it is deprecated, and quite broken for a lot of scenarios (including generics):

    • http://blogs.msdn.com/b/mattavis/archive/2004/08/23/219200.aspx
    • http://msdn.microsoft.com/en-us/library/system.runtime.serialization.formatters.soap.soapformatter.aspx
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I call, the service's method, I have Web Service Exception happening which I
I have a web service (ASMX) and in it, a web method that does
I have to call a Web service that is extremely demanding (unstandard) regarding the
All, I have this SOAP web service, the way I do it is generated
I have a web-service that I will be deploying to dev, staging and production.
I have a web service that I created in C# and a test harness
I have a web service that queries data from this json file, but I
I have a web service that uses Python's SimpleJSON to serialize JSON, and a
I have a web service that is protected by requiring the consuming third party
I have a web service which has a generic function that returns a dataset

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.