soap - What's the logic behind WCF generated names for DataContracts -


when use wcf expose datacontract soap wevservice funky genenerated names, such as:

[flags] public enum enumtype1 {     enummember1 = 1;     enummember2 = 2;     enummember3 = 4; }  [datamember] private dictionary< enumtype1, class1>  class1dictionary; 

has soap representation on wire: (i'm paraphrasing):

<class1dictionary>     <keyvalueofenumtype1class1utlv0ze5>         <key>enummember1 </key>         <value> ... </value>     </keyvalueofenumtype1class1utlv0ze5> </class1dictionary> 

what's logic behind keyvalueofenumtype1class1utlv0ze5? can explain keyvalueofenumtype1class1 part, utlv0ze5 come from? furthermore wcf client break if arbitrary string charges?

it bit random me. don't know whether funk random , subject changes break contracts.

but if in search of less funcky wsdl, workaround (from here) subclass dictionary , use collectiondatacontractattribute override output during serialization:

[collectiondatacontract(     name="mydictionary", itemname="items", keyname="key", valuename="value")] public class mydictionary: dictionary<enumtype1, class1> {         } 

should generate xml like:

<mydictionary>      <items>          <key>enummember1</key>          <value> ... </value>      </items>  </mydictionary>  

Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -