You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by "Kam K. Yee (JIRA)" <ji...@apache.org> on 2007/11/16 07:18:43 UTC
[jira] Issue Comment Edited: (MUSE-272) xsd:integer elements in
WSDL should be mapped to java.math.BigInteger in client and server Muse's
generated code.
[ https://issues.apache.org/jira/browse/MUSE-272?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12542967 ]
open.zourcerer@gmail.com edited comment on MUSE-272 at 11/15/07 10:16 PM:
------------------------------------------------------------
Attached patch containing fixes. xsd:int are mapped to int and xsd:integer are mapped to BigInteger. A new BigIntegerSerializer was created.
was (Author: open.zourcerer@gmail.com):
Attached patch containing fixes. xsd:int are mapped to Integer and xsd:integer are mapped to BigInteger. A new BigIntegerSerializer was created.
> 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
> Attachments: muse-272.patch
>
>
> 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: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org