You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Donnie Hale <li...@haleonline.net> on 2004/12/25 00:33:06 UTC

(Repost) JavaProvider extensibility how-to?

(I posted the substance of this message but got no response. I could really
use some guidance.)

I want to use as much of Axis' built-in functionality as possible, but I
need some extensibility, too. My requirements are:

- Specify a Java interface rather than a concrete class in the .wsdd file.
- Maintain the "?wsdl" functionality for the methods in that interface.
- Maintain Axis' creation of the method parameters from the SOAP elements
and its handling of method return values.
- Have my service object be obtained from a factory I implement.

Right now, JavaProvider seems to be tightly coupled to the notion of taking
the specified service classname and, depending on the specified scope and
some built-in caching, getting a class object based on that name and
instantiating a new instance.

***POSSIBLE BUG***
JavaProvider does have a code path to handle "Scope.FACTORY", but it's not
clear what's supposed  to happen there. In fact, it looks like either dead
or incomplete code because it relies on an "objectID" property and the
"serviceObjects" HashMap in the SOAPService class. From what I can tell,
that HashMap member variable never has anything put into it (I did a global
search on "serviceObjects" through the whole Axis source tree).

***PROPOSAL***
This is sort of stream-of-consciousness, but perhaps Axis ought to have a
ServiceObjectFactory interface which JavaProvider uses to get new service
objects. The interface's important method would be "getServiceObject" whose
parameters are the MessageContext and class name. A default class like
ScopedServiceObjectFactory would be used if no other factory was explicitly
specified. But there would be a way to configure a different factory for a
service that could do whatever it wanted to come up with a service object.
Just some thoughts...

If anyone has any ideas on how to do this, I'd appreciate it. I can
elaborate more if what I'm describing isn't clear.

Thanks!

Donnie