Search in sources :

Example 51 with Identifier

use of org.apache.cxf.ws.rm.v200502.Identifier in project cxf by apache.

the class EncoderDecoder10AImpl method buildHeaderFaultObject.

@Override
protected Object buildHeaderFaultObject(SequenceFault sf) {
    org.apache.cxf.ws.rm.v200502wsa15.SequenceFaultType flt = new org.apache.cxf.ws.rm.v200502wsa15.SequenceFaultType();
    flt.setFaultCode(sf.getFaultCode());
    Object detail = sf.getDetail();
    if (detail instanceof Element) {
        flt.getAny().add(detail);
    } else if (detail instanceof Identifier) {
        flt.getAny().add(VersionTransformer.convert200502wsa15((Identifier) detail));
    } else if (detail instanceof SequenceAcknowledgement) {
        flt.getAny().add(VersionTransformer.convert200502wsa15((SequenceAcknowledgement) detail));
    }
    Element data = sf.getExtraDetail();
    if (data != null) {
        flt.getAny().add(data);
    }
    return flt;
}
Also used : Identifier(org.apache.cxf.ws.rm.v200702.Identifier) JAXBElement(javax.xml.bind.JAXBElement) Element(org.w3c.dom.Element) SequenceAcknowledgement(org.apache.cxf.ws.rm.v200702.SequenceAcknowledgement)

Example 52 with Identifier

use of org.apache.cxf.ws.rm.v200502.Identifier in project cxf by apache.

the class EncoderDecoder10Impl method buildHeaderFaultObject.

@Override
protected Object buildHeaderFaultObject(SequenceFault sf) {
    org.apache.cxf.ws.rm.v200502.SequenceFaultType flt = new org.apache.cxf.ws.rm.v200502.SequenceFaultType();
    flt.setFaultCode(sf.getFaultCode());
    Object detail = sf.getDetail();
    if (detail instanceof Element) {
        flt.getAny().add(detail);
    } else if (detail instanceof Identifier) {
        flt.getAny().add(VersionTransformer.convert200502((Identifier) detail));
    } else if (detail instanceof SequenceAcknowledgement) {
        flt.getAny().add(VersionTransformer.convert200502((SequenceAcknowledgement) detail));
    }
    Element data = sf.getExtraDetail();
    if (data != null) {
        flt.getAny().add(data);
    }
    return flt;
}
Also used : Identifier(org.apache.cxf.ws.rm.v200702.Identifier) JAXBElement(javax.xml.bind.JAXBElement) Element(org.w3c.dom.Element) SequenceAcknowledgement(org.apache.cxf.ws.rm.v200702.SequenceAcknowledgement)

Example 53 with Identifier

use of org.apache.cxf.ws.rm.v200502.Identifier in project cxf by apache.

the class ManagedRMEndpoint method getSourceSeq.

private SourceSequence getSourceSeq(String sid) {
    Source source = endpoint.getSource();
    Identifier identifier = RMUtils.getWSRMFactory().createIdentifier();
    identifier.setValue(sid);
    return source.getSequence(identifier);
}
Also used : Identifier(org.apache.cxf.ws.rm.v200702.Identifier)

Example 54 with Identifier

use of org.apache.cxf.ws.rm.v200502.Identifier in project cxf by apache.

the class ManagedRMEndpoint method getDestinationSeq.

private DestinationSequence getDestinationSeq(String sid) {
    Destination destination = endpoint.getDestination();
    Identifier identifier = RMUtils.getWSRMFactory().createIdentifier();
    identifier.setValue(sid);
    return destination.getSequence(identifier);
}
Also used : Identifier(org.apache.cxf.ws.rm.v200702.Identifier)

Example 55 with Identifier

use of org.apache.cxf.ws.rm.v200502.Identifier in project cxf by apache.

the class RMInInterceptor method processAcknowledgments.

void processAcknowledgments(RMEndpoint rme, RMProperties rmps, ProtocolVariation protocol) throws SequenceFault, RMException {
    Collection<SequenceAcknowledgement> acks = rmps.getAcks();
    Source source = rme.getSource();
    if (null != acks) {
        for (SequenceAcknowledgement ack : acks) {
            Identifier id = ack.getIdentifier();
            SourceSequence ss = source.getSequence(id);
            if (null != ss) {
                ss.setAcknowledged(ack);
            } else {
                RMConstants consts = protocol.getConstants();
                SequenceFaultFactory sff = new SequenceFaultFactory(consts);
                throw sff.createUnknownSequenceFault(id);
            }
        }
    }
}
Also used : Identifier(org.apache.cxf.ws.rm.v200702.Identifier) SequenceAcknowledgement(org.apache.cxf.ws.rm.v200702.SequenceAcknowledgement)

Aggregations

Identifier (org.apache.cxf.ws.rm.v200702.Identifier)72 Test (org.junit.Test)40 ArrayList (java.util.ArrayList)11 Message (org.apache.cxf.message.Message)11 SourceSequence (org.apache.cxf.ws.rm.SourceSequence)11 RMMessage (org.apache.cxf.ws.rm.persistence.RMMessage)11 SequenceAcknowledgement (org.apache.cxf.ws.rm.v200702.SequenceAcknowledgement)11 Connection (java.sql.Connection)9 AddressingProperties (org.apache.cxf.ws.addressing.AddressingProperties)8 SQLException (java.sql.SQLException)7 Date (java.util.Date)7 EndpointReferenceType (org.apache.cxf.ws.addressing.EndpointReferenceType)7 DestinationSequence (org.apache.cxf.ws.rm.DestinationSequence)7 Method (java.lang.reflect.Method)6 AttributedURIType (org.apache.cxf.ws.addressing.AttributedURIType)6 RMStore (org.apache.cxf.ws.rm.persistence.RMStore)6 SequenceType (org.apache.cxf.ws.rm.v200702.SequenceType)6 SoapBinding (org.apache.cxf.binding.soap.SoapBinding)5 ProtocolVariation (org.apache.cxf.ws.rm.ProtocolVariation)5 PreparedStatement (java.sql.PreparedStatement)4