Package org.opensaml.ws.message.decoder

Examples of org.opensaml.ws.message.decoder.MessageDecodingException


    protected String getActualReceiverEndpointURI(SAMLMessageContext messageContext) throws MessageDecodingException {
        InTransport inTransport = messageContext.getInboundMessageTransport();
        if (! (inTransport instanceof HttpServletRequestAdapter)) {
            log.error("Message context InTransport instance was an unsupported type: {}",
                    inTransport.getClass().getName());
            throw new MessageDecodingException("Message context InTransport instance was an unsupported type");
        }
        HttpServletRequest httpRequest = ((HttpServletRequestAdapter)inTransport).getWrappedRequest();
       
        StringBuffer urlBuilder = httpRequest.getRequestURL();
       
View Full Code Here


        URL messageURL = null;
        try {
            messageURL = new URL(messageDestination);
        } catch (MalformedURLException e) {
            log.error("Message destination URL was malformed in destination check: {}", e.getMessage());
            throw new MessageDecodingException("Message destination URL was malformed in destination check");
        }
       
        URL endpointURL = null;
        try {
            endpointURL = new URL(receiverEndpoint);
        } catch (MalformedURLException e) {
            log.error("Recipient endpoint URL was malformed in destination check: {}", e.getMessage());
            throw new MessageDecodingException("Recipient endpoint URL was malformed in destination check");
        }
       
        return messageURL.equals(endpointURL);
    }
View Full Code Here

            }

            log.debug("Unmarshalling message DOM");
            Unmarshaller unmarshaller = Configuration.getUnmarshallerFactory().getUnmarshaller(messageElem);
            if (unmarshaller == null) {
                throw new MessageDecodingException(
                        "Unable to unmarshall message, no unmarshaller registered for message element "
                        + XMLHelper.getNodeQName(messageElem));
            }

            T message = (T) unmarshaller.unmarshall(messageElem);

            log.debug("Message successfully unmarshalled");
            return message;
        } catch (XMLParserException e) {
            log.error("Encountered error parsing message into its DOM representation", e);
            throw new MessageDecodingException("Encountered error parsing message into its DOM representation", e);
        } catch (UnmarshallingException e) {
            log.error("Encountered error unmarshalling message from its DOM representation", e);
            throw new MessageDecodingException("Encountered error unmarshalling message from its DOM representation", e);
        }
    }
View Full Code Here

    @Override
    protected void doDecode(MessageContext messageContext) throws MessageDecodingException {

        if (!(messageContext instanceof SAMLMessageContext)) {
            log.error("Invalid message context type, this decoder only support SAMLMessageContext");
            throw new MessageDecodingException(
                    "Invalid message context type, this decoder only support SAMLMessageContext");
        }

        org.springframework.security.saml.context.SAMLMessageContext samlMessageContext = (org.springframework.security.saml.context.SAMLMessageContext) messageContext;

        if (!(samlMessageContext.getInboundMessageTransport() instanceof HTTPInTransport)) {
            log.error("Invalid inbound message transport type, this decoder only support HTTPInTransport");
            throw new MessageDecodingException("Invalid inbound message transport type, this decoder only support HTTPInTransport");
        }

        HTTPInTransport inTransport = (HTTPInTransport) samlMessageContext.getInboundMessageTransport();
        HTTPOutTransport outTransport = (HTTPOutTransport) samlMessageContext.getOutboundMessageTransport();

        /*
         * Artifact parameter.
         */
        String artifactId = DatatypeHelper.safeTrimOrNullString(inTransport.getParameterValue("SAMLart"));
        if (artifactId == null) {
            log.error("SAMLart parameter was missing or did not contain a value.");
            throw new MessageDecodingException("SAMLArt parameter was missing or did not contain a value.");
        }

        log.debug("Artifact id: {}", artifactId);

        /*
 
View Full Code Here

TOP

Related Classes of org.opensaml.ws.message.decoder.MessageDecodingException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.