axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Williams,Ed" <EWILLI...@cerner.com>
Subject RE: Explanation of how to use in/out parameters
Date Thu, 10 Jan 2002 21:40:20 GMT
Thank you Russell for the explanation and link (sorry about the user's guide
thing).
Here is my problem with this solution that might be common (hopefully you
can offer a solution).
I have an existing, established, published set of services (Directory
classes with 'read', 'write', 'delete', etc).  Hundreds and hundreds of them
that have been exposed at the java level (through the Directory classes) and
through XML servlets (non-SOAP).  It would be a great burden, not to
consider a non-passive change to all my users, to change the classnames to
'Holders' to indicate in/out.  Can't this be done some other way, like
making the class implement the Holder interface instead?  This would be
passive and it seems more elegant than parsing the name of a class.
Granted, I have no grasp on all the issues that went into this decision.


-----Original Message-----
From: Russell Butek [mailto:butek@us.ibm.com]
Sent: Thursday, January 10, 2002 2:54 PM
To: axis-user@xml.apache.org
Subject: Re: Explanation of how to use in/out parameters


The holders are documented in the JAX-RPC spec
(http://java.sun.com/xml/jaxrpc/index.html).

The users's guide is out of date.  Thanks for bringing this up!  I'll have
to fix it when I get the chance.  WSDL2Java ONLY generates holders if
they're needed.  What you want to do is to change your signature to read:

Widget readWidget(ReadContextHolder rc, WidgetQualifier wq);

Java2WSDL recognizes any parameter ending in "Holder" and having a public
value field as a JAX-RPC holder.  Here's what your holder class should look
like:

public final class ReadContextHolder implements java.io.Serializable {
    public ReadContext value;

    public ReadContextHolder() {
    }

    public ReadContextHolder(ReadContext value) {
        this.value = value;
    }
}

Russell Butek
butek@us.ibm.com


"Williams,Ed" <EWILLIAMS@cerner.com> on 01/10/2002 02:40:09 PM

Please respond to axis-user@xml.apache.org

To:   "'axis-user@xml.apache.org'" <axis-user@xml.apache.org>
cc:
Subject:  Explanation of how to use in/out parameters



Can anyone point me to where in/out parameters have been
discussed/explained, because I seem to be left out?  I've picked up from
that Holders are probably the answer, but I can find nothing on them.

Alternatively, someone please answer the questions I am finding:
The User's Guide (only doc I can find) has a section on Holders in which it
says: "You'll notice that for each data class that Wsdl2java generates,
there is a corresponding "Holder" class".  I don't see any "Holder" classes
generated for my service.
My service has the following method in it:
Widget readWidget(ReadContext rc, WidgetQualifier wq);
I want the ReadContext to be "in/out" and the WidgetQualifier to be "in".
How do you indicate this to the AxisServlet and to the Java2WSDL (?WSDL)
generator?
Any help or info would be greatly appreciated.
Ed
CONFIDENTIALITY NOTICE

This message and any included attachments are from Cerner Corporation and
are intended only for the addressee. The information contained in this
message is confidential and may constitute inside or non-public information
under international, federal, or state securities laws. Unauthorized
forwarding, printing, copying, distribution, or use of such information is
strictly prohibited and may be unlawful. If you are not the addressee,
please promptly delete this message and notify the sender of the delivery
error by e-mail or you may call Cerner's corporate offices in Kansas City,
Missouri, U.S.A at (+1) (816)221-1024.
-------------------------------------------


CONFIDENTIALITY NOTICE

This message and any included attachments are from Cerner Corporation and are intended only
for the addressee. The information contained in this message is confidential and may constitute
inside or non-public information under international, federal, or state securities laws. Unauthorized
forwarding, printing, copying, distribution, or use of such information is strictly prohibited
and may be unlawful. If you are not the addressee, please promptly delete this message and
notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices
in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
-------------------------------------------


Mime
View raw message