use of org.apache.cxf.binding.soap.model.SoapBodyInfo in project cxf by apache.
the class SwAOutInterceptor method handleMessage.
public void handleMessage(SoapMessage message) throws Fault {
Exchange ex = message.getExchange();
BindingOperationInfo bop = ex.getBindingOperationInfo();
if (bop == null) {
return;
}
if (bop.isUnwrapped()) {
bop = bop.getWrappedOperation();
}
boolean client = isRequestor(message);
BindingMessageInfo bmi = client ? bop.getInput() : bop.getOutput();
if (bmi == null) {
return;
}
SoapBodyInfo sbi = bmi.getExtensor(SoapBodyInfo.class);
if (sbi == null || sbi.getAttachments() == null || sbi.getAttachments().isEmpty()) {
Service s = ex.getService();
DataBinding db = s.getDataBinding();
if (db instanceof JAXBDataBinding && hasSwaRef((JAXBDataBinding) db)) {
setupAttachmentOutput(message);
}
return;
}
processAttachments(message, sbi);
}
Aggregations