> Hi,
>
[quoted text clipped - 29 lines]
>
> Martin
Hi Martin,
when enum is serialized to XML only its string representation is send to the
client. That's the whole idea of XML communication channel. If you want to
transfer also the numeric value, you need to implement a custom solution.
Remoting would work in this case, but your decision to you Remoting or not
should not be based on this particular problem. It depends much more on the
transport protocol, network and software environment and others.
See "Choosing Communication Options in .NET" [1] for more information how to
make your choice.
[1]
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cp
conchoosingcommunicationoptionsinnet.asp
Regards,

Signature
Martin Kulov
http://www.codeattest.com/blogs/martin
MVP, MCT, MCSD.NET Early Achiever
Steven Cheng[MSFT] - 07 Apr 2006 04:20 GMT
Hi Martin,
As Martin Kulov mentioned, generally enum types are represented by xsd
enumeration simple type like below:
<s:simpleType name="TestEnum">
- <s:restriction base="s:string">
<s:enumeration value="A" />
<s:enumeration value="B" />
</s:restriction>
</s:simpleType>
so it can not hold two value pairs(or the mapping info). For your
scenario,I think you can consider use the XmlEnumAttribute to
specify the enum's actual number value as the underlying xmlserialization
value. e.g:
=================
Public Enum TestEnum As Integer
<XmlEnum("128")> _
Enum1 = 128
<XmlEnum("256")> _
Enum2 = 256
End Enum
====================
thus, the "Enum1" will be transfered as "128", "Enum2" will be transfered
as "256" in SOAP message, and when arrive the other side, it will be
deserizlied to the .net enum value.
Hope this helps.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Signature
Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)