[Mono-bugs] [Bug 664152] New: SoapReflectionImporter encodes xmlName but EnumMap does not in GetEnumName
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Jan 12 20:32:25 EST 2011
https://bugzilla.novell.com/show_bug.cgi?id=664152
https://bugzilla.novell.com/show_bug.cgi?id=664152#c0
Summary: SoapReflectionImporter encodes xmlName but EnumMap
does not in GetEnumName
Classification: Mono
Product: Mono: Runtime
Version: 2.8.x
Platform: PC
OS/Version: Ubuntu
Status: NEW
Severity: Normal
Priority: P5 - None
Component: misc
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: ben at skullsquad.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
Created an attachment (id=408117)
--> (http://bugzilla.novell.com/attachment.cgi?id=408117)
a MonoDevelop solution. feel free to just work with main.
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.10
(KHTML, like Gecko) Ubuntu/10.10 Chromium/8.0.552.224 Chrome/8.0.552.224
Safari/534.10
If a SOAP type uses the SoapEnumAttribute to describe a enum field value that
is not a valid language identifier, it fails to create the map correctly. In
my test case, I have an enum as follows:
public enum EnumTest
{
[System.Xml.Serialization.SoapEnumAttribute("0")]
Item0,
}
The default System.Xml.dll with mono 2.8.1 imports this value as '_x0030_', as
a result of the call to XmlConvert.EncodeLocalName on line ~380 in
SoapReflectionImporter.cs.
When subsequent deserialization calls occur (simplified via reflection for the
test case), '0' is passed in as the xmlName, and never encoded to match the map
value provided in the EnumMap constructor.
If you remove the call to XmlConvert.EncodeLocalName on line ~380 in
SoapReflectionImporter.cs, the test (and my SOAP client) both pass correctly.
Reproducible: Always
Steps to Reproduce:
1. Run the attached test case.
Actual Results:
The call fails to correlate the inputted value to the mapped value. In real
life, this causes the xml deserialization to fail when attempting to parse a
SOAP response.
Expected Results:
For the GetEnumName function to correctly correlate the inputted xmlName to the
value stored in the map. This behavior is seen when removing the
EncodeLocalName call.
Sensitive timing on the project this is associated to. For now I'll just
distribute my hacked System.Xml.dll, but a blessed fix from Novell will be
greatly appreciated!
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list