You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Daniel David Schäfer (JIRA)" <ax...@ws.apache.org> on 2005/06/22 16:06:14 UTC
[jira] Created: (AXIS-2077) axis 1.2.1 serializes primitive types as multirefs
axis 1.2.1 serializes primitive types as multirefs
--------------------------------------------------
Key: AXIS-2077
URL: http://issues.apache.org/jira/browse/AXIS-2077
Project: Apache Axis
Type: Bug
Components: Serialization/Deserialization
Versions: 1.2.1
Reporter: Daniel David Schäfer
I discovered a problem in axis 1.2.1 that also occurred in previous releases.
The soap-request gets blown up by many multirefs that only contain integers or other primitve types.
I have provided a patch that solves this problem.
===================================================================
RCS file: /usr/local/cvsroot/dev_projects/axis121/src/org/apache/axis/encoding/SerializationContext.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dev_projects/axis121/src/org/apache/axis/encoding/SerializationContext.java 2005/06/22 12:34:12 1.1
+++ dev_projects/axis121/src/org/apache/axis/encoding/SerializationContext.java 2005/06/22 12:49:59 1.2
@@ -610,12 +610,21 @@
public boolean isPrimitive(Object value)
{
if (value == null) return true;
-
+
Class javaType = value.getClass();
if (javaType.isPrimitive()) return true;
-
+
+ if (javaType == Integer.class) return true;
+ if (javaType == Long.class) return true;
+ if (javaType == Double.class) return true;
+ if (javaType == Float.class) return true;
+ if (javaType == Boolean.class) return true;
+ if (javaType == Short.class) return true;
+ if (javaType == Character.class) return true;
+ if (javaType == Byte.class) return true;
if (javaType == String.class) return true;
+
if (Calendar.class.isAssignableFrom(javaType)) return true;
if (Date.class.isAssignableFrom(javaType)) return true;
if (HexBinary.class.isAssignableFrom(javaType)) return true;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (AXIS-2077) axis 1.2.1 serializes primitive types as multirefs
Posted by "Anthony Foiani (JIRA)" <ax...@ws.apache.org>.
[ http://issues.apache.org/jira/browse/AXIS-2077?page=comments#action_12330638 ]
Anthony Foiani commented on AXIS-2077:
--------------------------------------
It looks like this is also being looked at in issue AXIS-1746 and AXIS-1886, with a patch in AXIS-1886. There hasn't been any action on this since March 2005, though.
> axis 1.2.1 serializes primitive types as multirefs
> --------------------------------------------------
>
> Key: AXIS-2077
> URL: http://issues.apache.org/jira/browse/AXIS-2077
> Project: Apache Axis
> Type: Bug
> Components: Serialization/Deserialization
> Versions: 1.2.1
> Reporter: Daniel David Schäfer
>
> I discovered a problem in axis 1.2.1 that also occurred in previous releases.
> The soap-request gets blown up by many multirefs that only contain integers or other primitve types.
> I have provided a patch that solves this problem.
> ===================================================================
> RCS file: /usr/local/cvsroot/dev_projects/axis121/src/org/apache/axis/encoding/SerializationContext.java,v
> retrieving revision 1.1
> retrieving revision 1.2
> diff -u -r1.1 -r1.2
> --- dev_projects/axis121/src/org/apache/axis/encoding/SerializationContext.java 2005/06/22 12:34:12 1.1
> +++ dev_projects/axis121/src/org/apache/axis/encoding/SerializationContext.java 2005/06/22 12:49:59 1.2
> @@ -610,12 +610,21 @@
> public boolean isPrimitive(Object value)
> {
> if (value == null) return true;
> -
> +
> Class javaType = value.getClass();
>
> if (javaType.isPrimitive()) return true;
> -
> +
> + if (javaType == Integer.class) return true;
> + if (javaType == Long.class) return true;
> + if (javaType == Double.class) return true;
> + if (javaType == Float.class) return true;
> + if (javaType == Boolean.class) return true;
> + if (javaType == Short.class) return true;
> + if (javaType == Character.class) return true;
> + if (javaType == Byte.class) return true;
> if (javaType == String.class) return true;
> +
> if (Calendar.class.isAssignableFrom(javaType)) return true;
> if (Date.class.isAssignableFrom(javaType)) return true;
> if (HexBinary.class.isAssignableFrom(javaType)) return true;
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira