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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:52:41+00:00 2026-05-12T07:52:41+00:00

I have a simple class, let’s say Team and I expose a WCF service

  • 0

I have a simple class, let’s say “Team” and I expose a WCF service (basicHttpBinding, hosted in IIS) with a GetTeams operation which returns an array of Team.

The Team class looks like

[DataContract]
public class Team
{
    [DataMember]
    public int Id { get; set; }
    [DataMember]
    public Point Position { get; set; }
    [DataMember]
    public string Code { get; set; }
    [DataMember]
    public bool Available { get; set; }
    [DataMember]
    public string Extra { get; set; }
    [DataMember]
    public double X { get; set; }
    [DataMember]
    public double Y { get; set; }
}

On the client (Silverlight 3.0 app) I get all the data but the Position property holds a default Point instance. The Point struct is System.Windows.Media.Point which is serializable. I also added the X and Y properties to duplicate the Position data to see if it gets right on the other end of the wire.

The XML intercepted (thanks, Firebug!) looks like so:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
    <GetTeamsResponse xmlns="http://tempuri.org/">
        <GetTeamsResult xmlns:a="http://schemas.datacontract.org/2004/07/MyProject.Data" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
            <a:Team>
                <a:Code>A23HJGF23</a:Code>
                <a:Available>true</a:Available>
                <a:Extra i:nil="true"/>
                <a:Id>1</a:Id>
                <a:Position xmlns:b="http://schemas.datacontract.org/2004/07/System.Windows">
                    <b:_x>572194.59937858</b:_x>
                    <b:_y>322518.3889979</b:_y>
                </a:Position>
                <a:X>572194.59937858</a:X>
                <a:Y>322518.3889979</a:Y>
            </a:Team>
            <!-- other <a:Team> elements -->
        </GetTeamsResult>
    </GetTeamsResponse>
</s:Body>
</s:Envelope>

Therefore it seems there is a deserialization issue. No exception is thrown!

Why?

  • 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-12T07:52:41+00:00Added an answer on May 12, 2026 at 7:52 am

    Just as a quick clarification, is your WCF service returning the .net 3 / 3.5 point class whilst the SL is attempting to use the SL point class? Or are they both referring to the same point structure.

    I’m thinking you are passing the .Net version to the SL version because that namespace in the position datacontract seems to indicate your using the CLR / WPF point, which is not the same as the SL point.

    The WCF endpoint will use the ISerializable to change to the XMLSerializer instead of the data contract serializer, so you will see the data, but as a custom class with the _x and _y you see in the XML at present.

    Edit:

    For clarity over the struct location

    SL3 Point Struct is in System.Windows.DLL (http://msdn.microsoft.com/en-us/library/system.windows.point(VS.95).aspx)
    .Net 3.0 Point Struct is in windowsbase.dll (http://msdn.microsoft.com/en-us/library/system.windows.point(VS.85).aspx)
    .Net 3.5 Point Struct in WindowsBase.dll (http://msdn.microsoft.com/en-us/library/system.windows.point.aspx)

    Same name, not the same class however when comparing the .net to the SL.

    And a bit of an addition, it occuring in SL 2.0 and being reported on the SL website. (http://silverlight.net/forums/t/26577.aspx)

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

Sidebar

Related Questions

Simple question : I have a service class (let's say helpersService ) and a
Let's say I have a very simple PrototypeJS class that looks like this: var
Let's say I have a regular simple Java class, such as: public class Foo
let's say we have simple data class: public class Ex { public string Prop1
Let's say I have a simple POJO class: public void Foo { public int
Let's say I have a simple class Cat in C#, with a Name property
So here's my problem... Let's say I have a simple Person class just with
I have, let's say, this simple class: public class User { [Required(AllowEmptyStrings = false,
Let's say I have a simple class called WebsterDictionary that has a function that
Let's say I have a simple parent->child class structure as shown below Public 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.