Package org.apache.cxf.binding

Examples of org.apache.cxf.binding.Binding


        observer = new ColocMessageObserver(ep, bus);
        QName opName = new QName("A", "B");
        msg.put(Message.WSDL_OPERATION, opName);

        EasyMock.expect(ep.getService()).andReturn(srv);
        Binding binding = control.createMock(Binding.class);
        EasyMock.expect(ep.getBinding()).andReturn(binding);
        EndpointInfo ei = control.createMock(EndpointInfo.class);
        EasyMock.expect(ep.getEndpointInfo()).andReturn(ei);
        BindingInfo bi = control.createMock(BindingInfo.class);
        EasyMock.expect(ei.getBinding()).andReturn(bi);
View Full Code Here


    @Test
    public void testObserverOnMessage() throws Exception {
        observer = new TestColocMessageObserver(ep, bus);
        msg.setExchange(ex);
       
        Binding binding = control.createMock(Binding.class);
        EasyMock.expect(ep.getBinding()).andReturn(binding);
       
        Message inMsg = new MessageImpl();
        EasyMock.expect(binding.createMessage()).andReturn(inMsg);

        MessageInfo mi = control.createMock(MessageInfo.class);
        EasyMock.expect(oi.getInput()).andReturn(mi);

        EasyMock.expect(ep.getService()).andReturn(srv).anyTimes();
View Full Code Here

        return conduit;
    }
   
    public static InterceptorChain getOutInterceptorChain(Exchange ex) {
        Bus bus = ex.get(Bus.class);
        Binding binding = ex.get(Binding.class);
        PhaseManager pm = bus.getExtension(PhaseManager.class);
        PhaseInterceptorChain chain = new PhaseInterceptorChain(pm.getOutPhases());
       
        Endpoint ep = ex.get(Endpoint.class);
        List<Interceptor> il = ep.getOutInterceptors();
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Interceptors contributed by endpoint: " + il);
        }
        chain.add(il);
        il = ep.getService().getOutInterceptors();
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Interceptors contributed by service: " + il);
        }
        chain.add(il);
        il = bus.getOutInterceptors();
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Interceptors contributed by bus: " + il);
        }
        chain.add(il);       
        if (binding != null) {
            il = binding.getOutInterceptors();
            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("Interceptors contributed by binding: " + il);
            }
            chain.add(il);
        }
View Full Code Here

                             "org.apache.cxf.ws.addressing.partial.response.sent",
                             Boolean.FALSE);
        Endpoint endpoint = control.createMock(Endpoint.class);
        exchange.get(Endpoint.class);
        EasyMock.expectLastCall().andReturn(endpoint);
        Binding binding = control.createMock(Binding.class);
        endpoint.getBinding();       
        EasyMock.expectLastCall().andReturn(binding);
        Message partialResponse = getMessage();
        binding.createMessage();
        EasyMock.expectLastCall().andReturn(partialResponse);

        Destination target = control.createMock(Destination.class);
        setUpMessageDestination(message, target);
        Conduit backChannel = control.createMock(Conduit.class);
View Full Code Here

public class XMLBindingFactoryTest extends TestCase {
   
    public void testContainsInAttachmentInterceptor() {
        XMLBindingFactory xbf = new XMLBindingFactory();
        Binding b = xbf.createBinding(new BindingInfo(null, null));
       
        boolean found = false;
        for (Interceptor interseptor : b.getInInterceptors()) {
            if (interseptor instanceof AttachmentInInterceptor) {
                found = true;
            }
        }
       
View Full Code Here

        Bus bus = setupBus();
        PhaseManager pm = new PhaseManagerImpl();
        EasyMock.expect(bus.getExtension(PhaseManager.class)).andReturn(pm).times(2);

        Endpoint ep = control.createMock(Endpoint.class);
        Binding  bd = control.createMock(Binding.class);
        Service srv = control.createMock(Service.class);
        ex.setInMessage(msg);
        ex.put(Bus.class, bus);
        ex.put(Endpoint.class, ep);
        ex.put(Service.class, srv);
       
        EasyMock.expect(ep.getBinding()).andReturn(bd);
        EasyMock.expect(bd.createMessage()).andReturn(new MessageImpl());
        EasyMock.expect(ep.getInInterceptors()).andReturn(new ArrayList<Interceptor>()).atLeastOnce();
        EasyMock.expect(ep.getService()).andReturn(srv).atLeastOnce();
        EasyMock.expect(srv.getInInterceptors()).andReturn(new ArrayList<Interceptor>()).atLeastOnce();
        EasyMock.expect(bus.getInInterceptors()).andReturn(new ArrayList<Interceptor>()).atLeastOnce();
       
View Full Code Here

        } catch (SequenceFault sf) {
           
            // log the fault as it may not be reported back to the client
           
            Endpoint e = msg.getExchange().get(Endpoint.class);
            Binding b = null;
            if (null != e) {
                b = e.getBinding();
            }
            if (null != b) {
                RMManager m = getManager();
View Full Code Here

        }

        if (mo instanceof ChainInitiationObserver) {
            ChainInitiationObserver cio = (ChainInitiationObserver) mo;
           
            Binding b = e.getBinding();
            Binding b2 = cio.getEndpoint().getBinding();
            if (b == b2) {
                //re-registering the same endpoint?
                return;
            }
            Object o = cio.getEndpoint().get("allow-multiplex-endpoint");
View Full Code Here


            if (mo instanceof ChainInitiationObserver) {
                ChainInitiationObserver cio = (ChainInitiationObserver) mo;
               
                Binding b = e.getBinding();
                Binding b2 = cio.getEndpoint().getBinding();
                if (b == b2) {
                    //re-registering the same endpoint?
                    return;
                }
                Object o = cio.getEndpoint().get("allow-multiplex-endpoint");
View Full Code Here

        return conduit;
    }
   
    public static InterceptorChain getOutInterceptorChain(Exchange ex) {
        Bus bus = ex.get(Bus.class);
        Binding binding = ex.get(Binding.class);
        PhaseManager pm = bus.getExtension(PhaseManager.class);
        PhaseInterceptorChain chain = new PhaseInterceptorChain(pm.getOutPhases());
       
        Endpoint ep = ex.get(Endpoint.class);
        List<Interceptor<? extends Message>> il = ep.getOutInterceptors();
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Interceptors contributed by endpoint: " + il);
        }
        chain.add(il);
        il = ep.getService().getOutInterceptors();
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Interceptors contributed by service: " + il);
        }
        chain.add(il);
        il = bus.getOutInterceptors();
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Interceptors contributed by bus: " + il);
        }
        chain.add(il);       
        if (binding != null) {
            il = binding.getOutInterceptors();
            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("Interceptors contributed by binding: " + il);
            }
            chain.add(il);
        }
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.Binding

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.