@Override public String getBindingURI(final SAML2MessageContext messageContext) { if (messageContext.getSOAP11Context().getEnvelope() != null) { return SAMLConstants.SAML2_SOAP11_BINDING_URI; } else { return SAMLConstants.SAML2_POST_BINDING_URI; } } }
/** * Clear the currently registered SOAP fault, if any. * * @param messageContext the current message context */ public static void clearFault(@Nonnull final MessageContext messageContext) { SOAP11Context soap11Context = getSOAP11Context(messageContext, false); if (soap11Context != null) { soap11Context.setFault(null); } //TODO SOAP 1.2 }
/** * Get the registered SOAP 1.1 fault, if any. * * @param messageContext the current message context * @return the registered fault, or null */ public static Fault getSOAP11Fault(@Nonnull final MessageContext messageContext) { SOAP11Context soap11Context = getSOAP11Context(messageContext, false); if (soap11Context != null) { return soap11Context.getFault(); } else { return null; } }
/** * Store the constructed SOAP envelope in the message context for later encoding. * * @param envelope the SOAP envelope */ protected void storeSOAPEnvelope(Envelope envelope) { getMessageContext().getSubcontext(SOAP11Context.class, true).setEnvelope(envelope); }
/** * 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()); }
/** * 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); }
/** {@inheritDoc} */ @Override protected XMLObject getMessageToLog() { return getMessageContext().getSubcontext(SOAP11Context.class, true).getEnvelope(); }
/** * Store the constructed SOAP envelope in the message context for later encoding. * * @param envelope the SOAP envelope */ protected void storeSOAPEnvelope(final Envelope envelope) { getMessageContext().getSubcontext(SOAP11Context.class, true).setEnvelope(envelope); }
/** * Register a SOAP 1.1 fault. * * @param messageContext the current message context * @param fault the fault to register */ public static void registerSOAP11Fault(@Nonnull final MessageContext messageContext, @Nullable final Fault fault) { SOAP11Context soap11Context = getSOAP11Context(messageContext, true); soap11Context.setFault(fault); }
/** * 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); }
/** {@inheritDoc} */ @Override protected XMLObject getMessageToLog() { return getMessageContext().getSubcontext(SOAP11Context.class, true).getEnvelope(); }
/** * Store the constructed SOAP envelope in the message context for later encoding. * * @param envelope the SOAP envelope */ protected void storeSOAPEnvelope(Envelope envelope) { getMessageContext().getSubcontext(SOAP11Context.class, true).setEnvelope(envelope); }
/** * Retrieve the previously stored SOAP envelope from the message context. * * @return the previously stored SOAP envelope */ protected Envelope getSOAPEnvelope() { return getMessageContext().getSubcontext(SOAP11Context.class, true).getEnvelope(); }
/** * Retrieve the previously stored SOAP envelope from the message context. * * @return the previously stored SOAP envelope */ protected Envelope getSOAPEnvelope() { return getMessageContext().getSubcontext(SOAP11Context.class, true).getEnvelope(); }
/** {@inheritDoc} */ @Override protected XMLObject getMessageToLog() { return getMessageContext().getSubcontext(SOAP11Context.class, true).getEnvelope(); }
/** * Retrieve the previously stored SOAP envelope from the message context. * * @return the previously stored SOAP envelope */ protected Envelope getSOAPEnvelope() { return getMessageContext().getSubcontext(SOAP11Context.class, true).getEnvelope(); }
/** {@inheritDoc} */ protected XMLObject getMessageToLog() { return getMessageContext().getSubcontext(SOAP11Context.class, true).getEnvelope(); }
/** {@inheritDoc} */ protected XMLObject getMessageToLog() { return getMessageContext().getSubcontext(SOAP11Context.class, true).getEnvelope(); }
/** {@inheritDoc} */ protected XMLObject getMessageToLog() { return getMessageContext().getSubcontext(SOAP11Context.class, true).getEnvelope(); }
/** {@inheritDoc} */ protected void doInvoke(@Nonnull MessageContext<Envelope> messageContext) throws MessageHandlerException { Envelope env = (Envelope) messageContext.getSubcontext(SOAP11Context.class).getEnvelope(); if (env == null) { throw new MessageHandlerException("MessageContext did not contain a SOAP Envelope"); } messageContext.setMessage(env); }