xsd:integer elements in WSDL should be mapped to java.math.BigInteger in client
and server Muse's generated code.
-----------------------------------------------------------------------------------------------------------------
Key: MUSE-272
URL: https://issues.apache.org/jira/browse/MUSE-272
Project: Muse
Issue Type: Bug
Components: Core Engine - Resource and Capability APIs, Core Engine -
WSDL Processing, Tooling - Code Generation, Utilities - General, QName, and XML
Affects Versions: 2.3.0
Environment: not applicable
Reporter: Alberto Rodriguez Galdo (eUSA)
Assignee: Dan Jemiolo
When Apache Muse inspects the WSDL looking for capabilities assigns
primitive 'int' values whenever a xsd:int or xsd:integer data type arises,
common practices and JSR-000222 JAXB 2.1 (Java API for XML Binding) states
that xsd:int values should be mapped to primitive 'int' values and xsd:integer
values to java.math.BigInteger values (Section 6.2 'Simple Type definition',
Table 6-1 'Java Mapping for XML Schema Built-in data types' ) .
Let's check the code:
In org.apache.muse.tools.inspector.ResourceInspector is stated that for both
'xsd:int' and 'xsd:integer' XML-Schema data types, an int.class type is
assigned, as can be seen in this snippet from the code:
public static final QName INT_QNAME = new QName(NAMESPACE_URI, "int",
PREFIX);
public static final QName INTEGER_QNAME = new QName(NAMESPACE_URI,
"integer", PREFIX);
_JAVA_TYPES.put(INT_QNAME, int.class);
_JAVA_TYPES.put(INTEGER_QNAME, int.class);
org.apache.muse.core.serializer.SerializerRegistry one can see that Apache
Muse assigns an IntegerSerializer whenever an int or an Integer is to be
serialized:
registerSerializer(Integer.class, new IntegerSerializer());
registerSerializer(int.class, new IntegerSerializer());
To implement this change, SerializerRegistry, ResourceInspector and maybe
XmlUtils should be changed and a brand new BigIntegerSerializer should be
created.
I'll post a patch against trunk in a few hours...
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]