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;
}
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;
}
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;
}
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;
}
Aggregations