public static void triggerInvalidMessageInfoHeaderFault( MessageContext messageContext, String invalidHeader) throws AxisFault { AddressingFaultsHelper.triggerInvalidCardinalityFault(messageContext, invalidHeader); }
public static void triggerMessageInfoHeaderRequiredFault( MessageContext messageContext, String missingHeaderName) throws AxisFault { AddressingFaultsHelper.triggerMessageAddressingRequiredFault( messageContext, missingHeaderName); }
/** * Check if the received callback address has either of the special WS-Addressing forms which are outlawed by the * Web Service Binding specification [BWS50004] * @param callbackAddress - the received callback address * @param inMC - the Axis message context for the received forward call * @throws AxisFault - throws a "OnlyNonAnonymousAddressSupportedFault" if the callback address has either of the special forms */ private void checkCallbackAddress( String callbackAddress, MessageContext inMC ) throws AxisFault { // If the address is anonymous or none, throw a SOAP fault... if( WS_ADDR_ANONYMOUS.equals(callbackAddress) || WS_ADDR_NONE.equals(callbackAddress) ) { AddressingFaultsHelper.triggerOnlyNonAnonymousAddressSupportedFault(inMC, "wsa:From"); } } // end method checkCallbackAddress
/** * If addressing was found and the dispatch failed we SHOULD (and hence will) return a * WS-Addressing ActionNotSupported fault. This will make more sense once the * AddressingBasedDsipatcher is moved into the addressing module */ private void checkAction(MessageContext msgContext) throws AxisFault { if ((msgContext.getAxisService() == null) || (msgContext.getAxisOperation() == null)) { AddressingFaultsHelper .triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction()); } } }
"rules in the WS-A specification. The SOAP node that sent this message must be changed."); AddressingFaultsHelper.triggerActionNotSupportedFault(messageContext, wsaAction); " must be changed."); AddressingFaultsHelper.triggerActionMismatchFault(messageContext, soapAction, wsaAction);
msgContext.setReplyTo(anonEPR); msgContext.setFaultTo(anonEPR); AddressingFaultsHelper.triggerOnlyAnonymousAddressSupportedFault(msgContext, AddressingConstants.WSA_REPLY_TO); msgContext.setReplyTo(anonEPR); msgContext.setFaultTo(anonEPR); AddressingFaultsHelper.triggerOnlyAnonymousAddressSupportedFault(msgContext, AddressingConstants.WSA_FAULT_TO); AddressingFaultsHelper.triggerOnlyNonAnonymousAddressSupportedFault(msgContext, AddressingConstants.WSA_REPLY_TO); AddressingFaultsHelper.triggerOnlyNonAnonymousAddressSupportedFault(msgContext, AddressingConstants.WSA_FAULT_TO);
.getMessageForAxisFault(faultLocalName, faultDetailString);
private void processFaultsInfoIfPresent() { OMElement detailElement = AddressingFaultsHelper .getDetailElementForAddressingFault(messageContext, addressingNamespaceObject); if (detailElement != null) { //The difference between SOAP 1.1 and SOAP 1.2 fault messages is explained in the WS-Addressing Specs. if (isFinalAddressingNamespace && messageContext.isSOAP11()) { // Add detail as a wsa:FaultDetail header if (!isAddressingHeaderAlreadyAvailable(Final.FAULT_HEADER_DETAIL, false)) { SOAPHeaderBlock faultDetail = header.addHeaderBlock( Final.FAULT_HEADER_DETAIL, addressingNamespaceObject); faultDetail.addChild((OMElement)factory.importInformationItem(detailElement)); } } else if (!messageContext.isSOAP11()) { // Add detail to the Fault in the SOAP Body SOAPFault fault = envelope.getBody().getFault(); if (fault != null && fault.getDetail() != null) { fault.getDetail().addDetailEntry( (OMElement)factory.importInformationItem(detailElement)); } } } }
/** * If addressing was found and the dispatch failed we SHOULD (and hence will) return a * WS-Addressing ActionNotSupported fault. This will make more sense once the * AddressingBasedDsipatcher is moved into the addressing module */ private void checkAction(MessageContext msgContext) throws AxisFault { if ((msgContext.getAxisService() == null) || (msgContext.getAxisOperation() == null)) { AddressingFaultsHelper .triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction()); } } }
private void checkAction(MessageContext msgContext) throws AxisFault { Phase addPhase = getAddressingPhase(msgContext); if (addPhase == null) { logger.error("unable to locate addressing phase object"); } if (msgContext != null) { if (msgContext.getCurrentPhaseIndex() + 1 == addPhase.getHandlerCount()) { if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null) AddressingFaultsHelper.triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction()); } } }
private void checkForMandatoryHeaders(boolean[] alreadyFoundAddrHeader, MessageContext messageContext, String namespace) throws AxisFault { if (Final.WSA_NAMESPACE.equals(namespace)) { //Unable to validate the wsa:MessageID header here as we do not yet know which MEP //is in effect. // @see AddressingValidationHandler#checkMessageIDHeader if (!alreadyFoundAddrHeader[ACTION_FLAG]) { AddressingFaultsHelper .triggerMessageAddressingRequiredFault(messageContext, WSA_ACTION); } } else { if (!alreadyFoundAddrHeader[TO_FLAG]) { AddressingFaultsHelper.triggerMessageAddressingRequiredFault(messageContext, WSA_TO); } if (!alreadyFoundAddrHeader[ACTION_FLAG]) { AddressingFaultsHelper .triggerMessageAddressingRequiredFault(messageContext, WSA_ACTION); } if (alreadyFoundAddrHeader[REPLYTO_FLAG] || alreadyFoundAddrHeader[FAULTO_FLAG]) { if (!alreadyFoundAddrHeader[MESSAGEID_FLAG]) { AddressingFaultsHelper .triggerMessageAddressingRequiredFault(messageContext, WSA_MESSAGE_ID); } } } }
AddressingFaultsHelper.triggerInvalidCardinalityFault(messageContext, (String) duplicateHeaderNames .get(0));
private void checkAction(MessageContext msgContext) throws AxisFault { Phase addPhase = getAddressingPhase(msgContext); if (addPhase == null) { logger.error("unable to locate addressing phase object"); } if (msgContext != null) { if (msgContext.getCurrentPhaseIndex() + 1 == addPhase.getHandlerCount()) { if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null) AddressingFaultsHelper.triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction()); } } }
AddressingFaultsHelper.triggerMessageAddressingRequiredFault(msgContext, AddressingConstants.WSA_ACTION);
private void checkAction(MessageContext msgContext) throws AxisFault { Phase addPhase = getAddressingPhase(msgContext); if (addPhase == null) { logger.error("unable to locate addressing phase object"); } if (msgContext != null) { if (msgContext.getCurrentPhaseIndex() + 1 == addPhase.getHandlerCount()) { if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null) AddressingFaultsHelper.triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction()); } } }
if (messageId == null || "".equals(messageId)) { AddressingFaultsHelper .triggerMessageAddressingRequiredFault(msgContext, WSA_MESSAGE_ID);
private void checkAction(MessageContext msgContext) throws AxisFault { Phase addPhase = getAddressingPhase(msgContext); if (addPhase == null) { logger.error("unable to locate addressing phase object"); } if (msgContext != null) { if (msgContext.getCurrentPhaseIndex() + 1 == addPhase.getHandlerCount()) { if (msgContext.getAxisService() == null || msgContext.getAxisOperation() == null) AddressingFaultsHelper.triggerActionNotSupportedFault(msgContext, msgContext.getWSAAction()); } } }