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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:04:37+00:00 2026-06-17T09:04:37+00:00

The intial problem was that when I called a webservice ( asmx) methos with

  • 0

The intial problem was that when I called a webservice ( asmx) methos with a type the type was always going through as null . Inspecting the Soap confirmed that the type was going as an empty element. So I tried a simple test.
Here is my type which of course has been generated from WSDL

[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://dto12.api.echosign")]
public partial class SendDocumentInteractiveOptions {

    private bool authoringRequestedField;

    private bool authoringRequestedFieldSpecified;

    private bool autoLoginUserField;

    private bool autoLoginUserFieldSpecified;

    private bool noChromeField;

    private bool noChromeFieldSpecified;

    /// <remarks/>
    public bool authoringRequested {
        get {
            return this.authoringRequestedField;
        }
        set {
            this.authoringRequestedField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlIgnoreAttribute()]
    public bool authoringRequestedSpecified {
        get {
            return this.authoringRequestedFieldSpecified;
        }
        set {
            this.authoringRequestedFieldSpecified = value;
        }
    }

    /// <remarks/>
    public bool autoLoginUser {
        get {
            return this.autoLoginUserField;
        }
        set {
            this.autoLoginUserField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlIgnoreAttribute()]
    public bool autoLoginUserSpecified {
        get {
            return this.autoLoginUserFieldSpecified;
        }
        set {
            this.autoLoginUserFieldSpecified = value;
        }
    }

    /// <remarks/>
    public bool noChrome {
        get {
            return this.noChromeField;
        }
        set {
            this.noChromeField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlIgnoreAttribute()]
    public bool noChromeSpecified {
        get {
            return this.noChromeFieldSpecified;
        }
        set {
            this.noChromeFieldSpecified = value;
        }
    }
}

Now here is some simple code to serialize it.

SendDocumentInteractiveOptions sdio = new SendDocumentInteractiveOptions();
sdio.authoringRequested = true;
sdio.autoLoginUser = true;
sdio.noChrome = true;
XmlSerializer xmlSer = new XmlSerializer(typeof(SendDocumentInteractiveOptions));
XmlWriter xw = new XmlTextWriter(@"g:\test.xml", null);
xmlSer.Serialize(xw, sdio);
xw.Close();  

And here is the resulting XML

<?xml version="1.0"?&gt
&ltSendDocumentInteractiveOptions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>

So what am I missing here. Why are my public properties not getting serialized?

  • 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-17T09:04:37+00:00Added an answer on June 17, 2026 at 9:04 am

    This is kind of an old question, but oh well. I think the solution might be in another question “Why isn’t my public property serialized by the XmlSerializer?”. Part of the answer lists reasons why an attribute would not be serialized and in that list is

    • it has a public bool FooSpecified {get;set;} property that returned false

    In your code, you set the various Boolean values but set the related specified values. I was facing a similar issue and setting the specified value fixed it for me.

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

Sidebar

Related Questions

I have a class called ObservableCollectionWithValidState that serves to notify itself when an of
I'm working to finish a math problem that approximates the square root of a
I have a continuous linear programming problem that involves maximizing a linear function over
In my WP8 app I have a special type of 'settings' objects that are
I'm having difficulty with a fitting problem. From the errors that I get I
problem happends when in loading a new .jsp page. The problem being that it
So i have a NivoSlider on my page. My problem is that i want
I have a bean with a field called 'name', and a JSF form that
I've seen a few similar posts to my problem, but none that have helped
I'll like to combine both my initial problem which leads me to this one

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.