Package org.apache.cxf.binding.soap

Examples of org.apache.cxf.binding.soap.SoapBinding


        control.verify();       
    }
   
    @Test
    public void testToString() {
        SoapBinding sb = control.createMock(SoapBinding.class);
        EasyMock.expect(sb.getSoapVersion()).andReturn(Soap11.getInstance());
        SoapFault fault = control.createMock(SoapFault.class);
        EasyMock.expect(fault.getReason()).andReturn("r");
        EasyMock.expect(fault.getFaultCode()).andReturn(new QName("ns", "code"));
        EasyMock.expect(fault.getSubCode()).andReturn(new QName("ns", "subcode"));
        control.replay();
View Full Code Here


        return jmsFault;
    }
   
    @Test
    public void createSoap11Fault() {
        SoapBinding sb = control.createMock(SoapBinding.class);
        EasyMock.expect(sb.getSoapVersion()).andReturn(Soap11.getInstance());       
        setupJMSFault(true, SoapJMSConstants.getContentTypeMismatchQName(), null, false);
        control.replay();
       
        SoapFaultFactory factory = new SoapFaultFactory(sb);
        SoapFault fault = (SoapFault)factory.createFault(jmsFault);
View Full Code Here

        control.verify();       
    }
   
    @Test
    public void createSoap12Fault() {
        SoapBinding sb = control.createMock(SoapBinding.class);
        EasyMock.expect(sb.getSoapVersion()).andReturn(Soap12.getInstance());       
        setupJMSFault(true, SoapJMSConstants.getMismatchedSoapActionQName(), null, true);       
        control.replay();
        SoapFaultFactory factory = new SoapFaultFactory(sb);
        SoapFault fault = (SoapFault)factory.createFault(jmsFault);
        assertEquals("reason", fault.getReason());
View Full Code Here

        return sf;
    }
   
    @Test
    public void createSoap11Fault() {
        SoapBinding sb = control.createMock(SoapBinding.class);
        EasyMock.expect(sb.getSoapVersion()).andReturn(Soap11.getInstance());       
        setupSequenceFault(false, RM10Constants.SEQUENCE_TERMINATED_FAULT_QNAME, null);
        control.replay();
        SoapFaultFactory factory = new SoapFaultFactory(sb);
        SoapFault fault = (SoapFault)factory.createFault(sf, createInboundMessage());
        assertEquals("reason", fault.getReason());
View Full Code Here

        control.verify();       
    }
   
    @Test
    public void createSoap12Fault() {
        SoapBinding sb = control.createMock(SoapBinding.class);
        EasyMock.expect(sb.getSoapVersion()).andReturn(Soap12.getInstance());       
        Identifier id = new Identifier();
        id.setValue("sid");
        setupSequenceFault(true, RM10Constants.UNKNOWN_SEQUENCE_FAULT_QNAME, id);       
        control.replay();
        SoapFaultFactory factory = new SoapFaultFactory(sb);
View Full Code Here

        control.verify();       
    }
   
    @Test
    public void createSoap12FaultWithIdentifierDetail() {
        SoapBinding sb = control.createMock(SoapBinding.class);
        EasyMock.expect(sb.getSoapVersion()).andReturn(Soap12.getInstance());       
        Identifier id = new Identifier();
        id.setValue("sid");
        setupSequenceFault(true, RM10Constants.UNKNOWN_SEQUENCE_FAULT_QNAME, id);       
        control.replay();
        SoapFaultFactory factory = new SoapFaultFactory(sb);
View Full Code Here

        control.verify();       
    }
   
    @Test
    public void createSoap12FaultWithAcknowledgementDetail() {
        SoapBinding sb = control.createMock(SoapBinding.class);
        EasyMock.expect(sb.getSoapVersion()).andReturn(Soap12.getInstance());       
        SequenceAcknowledgement ack = new SequenceAcknowledgement();
        Identifier id = new Identifier();
        id.setValue("sid");
        ack.setIdentifier(id);
        SequenceAcknowledgement.AcknowledgementRange range =
View Full Code Here

        control.verify();       
    }
   
    @Test
    public void createSoap12FaultWithoutDetail() {
        SoapBinding sb = control.createMock(SoapBinding.class);
        EasyMock.expect(sb.getSoapVersion()).andReturn(Soap12.getInstance());
        setupSequenceFault(true, RM10Constants.CREATE_SEQUENCE_REFUSED_FAULT_QNAME, null);       
        control.replay();
        SoapFaultFactory factory = new SoapFaultFactory(sb);
        SoapFault fault = (SoapFault)factory.createFault(sf, createInboundMessage());
        assertEquals("reason", fault.getReason());
View Full Code Here

        control.verify();       
    }
   
    @Test
    public void testToString() {
        SoapBinding sb = control.createMock(SoapBinding.class);
        EasyMock.expect(sb.getSoapVersion()).andReturn(Soap11.getInstance());
        SoapFault fault = control.createMock(SoapFault.class);
        EasyMock.expect(fault.getReason()).andReturn("r");
        EasyMock.expect(fault.getFaultCode()).andReturn(new QName("ns", "code"));
        EasyMock.expect(fault.getSubCode()).andReturn(new QName("ns", "subcode"));
        control.replay();
View Full Code Here

        }
    }
   
    private boolean isSOAP12(Message message) {
        if (message.getExchange().getBinding() instanceof SoapBinding) {
            SoapBinding binding = (SoapBinding)message.getExchange().getBinding();
            if (binding.getSoapVersion() == Soap12.getInstance()) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.binding.soap.SoapBinding

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.