axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milinda Lakmal Pathirage (JIRA)" <>
Subject [jira] Commented: (AXIS2C-557) WSDL2C: generated adb code does not allow any elements to be omitted - too inflexible
Date Thu, 22 Mar 2007 04:44:32 GMT


Milinda Lakmal Pathirage commented on AXIS2C-557:

When the elements are ordered we don't have to check the name of the node. We only have to
check if the element is nillable or minOccurs=0. 
This code part inside the Template will handle this situation:

 <xsl:if test="not(@nillable) and not(@minOccurs=0)">
             /** this is not a nillable element*/
              AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "non nillable or minOuccrs != 0 element
<xsl:value-of select="$propertyName"/> missing"
                                                         " %d :: %s", env->error->error_number,
               return AXIS2_FAILURE;

It is better if you can attach the WSDL to JIRA issue, then we can test it.

> WSDL2C: generated adb code does not allow any elements to be omitted - too inflexible
> -------------------------------------------------------------------------------------
>                 Key: AXIS2C-557
>                 URL:
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>         Environment: Windows XP
>            Reporter: Dave Meier
> I am using WSDL2C with adb data binding.
> The code that is generated requires all elements specified in the WSDL for a given web
service call to be present.  It should instead check the name of each node and allow some
data elements to be omitted.
> Instead it generates code like the following, where it assumes the next node is the node
it expects.  It should check the name of the node and skip to the next expected node if the
name does not match:
>                                    /**
>                                      * because elements are ordered this works fine
>                                      */
>                                    if( current_node != NULL)
>                                    {
>                                        current_node = AXIOM_NODE_GET_NEXT_SIBLING( current_node,
>                                    }
>                            if ( current_node != NULL)
>                            {
>                               current_element = AXIOM_NODE_GET_DATA_ELEMENT( current_node,
>                                       text_value = AXIOM_ELEMENT_GET_TEXT(current_element,
env, current_node );
> Here it blindly gets the text_value and sets it into the field that it expects the value
to be for.  This means that all the nodes must be present or it will set the wrong values
in the fields.  So if  new arguments are added to an object passed in the call, it will no
longer be backwards compatible with clients that are using the older version of the WSDL.

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:
For additional commands, e-mail:

View raw message