[ 
https://issues.apache.org/jira/browse/AXIS2C-1289?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Lazarski resolved AXIS2C-1289.
-------------------------------------
    Fix Version/s: 2.0.0
                       (was: 1.7.0)
       Resolution: Fixed

  - Issue: The old XSL-based WSDL2C generated deserialization code that used 
position-based matching. When the first element was empty/nillable, it was 
misidentified because empty elements were skipped in position counting.
  - Status: Fixed in 1.7.0 for the old XSL-based generator
  - Native generator: Uses name-based matching (axutil_strcmp(local_name, 
"elementName")), not position-based matching. This design is fundamentally 
correct and doesn't have this class of bugs.

  The native generator correctly handles empty first elements because:
  1. It iterates through all children with axiom_node_get_first_child + 
axiom_node_get_next_sibling
  2. It identifies elements by their XML name, not position
  3. Empty elements (where text_value == NULL) are still recognized by name

  No changes needed - the native generator's design avoids this issue entirely.



> Incorrect deserialization when the first child is an empty element
> ------------------------------------------------------------------
>
>                 Key: AXIS2C-1289
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1289
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>         Environment: Windows XP
> axis2-1.4.1-src with slight changes to the CADBBeanTemplateSource.xsl 
> template to embed some minor bug fixes.
>            Reporter: Catalina Caloian
>            Priority: Major
>              Labels: patch
>             Fix For: 2.0.0
>
>         Attachments: CADBBeanTemplateSource.xsl, XLocate.wsdl, svn.diff
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> Scenario:
>     - the first element in a sequence is nillable
>     - in the actual XML, that first element is present, but is empty
>     - the deserialization code of the parent mishandles this element by not 
> recognizing it as being its *first* child element and by treating it as if it 
> were a child with position >= 2



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to