Hi,

I try to get used to the inner workings of cxf. I suppose it is possible
to add new ServiceFactories to cxf, but how would this be done?

If I create a new ServiceFactory by subclassing AbstractServiceFactory,
how do I add it to cxf?

Another thing: the documentation talks about customizing the behaviour
of ReflectionServiceFactoryBean by adding ServiceConfigurations. How do
I add these ServiceConfigurations to cxf in a servlet environment. The
example creates the server from scratch, but I understand that in a
servlet context, the Server instance is started (I think) from CXFServlet..?

I try to do this:

public class MyCustomServlet extends CXFServlet
{
    @Override
    public void init(ServletConfig servletConfig)
                  throws ServletException
    {
        super.init(servletConfig);

        Bus bus = getBus();
        BusFactory.setDefaultBus(bus);

        ReflectionServiceFactoryBean serviceFactory =
                     new ReflectionServiceFactoryBean();
        serviceFactory.getServiceConfigurations()
                     .add(0, new AbstractServiceConfiguration()
        {
                .. my programmatically created service setup ..
        });

        ... now, how to set my custom ServiceFactory to be used? ...

        // standard JAX-WS service creation
        Endpoint.publish("/OtherService", new OtherServiceImpl());
    }
}

Thanks,
-- Michael

-- 
Dipl.-Technoinform Michael Kleinhenz

tarent
Gesellschaft für Softwareentwicklung und IT-Beratung mbH

Heilsbachstr. 24, 53123 Bonn  | Poststr. 4-5, 10178 Berlin
fon: +49(228) / 52675-0       | fon: +49(30) / 27594853
fax: +49(228) / 52675-25      | fax: +49(30) / 78709617

Geschäftsführer: Boris Esser, Elmar Geese, Thomas Müller-Ackermann
HRB AG Bonn 5168 - Ust-ID: DE122264941

Reply via email to