|
-
Dec 21st, 2012, 06:14 AM
#2
Thread Starter
Fanatic Member
Re: VS2010: Service xml serialization [XmlAttributeAttribute()] is ignored
Hi,
I believe that I've fixed this by changing the default serializer. From .Net Framwork 3.0 microsoft changed the default serializer to the DataContract serializer, which is different from the XmlSerializer that ASMX uses.
"Therefore, the XSD generated varies, too - the DataCOntract serializer for example doesn't support XML attributes (for speed reasons)."
I specified the XmlSerializer in the service interface [Contract] last night and it seems to be producing the expected xsd now. I did this late last night so haven't tested it properly yet and I'm off now until the new year.
Here are some links to the thread where I found the info I've been looking for -
http://stackoverflow.com/questions/2592664/schema-generated-from-wcf-web-service-and-asmx-are-different?rq=1
Blog post comparing the two serializers
Serialization in WCF
Last edited by aconybeare; Jan 2nd, 2013 at 10:38 AM.
Reason: Fixed typo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|