Return-Path: Delivered-To: apmail-xml-axis-dev-archive@xml.apache.org Received: (qmail 99501 invoked by uid 500); 22 Jan 2002 15:22:05 -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 99492 invoked from network); 22 Jan 2002 15:22:05 -0000 Message-ID: <20020122152207.15576.qmail@web12808.mail.yahoo.com> Date: Tue, 22 Jan 2002 07:22:07 -0800 (PST) From: Davanum Srinivas Reply-To: dims@yahoo.com Subject: RE: WSDL generation tools 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 Glen, +1 on replacing DOM Document with javax.wsdl.Definition for generateWSDL. Thanks, dims --- Glen Daniels wrote: > > Hi Byrne! > > > For example, I would love to be able to intercept requests for > > '/axis/service?MY_WSDL' and return in the response a slight > > modification > > to the default Axis Java2WSDL translation. Does the Axis framework at > > this point support such functionality? > > Yes. The way the WSDL generation works is very much like a standard invocation of Handlers in > the standard order (transport->global->service->global->transport), except that instead of > calling invoke(MessageContext) on each Handler, generateWSDL(MessageContext) is called instead. > This allows Handlers to put extra information, such as header descriptions, into the WSDL. > > The actual code to introspect a Java class for a service and turn it into WSDL can be found in > the JavaProvider class. This means that by the time the provider returns from generateWSDL(), > there should be a WSDL document in the "WSDL" property in the MessageContext (see AxisServlet's > doGet() for an example of how this gets accessed). > > So your best bet is probably to define a Handler which implements generateWSDL() and deploy it > on the response side of your service (or even in the global response chain if appropriate for > your application). That Handler can grab the WSDL from the MC, edit it, and then put it back. > > <*** ATTN COMMITTERS! ***> > Actually, this brings up an issue with the way the current code is structured. As it stands, > the WSDL is returned as a DOM Document in the MessageContext. I'm thinking we might consider > directly returning a javax.wsdl.Definition instead, and letting the AxisServlet (or whoever else > wants it as XML) serialize it into XML. This would allow use cases like yours to more easily > manipulate the object structure of the WSDL, rather than having to translate it back and forth > between WSDL4J and DOM multiple times.... What do other Axis developers think? > > > > I would love to get involved and experiment in ways to make such > > functionality possible, but I don't want to be reinvent'n the wheel as > > it were. > > Go for it! We're very psyched when people use the engine in new and interesting ways - please > keep us posted as to your progress. > > --Glen ===== Davanum Srinivas - http://jguru.com/dims/ __________________________________________________ Do You Yahoo!? Send FREE video emails in Yahoo! Mail! http://promo.yahoo.com/videomail/