473,498 Members | 1,704 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Enumeration serialization

Hi All,

Not sure where the best group to post this is, if you can suggest another
please do.

C# framework 1.1

I have an enumertaion that needs to serialized into a command that is fired
at an API. In our staging environment this works fine, however on the move
to live instead of serialzing the value it produces the integer equivalent
e.g

public enum statusvalue
{
NotSet,
Initialising,
Success,
Fail,
Error
}

on staging if we set the value to statusvalue.Success, it is serialized as
"Success", on live it is "2"

Both live and staging use the same framework, although staging os is Windows
2000 sp 4 and live is server 2003.

Not seen an issue like this before, so any help much appreciated.

Paul
Apr 12 '06 #1
1 1336

"Paul Davies" <pa***********@NOTTHISBIThotmail.com> wrote in message
news:ux**************@TK2MSFTNGP02.phx.gbl...
Hi All,

Not sure where the best group to post this is, if you can suggest another
please do.

C# framework 1.1

I have an enumertaion that needs to serialized into a command that is
fired at an API. In our staging environment this works fine, however on
the move to live instead of serialzing the value it produces the integer
equivalent e.g

public enum statusvalue
{
NotSet,
Initialising,
Success,
Fail,
Error
}

on staging if we set the value to statusvalue.Success, it is serialized as
"Success", on live it is "2"

Both live and staging use the same framework, although staging os is
Windows 2000 sp 4 and live is server 2003.

Not seen an issue like this before, so any help much appreciated.


1. How are you serializing it?
2. There could be some version (of the enum) incompatibility somewhere.
Apr 12 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
12612
by: Justin Wright | last post by:
I know that I can set up an enumeration as follows ( just typed in quick so may have syntax errors ): <xsd:simpleType name="colors"> <xsd:restriction base="xsd:string"> <xsd:enumeration...
8
6495
by: aevans1108 | last post by:
Greetings I can't seem to inherit enumerated values from a globally defined type in my XML schema. XmlSchema.Compile() doesn't like it. Here's the schema. <?xml version="1.0"...
1
3644
by: Sergey Poberezovskiy | last post by:
Hi, I have a simple enumeration in my schema: <xs:element name="el_1"> <xs:simpleType> <xs:restiction base="xs:string"> <xs:enumeration value="value and space 1"/> <xs:enumeration...
2
1794
by: Mark | last post by:
Assume you have an enumeration like PhoneType { Home, Business, Cell }. This enumeration corresponds with a lookup/dictionary table in your database like: phone_cd | phone_descr 1 ...
4
5638
by: Marshal | last post by:
Sure... IEnumerable was inconvenient suggesting a separate class to service the enumeration, IEnumerator, and multiple operations: Current, MoveNext, Reset. (I'll warp the definition of "operation"...
0
812
by: abhishekpethia | last post by:
I have .. <Serializable()> _ Public Enum EnumType1 <Xml.Serialization.XmlEnum("Enum1")> Enum1= 112 <Xml.Serialization.XmlEnum("Enum2")> Enum2= 212 End Enum This enumeration type is used as...
2
1284
by: jamie | last post by:
I almost never use enumerations. I've been given a class by using XSD /c on a schema file. This will be used to generate an XML file It gives me back lots of classes Anyways one of those...
3
2521
by: Davidoff | last post by:
Hi, I parse an XML file with a XSD schema. One XmlNode has an attribute whose type is a restriction of xs:string : <xs:simpleType name="stypeDay"> <xs:restriction base="xs:string">...
0
500
by: news.emn.fr | last post by:
Hello, i got this attribute <xs:attribute name="jour"> <xs:simpleType> <xs:restriction base="stypeJour"> </xs:restriction> </xs:simpleType> </xs:attribute>
0
1562
by: John Saunders | last post by:
Given a schema as follows: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">...
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7165
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6887
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3093
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3085
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
656
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
291
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.