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 Massimo Barabino <ms...@virgilio.it> on 2003/12/29 17:27:01 UTC

Holder Classes problem

Hi all,
when are Holder Classes generated by WSDL2Java?
Reading the user guide, it says that they are generated if a type is used
as an input or uotput parameter. In my own service I use a complex type
(JavaBean) as input (and output) parameter of one of my service' s methods.
The problem is that I don' t see the Holder class generated. WSDL2Java just
generates a class for that type.
Should I expect to see a Holder or have I misunderstood the user guide?
Thanks in advance

Massimo Barabino



Re: Holder Classes problem

Posted by Christopher Blunck <bl...@gst.com>.
On Mon, Dec 29, 2003 at 11:57:01AM -0800, Albert Lin wrote:
> I believe that WSDL2Java only generates Holder classes if there are 
> multiple output parameters. For example, if a service method only has 
> one output parameter, then WSDL2Java will generate a Java method with 
> the output parameter as its return type. (That's probably why you don't 
> have any Holder classes -- my guess is that your method only has one 
> output, so WSDL2Java doesn't need to create any Holder classes.) But if 
> there are two or more output parameters, it generates Holder classes 
> for complex types so that you can set multiple return values.

That's how Axis behaves for me.  

Multiple complex output parameters -> holder classes
Single complex output parameter -> regular class returned from method


-c

-- 
 11:20:00  up 35 days,  1:04, 10 users,  load average: 0.35, 0.19, 0.09

Re: Holder Classes problem

Posted by Albert Lin <ac...@symphoniq.com>.
I believe that WSDL2Java only generates Holder classes if there are 
multiple output parameters. For example, if a service method only has 
one output parameter, then WSDL2Java will generate a Java method with 
the output parameter as its return type. (That's probably why you don't 
have any Holder classes -- my guess is that your method only has one 
output, so WSDL2Java doesn't need to create any Holder classes.) But if 
there are two or more output parameters, it generates Holder classes 
for complex types so that you can set multiple return values.

-- Albert

On Monday, December 29, 2003, at 08:27  AM, Massimo Barabino wrote:

> Hi all,
> when are Holder Classes generated by WSDL2Java?
> Reading the user guide, it says that they are generated if a type is 
> used
> as an input or uotput parameter. In my own service I use a complex type
> (JavaBean) as input (and output) parameter of one of my service' s 
> methods.
> The problem is that I don' t see the Holder class generated. WSDL2Java 
> just
> generates a class for that type.
> Should I expect to see a Holder or have I misunderstood the user guide?
> Thanks in advance
>
> Massimo Barabino
>
>
>