Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 60224 invoked by uid 500); 10 Dec 2002 23:17:23 -0000 Mailing-List: contact axis-dev-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-dev@xml.apache.org Received: (qmail 60173 invoked from network); 10 Dec 2002 23:17:22 -0000 Message-ID: <20021210231725.93735.qmail@web12807.mail.yahoo.com> Date: Tue, 10 Dec 2002 15:17:25 -0800 (PST) From: Davanum Srinivas Reply-To: dims@yahoo.com Subject: Re: Proposed changes to OperationDesc To: axis-dev@xml.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Eric, Please enter this as a bug report at http://nagoya.apache.org/bugzilla. Thanks, dims --- "Norman, Eric" wrote: > I'm working on an project where we want to expose our generic business logic > classes as webservices. However, each of the methods in these classes > expect the first parameter to be a server side (application context) object > that should not be supplied by the client. A servlet filter creates the > appContext object and makes it available for the server side classes to use > (including our custom Axis Provider). In our custom Axis provider, we are > overriding the invokeMethod(..) method to inject the appContext object into > the argument array before invoking the method. That seems to work ok. > However, the generated WSDL still has the offending (supplied on the server > side) parameter in it which we don't want the client applications to have to > worry about. > > Our initial thoughts on how to get rid of the parameter from the WSDL is to > override the initServiceDesc(..) method in our custom Provider and remove > the offending ParameterDesc from the OperationDesc object. Unfortunately, > there doesn't seem to be any method available to remove a parameter from an > OperationDesc. What we really want to do is to supply our own list of > ParameterDesc objects (with the offending one removed). > > There was a partially implemented setParameters(..) call already in the > OperationDesc class. To make our solution work, we fixed/completed the > implementation of the setParameters(..) method and made it public. We are > now able to remove the parameter from the WSDL (by overriding > initServiceDesc(..) in our provider) and it seems to work. > > If there are no objections, I'd like to have someone add this patch to the > main source tree. Below is the source for the method we had to modify. > > ----------------------- > In OperationDesc.java: > ----------------------- > > /** > * Set the parameters wholesale. > * > * @param newParameters an ArrayList of ParameterDescs > */ > public void setParameters(ArrayList newParameters) { > parameters = new ArrayList(); //Keep numInParams correct. > numInParams = 0; > > for( java.util.ListIterator li= newParameters.listIterator(); > li.hasNext(); ){ > addParameter((ParameterDesc) li.next()); > } > } > > . . . . . . . . . . . . . . . . . . . . . . . . > > Eric Norman | Software Engineer > > 600 108th Avenue NE | Suite 900 | Bellevue WA 98004 > T 425.462.1999 x4165 | F 425.637.1192 | enorman@netegrity.com > w w w . n e t e g r i t y . c o m > ===== Davanum Srinivas - http://xml.apache.org/~dims/ __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com