Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-557

WSDL2C: generated adb code does not allow any elements to be omitted - too inflexible


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Current (Nightly)
    • Fix Version/s: 1.1.0
    • Component/s: code generation
    • Labels:
    • Environment:
      Windows XP


      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, env); }

      if ( current_node != NULL)
      current_element = AXIOM_NODE_GET_DATA_ELEMENT( current_node, env);
      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.


        1. test2.wsdl
          4 kB
          Dave Meier



            • Assignee:
              samisa Samisa Abeysinghe
              hoodoo99 Dave Meier
            • Votes:
              2 Vote for this issue
              0 Start watching this issue


              • Created: