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 8341613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T05:32:09+00:00 2026-06-09T05:32:09+00:00

I recently posted a question on StackOverflow: SOAP message deserialization issue in WCF –

  • 0

I recently posted a question on StackOverflow:

SOAP message deserialization issue in WCF – fields have null values

It was something about one of the WCF serialization engines, XmlSerializer, used to serialize/deserialize SOAP messages. The deserialization didn’t work at first – some namespace issues.

Back to present 🙂

Fields decorated with [XmlElement, MessageBodyMember] are deserialized fine now if they are simple types.

There is a problem regarding custom types: they are set, but their fields have null values 🙁

Is there a configuration I should make on the XmlSerializer?

[MessageContract]
public class Request
{
    [XmlElement(Form = System.Xml.Schema.XmlSchemaForm.Unqualified), MessageBodyMember]
    public XType X { get; set; }
}

[what to write here?]
public class XType
{
    [XmlElement(Form = System.Xml.Schema.XmlSchemaForm.Unqualified), body member?]
    public string AString { get; set; }

    ... maybe another nested complex objects
}
  • 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-06-09T05:32:11+00:00Added an answer on June 9, 2026 at 5:32 am

    I had those serialization problems because the client of the service has a serialization engine that is not “compatible” with the ones that WCF uses. The request was still standard XML, of course (SOAP 1.2), but hey, WCF is a Microsoft product 🙂

    Some workarounds:

    • Add a MessageFormater – that implements some deserialization logic at the server side – a good article about that;
    • Add a MessageInspector – that reads the SOAP request and does some XML formatting (so that the deserialization will work fine) – you can read about it following this link.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have recently posted another question which straight away users pointed me in the
I recently posted a question on stackoverflow about the less popular js function document.captureEvents()
I recently posted a question about a WCF Restful web service that I am
Recently I posted a question on Highcharts column charts drilldown. I have found that
I recently posted a question about screen rotation in my live wallpaper. To test
I recently posted a question about centering a page with CSS. I figured out
I recently posted a question using a lambda function and in a reply someone
I recently posted a question which was answered by Bryan Watts, regarding generic repository
I recently posted a question about getting a NullPointerException whenever I called an array
From another question I recently posted, it seems that Classic ASP might not be

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.