/** * Register a header as understood. * * @param msgContext the current message context * @param header the header that was understood */ public static void registerUnderstoodHeader(@Nonnull final MessageContext<? extends XMLObject> msgContext, @Nonnull final XMLObject header) { InboundSOAPContext inboundContext = getInboundSOAPContext(msgContext); inboundContext.getUnderstoodHeaders().add(header); }
/** * Get a header block from the SOAP envelope contained within the specified message context's * SOAP subcontext. * * @param messageContext the message context being processed * @param headerName the name of the header block to return * * @return the list of matching header blocks */ @Nonnull public static List<XMLObject> getInboundHeaderBlock( @Nonnull final MessageContext<? extends XMLObject> messageContext, @Nonnull final QName headerName) { final InboundSOAPContext inboundContext = getInboundSOAPContext(messageContext); return getHeaderBlock(messageContext, headerName, inboundContext.getNodeActors(), inboundContext.isFinalDestination()); }
/** * Check whether a header was understood. * * @param msgContext the current message context * @param header the header that is to be checked for understanding * @return true if header was understood, false otherwise */ public static boolean checkUnderstoodHeader(@Nonnull final MessageContext<? extends XMLObject> msgContext, @Nonnull final XMLObject header) { InboundSOAPContext inboundContext = getInboundSOAPContext(msgContext); return inboundContext.getUnderstoodHeaders().contains(header); }