[
https://issues.apache.org/jira/browse/AXIS-2829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864829#action_12864829
]
Rui Li commented on AXIS-2829:
------------------------------
The easy work around is add the maxOccurs attribute menuly, the run will run
without error.
> Java2WSDL publish array holder parameter as as a non-array type.
> -----------------------------------------------------------------
>
> Key: AXIS-2829
> URL: https://issues.apache.org/jira/browse/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.
> 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>
--
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: [email protected]
For additional commands, e-mail: [email protected]