protected XMLObject unmarshallMessage(final InputStream messageStream) throws MessageDecodingException {
        try {
            val message = XMLObjectSupport.unmarshallFromInputStream(getParserPool(), messageStream);
            return message;
        } catch (final XMLParserException e) {
            throw new MessageDecodingException("Error unmarshalling message from input stream", e);
        } catch (final UnmarshallingException e) {
            throw new MessageDecodingException("Error unmarshalling message from input stream", e);
        }
    }
Helper method that deserializes and unmarshalls the message from the given stream.

@param messageStream input stream containing the message
@return the inbound message
@throws MessageDecodingException thrown if there is a problem deserializing/unmarshalling the message
pac4j-saml/src/main/java/org/pac4j/saml/transport/AbstractPac4jDecoder.java