Examples of CreateSequenceResponseType


Examples of org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType

                    ? to.getAddress().getValue() : null);
                LOG.log(Level.INFO, msg.toString());
                throw new RMException(msg);
            }
            Proxy proxy = source.getReliableEndpoint().getProxy();
            CreateSequenceResponseType createResponse =
                proxy.createSequence(acksTo, relatesTo, isServer, protocol);
            if (!isServer) {
                Servant servant = source.getReliableEndpoint().getServant();
                servant.createSequenceResponse(createResponse, protocol);
            }
View Full Code Here

Examples of org.apache.cxf.ws.rm.v200702.CreateSequenceResponseType

        Message message = setupInboundMessage(RM10Constants.CREATE_SEQUENCE_ACTION, false);
        rme.receivedControlMessage();
        EasyMock.expectLastCall();
        Servant servant = control.createMock(Servant.class);
        EasyMock.expect(rme.getServant()).andReturn(servant);
        CreateSequenceResponseType csr = control.createMock(CreateSequenceResponseType.class);
        EasyMock.expect(servant.createSequence(message)).andReturn(csr);
        Proxy proxy = control.createMock(Proxy.class);
        EasyMock.expect(rme.getProxy()).andReturn(proxy);
        proxy.createSequenceResponse(csr);
        EasyMock.expectLastCall();
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.CreateSequenceResponseType

       
        setupCreateSequence(null, null, true, true);
       
        control.replay();
       
        CreateSequenceResponseType csr = (new RMServant()).createSequence(dest, cs, maps);
       
        control.verify();

        assertSame(sid, csr.getIdentifier());
        assertNotNull(csr.getAccept())
        assertTrue(!Names.WSA_NONE_ADDRESS
                   .equals(csr.getAccept().getAcksTo().getAddress().getValue()));       
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.CreateSequenceResponseType

       
        setupCreateSequence(null, null, true, false);
       
        control.replay();
       
        CreateSequenceResponseType csr = (new RMServant()).createSequence(dest, cs, maps);
       
        control.verify();

        assertSame(sid, csr.getIdentifier());
        assertNotNull(csr.getAccept())
        assertEquals(Names.WSA_NONE_ADDRESS, csr.getAccept().getAcksTo().getAddress().getValue());       
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.CreateSequenceResponseType

       
        setupCreateSequence(null, null, false, false);
       
        control.replay();
       
        CreateSequenceResponseType csr = (new RMServant()).createSequence(dest, cs, maps);
       
        control.verify();

        assertSame(sid, csr.getIdentifier());
        assertNull(csr.getAccept());  
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.CreateSequenceResponseType

       
        setupCreateSequence("PT24H", "PT48H", false, false);
       
        control.replay();
       
        CreateSequenceResponseType csr = (new RMServant()).createSequence(dest, cs, maps);
       
        control.verify();

        assertSame(sid, csr.getIdentifier());
        assertNull(csr.getAccept());         
        assertEquals("PT24H", csr.getExpires().getValue().toString());
    }
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.CreateSequenceResponseType

            LOG.fine("Action: " + action);
        }

        if (RMUtils.getRMConstants().getCreateSequenceResponseAction().equals(action)) {
            Object[] parameters = (Object[])context.get(ObjectMessageContext.METHOD_PARAMETERS);
            CreateSequenceResponseType csr = (CreateSequenceResponseType)parameters[0];
            getServant().createSequenceResponse(getSource(),
                                                csr,
                                                getProxy().getOfferedIdentifier());

            return;
        } else if (RMUtils.getRMConstants().getCreateSequenceAction().equals(action)) {
            Object[] parameters = (Object[])context.get(ObjectMessageContext.METHOD_PARAMETERS);
            CreateSequenceType cs = (CreateSequenceType)parameters[0];

            final CreateSequenceResponseType csr =
                getServant().createSequence(getDestination(), cs, maps);
           
            Runnable response = new Runnable() {
                public void run() {
                    try {
View Full Code Here

Examples of org.objectweb.celtix.ws.rm.CreateSequenceResponseType

    public CreateSequenceResponseType createSequence(RMDestination destination,
                                                     CreateSequenceType cs,
                                                     AddressingProperties maps)
        throws SequenceFault {
       
        CreateSequenceResponseType csr = RMUtils.getWSRMFactory().createCreateSequenceResponseType();
        csr.setIdentifier(destination.generateSequenceIdentifier());

        DestinationPolicyType dp = destination.getDestinationPolicies();
        Duration supportedDuration = dp.getSequenceExpiration();
        if (null == supportedDuration) {
            supportedDuration = SourceSequence.PT0S;
        }
        Expires ex = cs.getExpires();
        LOG.info("supported duration: "  + supportedDuration);

        if (null != ex || supportedDuration.isShorterThan(SourceSequence.PT0S)) {
            Duration effectiveDuration = supportedDuration;
            if (null != ex && supportedDuration.isLongerThan(ex.getValue()))  {
                effectiveDuration = supportedDuration;
            }
            ex = RMUtils.getWSRMFactory().createExpires();
            ex.setValue(effectiveDuration);
            csr.setExpires(ex);
        }
       
        OfferType offer = cs.getOffer();
        if (null != offer) {
            AcceptType accept = RMUtils.getWSRMFactory().createAcceptType();
            if (dp.isAcceptOffers()) {
                RMSource source = destination.getHandler().getSource();
                LOG.fine("Accepting inbound sequence offer");
                AttributedURI to = VersionTransformer.convert(maps.getTo());
                accept.setAcksTo(RMUtils.createReference(to.getValue()));
                SourceSequence seq = new SourceSequence(offer.getIdentifier(),
                                                                    null,
                                                                    csr.getIdentifier());
                seq.setExpires(offer.getExpires());
                seq.setTarget(VersionTransformer.convert(cs.getAcksTo()));
                source.addSequence(seq);
                source.setCurrent(csr.getIdentifier(), seq);     
                LOG.fine("Making offered sequence the current sequence for responses to "
                         + csr.getIdentifier().getValue());
            } else {
                LOG.fine("Refusing inbound sequence offer");
                accept.setAcksTo(RMUtils.createReference(Names.WSA_NONE_ADDRESS));
            }
            csr.setAccept(accept);
        }

        DestinationSequence seq = new DestinationSequence(csr.getIdentifier(), cs.getAcksTo(), destination);
        seq.setCorrelationID(maps.getMessageID().getValue());
        destination.addSequence(seq);
       
        return csr;
    }
View Full Code Here

Examples of org.servicemix.ws.xmlbeans.rm.CreateSequenceResponseType

            s.expires = convertToLocalTime(createSequence.getExpires());
       
        sequenceStore.create(s);
       
        CreateSequenceResponseDocument responseDoc = CreateSequenceResponseDocument.Factory.newInstance();
        CreateSequenceResponseType response = responseDoc.addNewCreateSequenceResponse();
        Identifier identifier = response.addNewIdentifier();
        identifier.setStringValue(s.identifier);
        if(s.expires!=0)
            response.setExpires(convertToDuration(s.expires));
           
        return null;
    }
View Full Code Here

Examples of org.xmlsoap.schemas.ws._2005._02.rm.CreateSequenceResponseType

        if (specifyExpires) {
            Expires expires = new Expires();
            createArguments.setExpires(expires);
        }

        CreateSequenceResponseType response = sequenceManager.createSequence(createArguments);
        Identifier identifier = response.getIdentifier();
        String value = identifier.getValue();
        assertNotNull("Should have an identifier", value);
       
        System.out.println("Created identifier: " + value);
        System.out.println("Accept: " + response.getAccept());
       
        TerminateSequenceType terminateArgs = new TerminateSequenceType();
        terminateArgs.setIdentifier(identifier);
        sequenceManager.terminateSequence(terminateArgs);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.