c# - Is removing a MessageBodyMember in a MessageContract considered a breaking change? -


consider following servicecontract-interface:

[servicecontract] public interface itest {     [operationcontract]     void mymethod(myclass obj); } 

with myclass beeing:

[messagecontract] public myclass {     [messagebodymember(order = 0)]     public int { get; set; }      [messagebodymember(order = 1)]     public int b { get; set; }      [messagebodymember(order = 2)]     public int c { get; set; } } 

myclass changed following:

[messagecontract] public myclass {     [messagebodymember(order = 0)]     public int { get; set; }      [messagebodymember(order = 2)]     public int c { get; set; } } 

would client consuming wcf-service need make additional changes work new service definition?

additionaly, happen if additionally change c have new order = 1?

if client updates wsdl file, gets syntax error in code of client, when client calls method.

the order element set on position in communication bodymember sending server/client. can see svc log. example.:

<ns2: myclass xmlns:ns2="yournamespace"> <a xmlns=""></a> <b xmlns=""></b> <c xmlns=""></c> </ns2:myclass> 

after changed ordner element:

<ns2: myclass xmlns:ns2="yournamespace"> <c xmlns=""></c> <a xmlns=""></a> <b xmlns=""></b> </ns2: myclass > 

i have tried example you. have used wcf c# web service , c# client standard protocol: basichttpbinding. , use wcf test client. in combination got no error in client, provided client makes no wsdl update. in case, can change order element without errors. not correct implementation; therefore can’t assume working. other clients see result might different. example, java client more restrictive.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -