Search in sources :

Example 1 with SequenceFaultType

use of org.apache.cxf.ws.rm.v200702.SequenceFaultType in project cxf by apache.

the class EncoderDecoder11Impl method buildHeaderFaultObject.

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

Example 2 with SequenceFaultType

use of org.apache.cxf.ws.rm.v200702.SequenceFaultType in project cxf by apache.

the class SoapFaultFactoryTest method setupSequenceFault.

SequenceFault setupSequenceFault(boolean isSender, QName code, Object detail) {
    sf = control.createMock(SequenceFault.class);
    EasyMock.expect(sf.getReason()).andReturn("reason");
    EasyMock.expect(sf.isSender()).andReturn(isSender);
    EasyMock.expect(sf.getFaultCode()).andReturn(code).anyTimes();
    if (null != detail) {
        EasyMock.expect(sf.getDetail()).andReturn(detail);
        SequenceFaultType sft = new SequenceFaultType();
        sft.setFaultCode(RM10Constants.UNKNOWN_SEQUENCE_FAULT_QNAME);
    }
    return sf;
}
Also used : SequenceFault(org.apache.cxf.ws.rm.SequenceFault) SequenceFaultType(org.apache.cxf.ws.rm.v200702.SequenceFaultType)

Example 3 with SequenceFaultType

use of org.apache.cxf.ws.rm.v200702.SequenceFaultType 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 4 with SequenceFaultType

use of org.apache.cxf.ws.rm.v200702.SequenceFaultType 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)

Aggregations

JAXBElement (javax.xml.bind.JAXBElement)3 Element (org.w3c.dom.Element)3 Identifier (org.apache.cxf.ws.rm.v200702.Identifier)2 SequenceAcknowledgement (org.apache.cxf.ws.rm.v200702.SequenceAcknowledgement)2 SequenceFaultType (org.apache.cxf.ws.rm.v200702.SequenceFaultType)2 SequenceFault (org.apache.cxf.ws.rm.SequenceFault)1