You are viewing a plain text version of this content. The canonical link for it is here.
Posted to savan-dev@ws.apache.org by "Rui Li (JIRA)" <ax...@ws.apache.org> on 2010/05/06 19:31:05 UTC

[jira] Issue Comment Edited: (AXIS-2829) Java2WSDL publish array holder parameter as as a non-array type.

    [ https://issues.apache.org/jira/browse/AXIS-2829?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864829#action_12864829 ] 

Rui Li edited comment on AXIS-2829 at 5/6/10 1:29 PM:
------------------------------------------------------

The easy work around is add the maxOccurs attribute manually, the run time will run without error.

      was (Author: ruili):
    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
>         Attachments: Types.java
>
>
> 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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org