ws-sandesha-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rui Li (JIRA)" <>
Subject [jira] Created: (AXIS-2829) Java2WSDL publish array holder parameter as as a non-array type.
Date Thu, 06 May 2010 16:54:48 GMT
Java2WSDL publish array holder parameter as as a non-array type. 

                 Key: AXIS-2829
             Project: Axis
          Issue Type: Bug
          Components: WSDL processing
    Affects Versions: 1.4
            Reporter: Rui Li
            Priority: Minor

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.
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">
      <element name="intArr" type="xsd:int"/>

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

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