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
<soapenv:Body>
<getUser>
<id>jsmith</id>
</getUser>
</soapenv:Body>

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:

<soapenv:Body>
<getUserResponse>
<user>
<name>John Smith</name>
<address>10 Main St.</address>
</user>
</getUser>
</soapenv:Body>

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
<soapenv:Body>
<getUserResponse>
<getUserResult>
...
</getUserResult>
</getUserResponse
I think <getUserResponse> is parallel to the <getUser> (wrapper tag),
and <getUserResult> is possibly to differentiate between the return
value and output parameters.

b) The <user> 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!
Bill

Reply via email to