Package org.servicemix.ws.xmlbeans.rm

Examples of org.servicemix.ws.xmlbeans.rm.SequenceAcknowledgementDocument$SequenceAcknowledgement$Factory


        codec.handleMessage(message);
        RMProperties rmps = RMContextUtils.retrieveRMProperties(message, false);
        Collection<SequenceAcknowledgement> acks = rmps.getAcks();
        assertNotNull(acks);
        assertEquals(1, acks.size());
        SequenceAcknowledgement ack = acks.iterator().next();
        assertNotNull(ack);
        assertEquals(1, ack.getAcknowledgementRange().size());
        AcknowledgementRange r1 = ack.getAcknowledgementRange().get(0);
        verifyRange(r1, 1, 3);
        assertNull(rmps.getSequence());
        assertNull(rmps.getAcksRequested());
    }
View Full Code Here


     * @param exposed (non-<code>null</code>)
     * @return converted
     */
    public static SequenceAcknowledgement
    convert(org.apache.cxf.ws.rm.v200502wsa15.SequenceAcknowledgement exposed) {
        SequenceAcknowledgement internal = new SequenceAcknowledgement();
        internal.setIdentifier(convert(exposed.getIdentifier()));
        List<SequenceAcknowledgement.AcknowledgementRange> internalRanges
            = internal.getAcknowledgementRange();
        for (org.apache.cxf.ws.rm.v200502wsa15.SequenceAcknowledgement.AcknowledgementRange range
            : exposed.getAcknowledgementRange()) {
            SequenceAcknowledgement.AcknowledgementRange internalRange
                = new SequenceAcknowledgement.AcknowledgementRange();
            internalRange.setLower(range.getLower());
            internalRange.setUpper(range.getUpper());
            internalRanges.add(internalRange);
            putAll(range.getOtherAttributes(), internalRange.getOtherAttributes());
        }
        addAll(exposed.getAny(), internal.getAny());
        putAll(exposed.getOtherAttributes(), internal.getOtherAttributes());
        return internal;
    }
View Full Code Here

     * @param exposed (non-<code>null</code>)
     * @return converted
     */
    public static SequenceAcknowledgement
    convert(org.apache.cxf.ws.rm.v200502.SequenceAcknowledgement exposed) {
        SequenceAcknowledgement internal = new SequenceAcknowledgement();
        internal.setIdentifier(convert(exposed.getIdentifier()));
        List<SequenceAcknowledgement.AcknowledgementRange> internalRanges
            = internal.getAcknowledgementRange();
        for (org.apache.cxf.ws.rm.v200502.SequenceAcknowledgement.AcknowledgementRange range
            : exposed.getAcknowledgementRange()) {
            SequenceAcknowledgement.AcknowledgementRange internalRange
                = new SequenceAcknowledgement.AcknowledgementRange();
            internalRange.setLower(range.getLower());
            internalRange.setUpper(range.getUpper());
            internalRanges.add(internalRange);
            putAll(range.getOtherAttributes(), internalRange.getOtherAttributes());
        }
        addAll(exposed.getAny(), internal.getAny());
        putAll(exposed.getOtherAttributes(), internal.getOtherAttributes());
        return internal;
    }
View Full Code Here

        manager = control.createMock(RMManager.class);
        Source source = control.createMock(Source.class);
        rme = control.createMock(RMEndpoint.class);
        EasyMock.expect(rme.getSource()).andReturn(source).anyTimes();
        interceptor.setManager(manager);
        SequenceAcknowledgement ack1 = control.createMock(SequenceAcknowledgement.class);
        SequenceAcknowledgement ack2 = control.createMock(SequenceAcknowledgement.class);
        Collection<SequenceAcknowledgement> acks = new ArrayList<SequenceAcknowledgement>();
        acks.add(ack1);
        acks.add(ack2);
        EasyMock.expect(rmps.getAcks()).andReturn(acks);
        Identifier id1 = control.createMock(Identifier.class);
        EasyMock.expect(ack1.getIdentifier()).andReturn(id1);
        SourceSequence ss1 = control.createMock(SourceSequence.class);
        EasyMock.expect(source.getSequence(id1)).andReturn(ss1);
        ss1.setAcknowledged(ack1);
        EasyMock.expectLastCall();
        Identifier id2 = control.createMock(Identifier.class);
        EasyMock.expect(ack2.getIdentifier()).andReturn(id2);
        EasyMock.expect(source.getSequence(id2)).andReturn(null);
        control.replay();
        try {
            interceptor.processAcknowledgments(rme, rmps, ProtocolVariation.RM10WSA200408);
            fail("Expected SequenceFault not thrown");
View Full Code Here

        offeringId = oi;

        currentMessageNumber = cmn;
        lastMessage = lm;
        acknowledgement = new SequenceAcknowledgement();
        acknowledgement.setIdentifier(id);
    }
