// validation failure => dispatch is aborted, response MAPs
// must be aggregated
//isFault = true;
//aggregate(message, isFault);
if (isSOAP12(message)) {
SoapFault soap12Fault = new SoapFault(ContextUtils.retrieveMAPFaultReason(message),
Soap12.getInstance().getSender());
soap12Fault.setSubCode(new QName(Names.WSA_NAMESPACE_NAME, ContextUtils
.retrieveMAPFaultName(message)));
throw soap12Fault;
}
throw new SoapFault(ContextUtils.retrieveMAPFaultReason(message),
new QName(Names.WSA_NAMESPACE_NAME,
ContextUtils.retrieveMAPFaultName(message)));
}
} else {
AddressingProperties theMaps =
ContextUtils.retrieveMAPs(message, false, ContextUtils.isOutbound(message));
if (null != theMaps) {
assertAddressing(message, theMaps.getReplyTo(), theMaps.getFaultTo());
}
// If the wsa policy is enabled , but the client sets the
// WSAddressingFeature.isAddressingRequired to false , we need to assert all WSA assertion to true
if (!ContextUtils.isOutbound(message) && ContextUtils.isRequestor(message)
&& getWSAddressingFeature(message) != null
&& !getWSAddressingFeature(message).isAddressingRequired()) {
assertAddressing(message);
}
//CXF-3060 :If wsa policy is not enforced, AddressingProperties map is null and
// AddressingFeature.isRequired, requestor checks inbound message and throw exception
if (null == theMaps
&& !ContextUtils.isOutbound(message)
&& ContextUtils.isRequestor(message)
&& getWSAddressingFeature(message) != null
&& getWSAddressingFeature(message).isAddressingRequired()) {
boolean missingWsaHeader = false;
AssertionInfoMap aim = message.get(AssertionInfoMap.class);
if (aim == null || aim.size() == 0) {
missingWsaHeader = true;
}
if (aim != null && aim.size() > 0) {
missingWsaHeader = true;
QName[] types = new QName[] {
MetadataConstants.ADDRESSING_ASSERTION_QNAME,
MetadataConstants.USING_ADDRESSING_2004_QNAME,
MetadataConstants.USING_ADDRESSING_2005_QNAME,
MetadataConstants.USING_ADDRESSING_2006_QNAME
};
for (QName type : types) {
for (AssertionInfo assertInfo : aim.getAssertionInfo(type)) {
if (assertInfo.isAsserted()) {
missingWsaHeader = false;
}
}
}
}
if (missingWsaHeader) {
throw new SoapFault("MISSING_ACTION_MESSAGE", BUNDLE,
new QName(Names.WSA_NAMESPACE_NAME,
Names.HEADER_REQUIRED_NAME));
}
}
if (MessageUtils.isPartialResponse(message)