Hi Mathias,
the simplest seems to be to specify your own invoker
<service>
<name>UserService</name>
...
<invoker>...</invoker>
...
In your invoker (which extends AbstractInvoker)
you can override getServiceObject():
public Object getServiceObject(final MessageContext context)
throws XFireFault{
Service service=context.getService();
String name=service.getSimpleName();
Object myServiceObject=...
return myServiceObject;
}
Hope this works for you :)
Best regards,
Bernd.
Mathias Scharl wrote:
I want to export several webservices from my application framework.
when I define a services.xml file and provide the implementing service
class
XFire creates a new instance of this class.
e.g.
<service>
<name>UserService</name>
<namespace>http://localhost:8080/content/services/UserService</namespace>
<serviceClass>some.package.api.UserService</serviceClass>
<implementationClass>some.package.impl.UserServiceImpl</implementationClass>
</service>
What I want is to specify my personal "factory" which takes the services
name as a parameter,
does the lookup in my framework and returns the instance of the already
initalized service.
How do I integrate this "factory" in the services.xml file? Do I need to
specify an Invoker,
and how can I pass him a serviceName as a paramter?
--
Dr. Bernd Schuller
Central Institute for Applied Mathematics
Forschungszentrum Juelich GmbH
mail [EMAIL PROTECTED]
phone +49 2461 61 8736
fax +49 2461 61 6656
blog http://www.jroller.com/page/gridhaus
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email