axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Keese <>
Subject Re: wrapped/literal: complex return value
Date Thu, 13 Jan 2005 03:43:03 GMT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<body bgcolor="#ffffff" text="#000000">
Cool, thanks!&nbsp;&nbsp; Are you implying that document/literal and
wrapped/literal are the same w.r.t. the return value?&nbsp; The difference
is only for the request?<br>
Also, does your answer implay that a scalar return value can be
represented simply like this?<br>
&nbsp; Hello World!<br>
And the WSDL would be this?<br>
<pre wrap="">&lt;wsdl:message name="getUserResponse"&gt;
 &lt;wsdl:part name="parameters" type="xsd:string"/&gt;
Anne Thomas Manes wrote:
<blockquote cite=""
  <pre wrap="">If you want your return value to be a User object, then that should be
your return structure, not getUserResponse. i.e.,

&lt;name&gt;John Smith&lt;/name&gt;
&lt;address&gt;10 Main St.&lt;/address&gt;

The output message should be defined so:

&lt;wsdl:message name="getUserResponse"&gt;
 &lt;wsdl:part name="parameters" element="tns:user"/&gt;

- Anne

On Wed, 12 Jan 2005 18:41:24 +0900, Bill Keese
<a class="moz-txt-link-rfc2396E"
  <blockquote type="cite">
    <pre wrap="">I have a few questions about return values from a method in a
wrapped/literal server.

(1) My getUser() method returns a structure:

User getUser(String id);

I know that for wrapped/literal the input message should be

What should the response be, such that a client's generated stubs (for
wrapped/literal mode) don't contain any unnecessary structures? IE, if
this is the return value:

&lt;name&gt;John Smith&lt;/name&gt;
&lt;address&gt;10 Main St.&lt;/address&gt;

Will .NET generate a function stub like this?
User getUser(String id)

or will it generate a stub like this?

GetUserResponse getUser(String id);

where GetUserResponse is a dummy wrapper class like this:

class GetUserResponse { User user; }

(2) Has anyone gotten this to work with Axis? I hand-wrote my WSDL file,
and then used WSDL2Java to generate the deploy.wsdd file. I see two
problems in my testing but I wonder if anyone can confirm or deny.
a) Axis seems to want to print 2 nested tags
I think &lt;getUserResponse&gt; is parallel to the &lt;getUser&gt; (wrapper
and &lt;getUserResult&gt; is possibly to differentiate between the return
value and output parameters.

b) The &lt;user&gt; tag itself is not printed; only the fields inside of the
User class are printed. It's as though Axis is assuming the User class
is a wrapper class that contains a list of output values

Can anyone comment on these things? Thanks!

  <pre wrap=""><!---->


View raw message