axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Catalina Caloian" <>
Subject Re: Incorrect deserialization when the first child is an empty element
Date Fri, 14 Nov 2008 14:30:49 GMT

The patch you've attached seems to solve the problem. 

Unfortunately, it introduces another bug as a side-effect: now, a 'current_node = first_node;'
assignment also happens in the deserialization of structures deduced from the simpleTypes
of a wsdl. This leads to compilation errors because 'current_node', 'first_node' etc. are
not declared in the deserialization methods of simple types (as they have no relevance in
this case).

The workaround I've found was to exclude simple types from the list of nodes for which 'current_node'
needs to be initialized.

<!-- the position()=1 should be outside the otherwise choose of @attribute -->
+             <xsl:choose>
+               <xsl:when test="not(@isarray)">  <!--not an array so continue normal
+                     <xsl:if test="$ordered or not($anon or $istype or @simple) or $choice">
<!-- since non-anon and choices has just only one sub element-->
+                         <xsl:if test="position()=1">
+                           current_node = first_node;
+                           is_early_node_valid = AXIS2_FALSE;


+               </xsl:when>
+               <xsl:otherwise>
+                    current_node = first_node;
+                    is_early_node_valid = AXIS2_FALSE;
+               </xsl:otherwise>
+             </xsl:choose>

However, I'm still a long way from fully understanding the logic behind the template, so I'm
not sure if this workaround is correct.

Thank you for your help.

Catalina-Georgiana Caloian
Software Engineer
T +31 (0) 73 691 07 39
F +31 (0) 73 691 07 54
M +31 (0) 65 247 63 99

From: 	"Dimuthu Gamage" <>
To:	"Apache AXIS C Developers List" <>
Date: 	11/13/2008 7:04 PM
Subject: 	Re: Incorrect deserialization when the first child is an empty element

Hi Catalina,

Looks like there is a bug. It happens that if parent types only contains
attributes, the code that you mentioned is necessary,

  current_node = first_node;
  is_early_node_valid = AXIS2_FALSE;

is never executed.

Please raise a JIRA reporting this issue. I attached a patch (taken from the
latest svn) for give an idea what has gone wrong.


Dimuthu Gamage

This message contains information that may be privileged or confidential and is the property
of Quintiq. It is only intended for the person to whom it is addressed. If you are not the
intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute
or use this message or any part thereof. If you have received this message in error, please
notify the sender immediately and delete all copies of this message. Please note that e-mails
are susceptible to change, therefore they are not binding.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message