1

I have a wcf application with 2 operation contracts with [XmlSerializerFormat] and remaining in the default [DataContractFormat].

In both cases I am using data contracts for requests and response and specify order of properties like

       [DataMember(Order = 10)]   
   public string Tel
   {
       get;                  // in [DataContractFormat] method
       set;
   }

and

         [System.Xml.Serialization.XmlElementAttribute(Form = System.Xml.Schema.XmlSchemaForm.Qualified, Order = 11)]
    public string Taxi
    {
        get;                      // in  [XmlSerializerFormat] method
        set;
    }

I use SoapUI for testing. When I change the order of elements in request:

1) [DataContractFormat] methods work as expected. 2) [XmlSerializerFormat] methods produce non standard results. I have read a few articles related to this issue( 1.blog 2.so question 3.another blog)

but could not understand properly. How do I get both types to work similarly?

Thank you

Community
  • 1
  • 1
needtoflow
  • 47
  • 6
  • It seems changing order of elements in [DataContractFormat] method requests **doesn't work in all cases** like I've said in the question. However [XmlSerializerFormat] methods remain adamant in rejecting any order changes – needtoflow Jan 18 '17 at 12:10

1 Answers1

0

It would seem that so answer is the way to go about it. i.e to use the order in the default schema of api request

Community
  • 1
  • 1
needtoflow
  • 47
  • 6