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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:33:14+00:00 2026-05-26T01:33:14+00:00

This has been driving me nuts all day, as I’ve made no changes yet

  • 0

This has been driving me nuts all day, as I’ve made no changes yet I swear this was working the way I had intended yesterday.

I have a WCF 4 REST service defined with the following contract:

[ServiceContract]
public interface IPhoneFeaturesManagementHost
{
    [OperationContract]
    [WebInvoke(Method = "POST", UriTemplate = "/accounts/{accountNumber}/phoneNumbers/{phoneNumber}/features/{featureType}", RequestFormat = WebMessageFormat.Xml, ResponseFormat = WebMessageFormat.Xml, BodyStyle = WebMessageBodyStyle.Bare)]
    void UpdateFeatureStatus(string accountNumber, string phoneNumber, string featureType, FeatureUpdateRequest updateRequest);
}

I also have the following types defined:

[DataContract]
[KnownType(typeof(One900FeatureUpdateRequest))]
public abstract class FeatureUpdateRequest
{
    [DataMember]
    public FeatureStatus Status { get; set; }

    [DataMember]
    public DateTime EffectiveDate { get; set; }

    public string AccountNumber { get; set; }
    public string PhoneNumber { get; set; }
    public string UserId { get; set; }
    public DateTime Timestamp { get; set; }

    public override string ToString()
    {
        return String.Format("Status: {0}, Effective Date: {1}", Status, EffectiveDate);
    }
}

[DataContract]
public class One900FeatureUpdateRequest : FeatureUpdateRequest
{
    [DataMember]
    public bool PerformSwitchUpdate { get; set; }
}

Yesterday I swear I was able to submit POST data of this form:

<One900FeatureUpdateRequest>
  <EffectiveDate>1999-05-31T11:20:00</EffectiveDate>
  <Status>Enabled</Status>
  <PerformSwitchUpdate>true</PerformSwitchUpdate>
</One900FeatureUpdateRequest>

Today that same batch of XML is causing HTTP 400 errors with the following message:

Unable to deserialize XML body with root name 'One900FeatureUpdateRequest' and root namespace '' (for operation 'UpdateFeatureStatus' and contract ('IPhoneFeaturesManagementHost',  'http://tempuri.org/')) using DataContractSerializer. Ensure that the type corresponding to the XML is added to the known types collection of the service.

The only XML that seems to work today is the below, and I really really dislike the necessity of adding a namespace plus attribute to describe the subtype of my child DataContract.

<FeatureUpdateRequest i:type="One900FeatureUpdateRequest" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Project.Services.Host">
  <EffectiveDate>1999-05-31T11:20:00</EffectiveDate>
  <Status>Enabled</Status>
  <PerformSwitchUpdate>true</PerformSwitchUpdate>
</FeatureUpdateRequest>

Does anyone have any ideas as to what I might have touched or what I might need to change in order to get back to the prior simple XML format for deserialization?

Any help would be much appreciated. Thanks!

  • 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-26T01:33:15+00:00Added an answer on May 26, 2026 at 1:33 am

    I couldn’t find a way to do this with the DataContractSerializer, so I instead switched to the old XmlSerializer so I can have direct control over the XML format. This seemed to work.

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

Sidebar

Related Questions

This has been driving me nuts all day. I've seen this problem crop up
This has been driving me nuts all day. I have a weird bug that
This problem has been driving me nuts all day and there has to be
This has been driving me crazy all day. I need to get a font
This has been driving me crazy all day. I just want the value of
This has been driving me insane all day and I think I have the
This has been driving me nuts. I keep getting the following exception System.InvalidOperationException: The
This has been driving me nuts. I hope it's not been asked before but
This has been driving me nuts, I'm posting here after a lot of looking
This has been driving me nuts for a week now. I have a class

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.