Package org.apache.cxf.binding

Examples of org.apache.cxf.binding.Binding


                             "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).anyTimes();
        Message partialResponse = getMessage();
        binding.createMessage(EasyMock.isA(Message.class));
        EasyMock.expectLastCall().andReturn(partialResponse);

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


        source.addSequence(ss, false);
        EasyMock.expectLastCall();
       
        Service service = control.createMock(Service.class);
        EasyMock.expect(endpoint.getService()).andReturn(service);
        Binding binding = control.createMock(Binding.class);
        EasyMock.expect(endpoint.getBinding()).andReturn(binding);
      
        EasyMock.expect(ss.isLastMessage()).andReturn(true);
        EasyMock.expect(ss.getCurrentMessageNr()).andReturn(BigInteger.TEN);
        EasyMock.expect(m.getMessageNumber()).andReturn(BigInteger.TEN).times(2);
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).anyTimes();
        Message partialResponse = getMessage();
        binding.createMessage(EasyMock.isA(Message.class));
        EasyMock.expectLastCall().andReturn(partialResponse);

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

    }

    private Fault createFault(SoapMessage message, JMSFault jmsFault) {
        Fault f = null;
        Endpoint e = message.getExchange().get(Endpoint.class);
        Binding b = null;
        if (null != e) {
            b = e.getBinding();
        }
        if (null != b) {
            SoapFaultFactory sff = new SoapFaultFactory(b);
View Full Code Here

        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

        colocOut.setBus(bus);
        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<? extends Message>>()).atLeastOnce();
        EasyMock.expect(ep.getService()).andReturn(srv).atLeastOnce();
        EasyMock.expect(srv.getInInterceptors())
            .andReturn(new ArrayList<Interceptor<? extends Message>>()).atLeastOnce();
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

            chain.add(((InterceptorProvider)m.getDestination()).getOutInterceptors());
        }
    }
    private PhaseInterceptorChain getChain(Exchange ex) {
        Bus bus = ex.get(Bus.class);
        Binding binding = ex.get(Binding.class);
       
        Endpoint ep = ex.get(Endpoint.class);
       
        List<Interceptor<? extends Message>> i1 = bus.getOutInterceptors();
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Interceptors contributed by bus: " + i1);
        }
        List<Interceptor<? extends Message>> i2 = ep.getService().getOutInterceptors();
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Interceptors contributed by service: " + i2);
        }
        List<Interceptor<? extends Message>> i3 = ep.getOutInterceptors();
        if (LOG.isLoggable(Level.FINE)) {
            LOG.fine("Interceptors contributed by endpoint: " + i3);
        }
        List<Interceptor<? extends Message>> i4 = null;
        if (binding != null) {
            i4 = binding.getOutInterceptors();
            if (LOG.isLoggable(Level.FINE)) {
                LOG.fine("Interceptors contributed by binding: " + i4);
            }
        }
        List<Interceptor<? extends Message>> i5 = null;
View Full Code Here

        org.apache.cxf.service.Service service = factory.create();

        EndpointInfo epi = service.getEndpointInfo(portName);
        serviceInfo = epi.getService();
        assertNotNull(epi);
        Binding xmlBinding = new XMLBindingFactory().createBinding(epi.getBinding());

        control.reset();
        JAXBDataBinding db = new JAXBDataBinding();
        db.initialize(service);
        db.setContext(JAXBContext.newInstance(jaxbClasses));
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.