tag:blogger.com,1999:blog-1482776199578137808.post3815097129493314392..comments2024-03-12T11:12:59.606+02:00Comments on Yaron Naveh's Web Services 2.0 Blog: Web Services XML: Nullable AND Optional xsd:stringYaron Naveh (MVP)http://www.blogger.com/profile/11793800386245798442noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-1482776199578137808.post-36949141961777128862014-12-23T17:07:22.379+02:002014-12-23T17:07:22.379+02:00you shuold consider using the xsd:any type which w...you shuold consider using the xsd:any type which will translate to XmlElement in the proxy, so you could serialize the xml yourself. Of course you should try the regular attributes before (as mentioned here) since they should work for complex objects also.Yaron Naveh (MVP)https://www.blogger.com/profile/11793800386245798442noreply@blogger.comtag:blogger.com,1999:blog-1482776199578137808.post-34329717577743188842014-12-18T23:36:59.959+02:002014-12-18T23:36:59.959+02:00What if your property is an object, not a simple t...What if your property is an object, not a simple type like a string? And to make it more complex, because this is what I'm dealing with today...<br /><br />The element should be nillable, but it has a required attribute. so the element would have xsi:nil="true" and the required attribute would have a value. How to represent this in the proxy object and do the serialization/deserialization?BizTalkerhttps://www.blogger.com/profile/11727785291174644019noreply@blogger.comtag:blogger.com,1999:blog-1482776199578137808.post-18064767822695405872010-02-24T01:28:37.369+02:002010-02-24T01:28:37.369+02:00in c# int cannot be created from an empty string. ...in c# int cannot be created from an empty string. An "empty" int should be represented using the "int?" type. I guess if the element does not exists at all .Net might just use the default int value (0). But an empty value is definitely not valid.Yaron Naveh (MVP)https://www.blogger.com/profile/11793800386245798442noreply@blogger.comtag:blogger.com,1999:blog-1482776199578137808.post-68023443192938696502010-02-22T16:50:13.206+02:002010-02-22T16:50:13.206+02:00The serializer seems not to work well with int val...The serializer seems not to work well with int values.<br />If I have a Nullable and the soap response contains the empty element:<br /><br /><br /><br />the deserialization gives an exception trying to convert to Int32 anyway.<br /><br />Is it a known error?kkhttps://www.blogger.com/profile/17980146657962345806noreply@blogger.com