You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Daniel Jemiolo <da...@us.ibm.com> on 2007/06/18 18:59:43 UTC

Re: How to return an array of strings





have you tried just making the response element of type="xsd:string" with
the min/maxOccurs set on it?

Dan



<an...@bt.com> wrote on 05/29/2007 07:29:10 AM:

> Hi,
>
>
>
> I am struggling with the code generation process and the WSDL to return
> a String array.
>
>
>
> In fact, it seems any time I specify a complex type as a response type
> the capability generated returns a single element. This element then is
> wrapped in the actual response element as defined in the wsdl.
>
>
>
> For example, I have the following operation
>
>
>
> <xsd:element name="TestArrayOperation"/>
>
> <xsd:element name="TestArrayOperationResponse">
>
>       <xsd:complexType>
>
>             <xsd:sequence>
>
>                   <xsd:element name="myString" type="xsd:string"
> minOccurs="0" maxOccurs="unbounded"/>
>
>             </xsd:sequence>
>
>       </xsd:complexType>
>
> </xsd:element>
>
>
>
> Which generates the following capability code
>
> public Element testArrayOperation(String myString) throws Exception;
>
>
>
> This allows me to return only a single element, whereas I specified the
> operation to return an unbounded number of myStrings.  I believe this
> issue is similar to what was discussed earlier
> (http://marc.info/?l=muse-user&m=117679055209929&w=2). I am using a
> nightly build from muse-2.3.0-2007-05-25-02-00-bin
>
>
>
> Regards
>
> Andreas Maierhofer
>
>
>
>
>
>
>
>
>

RE: How to return an array of strings

Posted by "Vinh Nguyen (vinguye2)" <vi...@cisco.com>.
Andreas,
Your xsd looks ok.  So you might be able to safely change the generated
capability signature to:

public String[] testArrayOperation(String myString) throws Exception;

or:

public Element[] testArrayOperation(String myString) throws Exception;


-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Monday, June 18, 2007 10:00 AM
To: muse-user@ws.apache.org
Subject: Re: How to return an array of strings






have you tried just making the response element of type="xsd:string"
with the min/maxOccurs set on it?

Dan



<an...@bt.com> wrote on 05/29/2007 07:29:10 AM:

> Hi,
>
>
>
> I am struggling with the code generation process and the WSDL to 
> return a String array.
>
>
>
> In fact, it seems any time I specify a complex type as a response type

> the capability generated returns a single element. This element then 
> is wrapped in the actual response element as defined in the wsdl.
>
>
>
> For example, I have the following operation
>
>
>
> <xsd:element name="TestArrayOperation"/>
>
> <xsd:element name="TestArrayOperationResponse">
>
>       <xsd:complexType>
>
>             <xsd:sequence>
>
>                   <xsd:element name="myString" type="xsd:string"
> minOccurs="0" maxOccurs="unbounded"/>
>
>             </xsd:sequence>
>
>       </xsd:complexType>
>
> </xsd:element>
>
>
>
> Which generates the following capability code
>
> public Element testArrayOperation(String myString) throws Exception;
>
>
>
> This allows me to return only a single element, whereas I specified 
> the operation to return an unbounded number of myStrings.  I believe 
> this issue is similar to what was discussed earlier 
> (http://marc.info/?l=muse-user&m=117679055209929&w=2). I am using a 
> nightly build from muse-2.3.0-2007-05-25-02-00-bin
>
>
>
> Regards
>
> Andreas Maierhofer
>
>
>
>
>
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-user-help@ws.apache.org