Package org.apache.cxf.ws.rm

Examples of org.apache.cxf.ws.rm.Identifier


    @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));
View Full Code Here


    }
   
    private Identifier setupDestinationSequence(String s) throws IOException, SQLException {
        DestinationSequence seq = control.createMock(DestinationSequence.class);
       
        Identifier sid = RMUtils.getWSRMFactory().createIdentifier();
        sid.setValue(s);
        EndpointReferenceType epr = RMUtils.createAnonymousReference2004();
       
        SequenceAcknowledgement ack = ack1;
        Long lmn = ZERO;
        
View Full Code Here

        return sid;
    }
   
    private Identifier setupSourceSequence(String s) throws IOException, SQLException {
        SourceSequence seq = control.createMock(SourceSequence.class);       
        Identifier sid = RMUtils.getWSRMFactory().createIdentifier();
        sid.setValue(s);     
           
        Date expiry = null;
        Identifier osid = null;
        Long cmn = ONE;
        boolean lm = false;
       
        if ("sequence2".equals(s)) {
            expiry = new Date(System.currentTimeMillis() + 3600 * 1000);
            osid = RMUtils.getWSRMFactory().createIdentifier();
            osid.setValue("offeringSequence");
            cmn = TEN;
            lm = true;           
        }
       
        EasyMock.expect(seq.getIdentifier()).andReturn(sid);
View Full Code Here

            }
            assert null != createSrcSequenceStmt;
            createSrcSequenceStmt.setString(1, sequenceIdentifier);
            Date expiry = seq.getExpires();
            createSrcSequenceStmt.setLong(2, expiry == null ? 0 : expiry.getTime());
            Identifier osid = seq.getOfferingSequenceIdentifier();
            createSrcSequenceStmt.setString(3, osid == null ? null : osid.getValue());
            createSrcSequenceStmt.setString(4, endpointIdentifier);
            createSrcSequenceStmt.execute();   
           
            commit();
           
View Full Code Here

                long cmn = res.getLong(1);
                boolean lm = res.getBoolean(2);
                long lval = res.getLong(3);
                Date expiry = 0 == lval ? null : new Date(lval);
                String oidValue = res.getString(4);
                Identifier oi = null;
                if (null != oidValue) {
                    oi = RMUtils.getWSRMFactory().createIdentifier();
                    oi.setValue(oidValue);
                }                           
                return new SourceSequence(sid, expiry, oi, cmn, lm);
                         
            }
        } catch (SQLException ex) {
View Full Code Here

            }
            selectDestSequencesStmt.setString(1, endpointIdentifier);
           
            ResultSet res = selectDestSequencesStmt.executeQuery();
            while (res.next()) {
                Identifier sid = RMUtils.getWSRMFactory().createIdentifier();               
                sid.setValue(res.getString(1));
                EndpointReferenceType acksTo = RMUtils.createReference2004(res.getString(2))
                long lm = res.getLong(3);
                InputStream is = res.getBinaryStream(4);
                SequenceAcknowledgement ack = null;
                if (null != is) {
View Full Code Here

            }
            selectSrcSequencesStmt.setString(1, endpointIdentifier);
            ResultSet res = selectSrcSequencesStmt.executeQuery();
           
            while (res.next()) {
                Identifier sid = RMUtils.getWSRMFactory().createIdentifier();
                sid.setValue(res.getString(1));
                long cmn = res.getLong(2);
                boolean lm = res.getBoolean(3);
                long lval = res.getLong(4);
                Date expiry = 0 == lval ? null : new Date(lval);
                String oidValue = res.getString(5);
                Identifier oi = null;
                if (null != oidValue) {
                    oi = RMUtils.getWSRMFactory().createIdentifier();
                    oi.setValue(oidValue);
                }                           
                SourceSequence seq = new SourceSequence(sid, expiry, oi, cmn, lm);
                seqs.add(seq);                         
            }
        } catch (SQLException ex) {
View Full Code Here

        Marshaller m = ctx.createMarshaller();
        if (RMConstants.getInvalidAcknowledgmentFaultCode().equals(fault.getSubCode())) {
            SequenceAcknowledgement ack = (SequenceAcknowledgement)detail;
            m.marshal(ack, doc);
        } else if (!RMConstants.getCreateSequenceRefusedFaultCode().equals(fault.getSubCode())) {
            Identifier id = (Identifier)detail; 
            m.marshal(id, doc);           
        }
        elem = (Element)doc.getChildNodes().item(0);
        fault.setDetail(elem);
    }
View Full Code Here

     * @return ResendCandidate
     */   
    protected ResendCandidate cacheUnacknowledged(Message message) {
        RMProperties rmps = RMContextUtils.retrieveRMProperties(message, true);
        SequenceType st = rmps.getSequence();
        Identifier sid = st.getIdentifier();
        String key = sid.getValue();
       
        ResendCandidate candidate = null;
       
        synchronized (this) {
            List<ResendCandidate> sequenceCandidates = getSequenceCandidates(key);
View Full Code Here

        message = setupOutboundFaultMessage();
        SequenceFaultType sft = RMUtils.getWSRMFactory().createSequenceFaultType();
        sft.setFaultCode(RMConstants.getUnknownSequenceFaultCode());
        SequenceFault sf = new SequenceFault("REASON");
        sf.setSequenceFault(sft);
        Identifier sid = RMUtils.getWSRMFactory().createIdentifier();
        sid.setValue("SID");
        sf.setSender(true);
        f.initCause(sf);
        message.setContent(Exception.class, f);     
        codec.encode(message);
        verifyHeaders(message, new String[] {RMConstants.getSequenceFaultName()});
View Full Code Here

TOP

Related Classes of org.apache.cxf.ws.rm.Identifier

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.