Apologies if this is a known issue... I don't know if this is an intentional
feature change, or simply a bug...
but!
I recently upgraded a web service to WSE3, specifically to use MTOM in a
particular call. This worked, however something else unrelated went "snap"
in the process...
After much head-scratching, I identified it as a public byte[] property that
was marked with as [XmlAttribute] - i.e. to be serialized inline with the
containing object-element. Under vanilla .Net WS everything was fine, but
with MTOM enabled this field ceased working - it would be read as 0 instead.
As it happens this represented a database timestamp, so it (oddly enough)
stopped a few things from working.
Changing this property to [XmlElement] and regenerating my proxy class
resolved this; this was the only change.
For ref, the markers in the proxy class changed from:
[System.Xml.Serialization.XmlAttributeAttribute()]
[System.ComponentModel.DefaultValueAttribute(0)]
To
[System.Xml.Serialization.XmlElementAttribute(DataT ype="base64Binary")]
Also note that I generate the proxies via
@"C:\Program Files\Microsoft WSE\v3.0\Tools\WseWsdl3.exe" /edb
/type:webClient /nologo /l:CS /n:%2 /out:%1 %3
(with obvious %1...%3; just included to indicate full calling syntax)
I've resolved it now, so I'm not panicking, but does anybody know if this is
by design? As I wasn't expecting it!!! Normally I would have expected it to
either
work or throw an exception telling me it can't do it (like an int? marked as
[XmlAttribute])...
Marc