Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.4
-
None
-
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)
}
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++)
intArr.value = array;
}
public int[] echoIntArray(int[] 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>