View Full Code Here

   
    @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 =
            new SequenceAcknowledgement.AcknowledgementRange();
        range.setLower(new Long(1));
        range.setUpper(new Long(10));
        ack.getAcknowledgementRange().add(range);  
        setupSequenceFault(true, RM10Constants.INVALID_ACKNOWLEDGMENT_FAULT_QNAME, ack);       
        control.replay();
        SoapFaultFactory factory = new SoapFaultFactory(sb);
        SoapFault fault = (SoapFault)factory.createFault(sf, createInboundMessage());
        assertEquals("reason", fault.getReason());
View Full Code Here

        super(i, pv);
        acksTo = a;
        lastMessageNumber = lmn;
        acknowledgement = ac;
        if (null == acknowledgement) {
            acknowledgement = new SequenceAcknowledgement();
            acknowledgement.setIdentifier(id);
        }
        monitor = new SequenceMonitor();
    }
View Full Code Here

        manager = control.createMock(RMManager.class);
        Source source = control.createMock(Source.class);
        rme = control.createMock(RMEndpoint.class);
        EasyMock.expect(rme.getSource()).andReturn(source).anyTimes();
        interceptor.setManager(manager);
        SequenceAcknowledgement ack1 = control.createMock(SequenceAcknowledgement.class);
        SequenceAcknowledgement ack2 = control.createMock(SequenceAcknowledgement.class);
        Collection<SequenceAcknowledgement> acks = new ArrayList<SequenceAcknowledgement>();
        acks.add(ack1);
        acks.add(ack2);
        EasyMock.expect(rmps.getAcks()).andReturn(acks);
        Identifier id1 = control.createMock(Identifier.class);
        EasyMock.expect(ack1.getIdentifier()).andReturn(id1);
        SourceSequence ss1 = control.createMock(SourceSequence.class);
        EasyMock.expect(source.getSequence(id1)).andReturn(ss1);
        ss1.setAcknowledged(ack1);
        EasyMock.expectLastCall();
        Identifier id2 = control.createMock(Identifier.class);
        EasyMock.expect(ack2.getIdentifier()).andReturn(id2);
        EasyMock.expect(source.getSequence(id2)).andReturn(null);
        control.replay();
        try {
            interceptor.processAcknowledgments(rme, rmps, ProtocolVariation.RM10WSA200408);
            fail("Expected SequenceFault not thrown");
View Full Code Here

        store = new RMTxStore();
        store.setDriverClassName("org.apache.derby.jdbc.EmbeddedDriver");
        store.init();
       
        ack1 = new SequenceAcknowledgement();
        SequenceAcknowledgement.AcknowledgementRange range =
            new SequenceAcknowledgement.AcknowledgementRange();
       
        range.setLower(ONE);
        range.setUpper(ONE);
        ack1.getAcknowledgementRange().add(range);
       
        ack2 = new SequenceAcknowledgement();
        range = new SequenceAcknowledgement.AcknowledgementRange();
        range.setLower(ONE);
        range.setUpper(ONE);
        ack2.getAcknowledgementRange().add(range);
        range = new SequenceAcknowledgement.AcknowledgementRange();
View Full Code Here

       
        Identifier sid = new Identifier();
        sid.setValue(s);
        EndpointReferenceType epr = RMUtils.createAnonymousReference();
       
        SequenceAcknowledgement ack = ack1;
        Long lmn = ZERO;
        ProtocolVariation pv = ProtocolVariation.RM10WSA200408;
        
        if ("sequence2".equals(s)) {
            ack = ack2;
View Full Code Here

TOP

Related Classes of org.servicemix.ws.xmlbeans.rm.SequenceAcknowledgementDocument$SequenceAcknowledgement$Factory

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.