Uploaded image for project: 'Axis'
  1. Axis
  2. AXIS-2829

Java2WSDL publish array holder parameter as as a non-array type.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.4
    • None
    • WSDL processing
    • None

    Description

      Java2WSDL generate WSDL for java class using array-holder is missing the maxOccurs attribute for Document/literal and Wrapped style. But there is no error for RPC/Encoding style.
      Steps:
      1) Create a Array holder class like fallow:
      public class IntArrayHolder implements javax.xml.rpc.holders.Holder
      {
      public int[] value;
      public IntArrayHolder(){}
      public IntArrayHolder(int[] value)

      { this.value = value;}

      }
      2) Create Java Class that use the holder as parameter:
      public class TestInOutArray{
      public void InOutIntArray(IntArrayHolder intArr)
      {
      int len = intArr.value.length;
      int[] array = new int[len];
      for(int i=0; i < len; i++)

      { array[i] = intArr.value[i] +1; }

      intArr.value = array;
      }
      public int[] echoIntArray(int[] intArr)

      { return intArr; }

      }

      3) run Java2WSDL with option -yWRAPPED.
      You will see the fallowing elements in the WSDL file.
      <element name="InOutIntArray">
      <complexType>
      <sequence>
      <element name="intArr" type="xsd:int"/>
      </sequence>
      </complexType>
      </element>

      <element name="echoIntArray">
      <complexType>
      <sequence>
      <element maxOccurs="unbounded" name="intArr" type="xsd:int"/>
      </sequence>
      </complexType>
      </element>

      Attachments

        1. Types.java
          61 kB
          Rui Li

        Activity

          People

            Unassigned Unassigned
            ruili Rui Li
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: