Search in sources :

Example 1 with SaajUniverse

use of org.apache.openejb.server.webservices.saaj.SaajUniverse in project tomee by apache.

the class SaajInterceptor method registerInterceptors.

public static synchronized void registerInterceptors() {
    if (!interceptorsRegistered) {
        final Bus bus = CxfUtil.getBus();
        final ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
        Thread.currentThread().setContextClassLoader(CxfUtil.initBusLoader());
        try {
            SaajUniverse universe = new SaajUniverse();
            bus.getOutInterceptors().add(new SaajOutInterceptor(universe));
            bus.getInInterceptors().add(new SaajInInterceptor(universe));
            bus.getInInterceptors().add(new SaajInFaultInterceptor(universe));
        } finally {
            if (oldLoader != null) {
                CxfUtil.clearBusLoader(oldLoader);
            }
        }
        interceptorsRegistered = true;
    }
}
Also used : Bus(org.apache.cxf.Bus) SaajUniverse(org.apache.openejb.server.webservices.saaj.SaajUniverse)

Example 2 with SaajUniverse

use of org.apache.openejb.server.webservices.saaj.SaajUniverse in project tomee by apache.

the class ServiceEndpointMethodInterceptor method intercept.

public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
    SaajUniverse universe = new SaajUniverse();
    universe.set(SaajUniverse.AXIS1);
    try {
        return doIntercept(method, objects, methodProxy);
    } finally {
        universe.unset();
    }
}
Also used : SaajUniverse(org.apache.openejb.server.webservices.saaj.SaajUniverse)

Example 3 with SaajUniverse

use of org.apache.openejb.server.webservices.saaj.SaajUniverse in project tomee by apache.

the class AxisWsContainer method onMessage.

public void onMessage(final HttpRequest request, final HttpResponse response) throws Exception {
    final SaajUniverse universe = new SaajUniverse();
    universe.set(SaajUniverse.AXIS1);
    try {
        doService(request, response);
    } finally {
        universe.unset();
    }
}
Also used : SaajUniverse(org.apache.openejb.server.webservices.saaj.SaajUniverse)

Aggregations

SaajUniverse (org.apache.openejb.server.webservices.saaj.SaajUniverse)3 Bus (org.apache.cxf.Bus)1