none
SOAP request does not reserve the order of the elements. RRS feed

  • Question

  • All,

    I have 3 soap request classes, Req1, Req2, Req3, 

    Req1 has two elements: source and dest

    Req2 has one element: num

    Req3 has 4 elements: sup, ap, pt, sub

    Req3 inherited from Req2, Req2 inherited from Req1. The expected soap request order is source, dest, num, sup, ap, pt, sub.

    However, the soap request received at the server is dest, source, num, ap, pt, sub, sup. It seems that the framework sorted the elements of each class. How do I enforce the order when sending SOAP request?

    Thanks,

    PeterFL


    Wednesday, April 29, 2015 10:17 PM

Answers

All replies

  •  Adding [DataMember(Order = x)] solves my problem.

    Thursday, April 30, 2015 2:30 PM
  • Hi PeterFL,

    Well Done!
    Thank you very much for sharing the solution to us.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, May 1, 2015 6:13 AM
    Moderator