You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by sa...@sdm.de on 2007/06/08 11:59:53 UTC

Variable and complex return types

Hallo,

Situation: I do have a WSDL with an XSD schema of the return type. The return type consists of 20 childs of the root element. Every child is optional and every child is a different complex type. 

Problem: Is it possible to return a collection filled with unknown types with the service? Does Axis2 discover the types automatically and constructs the XML/SOAP response correctly?

Thanx
Sandro


Re: Variable and complex return types

Posted by Davanum Srinivas <da...@gmail.com>.
We don't recommend using pojo style for this scenario. Please start
with a WSDL/XSD and use a databinding that supports this.

thanks,
dims

On 6/8/07, sandro.rodriguez.garzon@sdm.de
<sa...@sdm.de> wrote:
> Sorry for beeing vague, but I have a service that owns a container list with several objects in it. The WSDL (XSD Schema) declares that a maximum number of 20 objects (of different types) can be send back to the client as childs of a root element (e.g. <response></response>). So it could be possible that only 3 types could be send back to the client. e.g.:
>
> <response>
>         <complex type A>
>         <complex type B>
>         <complex type F>
> </response>
>
> So what happens if I try to response with the container list(like in the POJO style example, but with a complex return type). Does the Axis2 Service automatically look into the container list and discovers the type of an object an creates the corresponding xml piece of code in the soap message. Or do I have to use OMElement and iterate through the container list and add every object manually to the soap message?
>
> Thanx
> Sandro
>
> -----Ursprüngliche Nachricht-----
> Von: Davanum Srinivas [mailto:davanum@gmail.com]
> Gesendet: Freitag, 8. Juni 2007 14:41
> An: axis-user@ws.apache.org
> Betreff: Re: Variable and complex return types
>
> Try ADB data binding first, if you run into issues switch to XMLBeans.
> It should work.
>
> thanks,
> dims
>
> On 6/8/07, sandro.rodriguez.garzon@sdm.de <sa...@sdm.de> wrote:
> >
> >
> >
> > Hallo,
> >
> > Situation: I do have a WSDL with an XSD schema of the return type. The
> > return type consists of 20 childs of the root element. Every child is
> > optional and every child is a different complex type.
> >
> > Problem: Is it possible to return a collection filled with unknown
> > types with the service? Does Axis2 discover the types automatically
> > and constructs the XML/SOAP response correctly?
> >
> > Thanx
> > Sandro
>
>
> --
> Davanum Srinivas :: http://davanum.wordpress.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Davanum Srinivas :: http://davanum.wordpress.com

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


AW: Variable and complex return types

Posted by sa...@sdm.de.
Sorry for beeing vague, but I have a service that owns a container list with several objects in it. The WSDL (XSD Schema) declares that a maximum number of 20 objects (of different types) can be send back to the client as childs of a root element (e.g. <response></response>). So it could be possible that only 3 types could be send back to the client. e.g.:

<response>
	<complex type A>
	<complex type B>
	<complex type F>
</response>

So what happens if I try to response with the container list(like in the POJO style example, but with a complex return type). Does the Axis2 Service automatically look into the container list and discovers the type of an object an creates the corresponding xml piece of code in the soap message. Or do I have to use OMElement and iterate through the container list and add every object manually to the soap message?

Thanx
Sandro

-----Ursprüngliche Nachricht-----
Von: Davanum Srinivas [mailto:davanum@gmail.com] 
Gesendet: Freitag, 8. Juni 2007 14:41
An: axis-user@ws.apache.org
Betreff: Re: Variable and complex return types

Try ADB data binding first, if you run into issues switch to XMLBeans.
It should work.

thanks,
dims

On 6/8/07, sandro.rodriguez.garzon@sdm.de <sa...@sdm.de> wrote:
>
>
>
> Hallo,
>
> Situation: I do have a WSDL with an XSD schema of the return type. The 
> return type consists of 20 childs of the root element. Every child is 
> optional and every child is a different complex type.
>
> Problem: Is it possible to return a collection filled with unknown 
> types with the service? Does Axis2 discover the types automatically 
> and constructs the XML/SOAP response correctly?
>
> Thanx
> Sandro


--
Davanum Srinivas :: http://davanum.wordpress.com

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


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


Re: Variable and complex return types

Posted by Davanum Srinivas <da...@gmail.com>.
Try ADB data binding first, if you run into issues switch to XMLBeans.
It should work.

thanks,
dims

On 6/8/07, sandro.rodriguez.garzon@sdm.de
<sa...@sdm.de> wrote:
>
>
>
> Hallo,
>
> Situation: I do have a WSDL with an XSD schema of the return type. The
> return type consists of 20 childs of the root element. Every child is
> optional and every child is a different complex type.
>
> Problem: Is it possible to return a collection filled with unknown types
> with the service? Does Axis2 discover the types automatically and constructs
> the XML/SOAP response correctly?
>
> Thanx
> Sandro


-- 
Davanum Srinivas :: http://davanum.wordpress.com

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