You can get Bus from Message if you are in the interceptors, or normally it is 
safe to get bus by calling BusFactory.getDefaultBus(false). Following code 
snippet is from ColocOutInterceptor.java:

        if (bus == null) {
            bus = message.getExchange().get(Bus.class);
            if (bus == null) {
                bus = BusFactory.getDefaultBus(false);
            }
            if (bus == null) {
                throw new Fault(new 
org.apache.cxf.common.i18n.Message("BUS_NOT_FOUND", BUNDLE));
            }
        }

Cheers,
Jervis

> -----Original Message-----
> From: Benson Margulies [mailto:[EMAIL PROTECTED]
> Sent: 2008年1月12日 2:12
> To: cxf-dev
> Subject: Bus convention
> 
> In the process of fixing up something, I think I need to get to the bus
> from some places that don't have an (obvious) relationship to it. E.G.
> AbstractInDatabindingInterceptor.
> 
> Can anyone give me a suggestion?

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to