@SuppressWarnings("unchecked") private void validateAndPopulate(Boolean allowNonUpnFormat) throws InvalidTokenException {
  JAXBElement<AssertionType> jaxbParserResult=null;
  try {
    Unmarshaller unmarshaller=_jaxbContext.createUnmarshaller();
    unmarshaller.setSchema(SAML_SCHEMA);
    jaxbParserResult=(JAXBElement<AssertionType>)unmarshaller.unmarshal(_parsedToken);
  }
 catch (  JAXBException e) {
    _log.info(PARSING_TOKEN_ERROR_MSG,e);
    throw new MalformedTokenException(PARSING_TOKEN_ERROR_MSG,e);
  }
  AssertionType assertion=jaxbParserResult.getValue();
  parseAssertionAttributes(assertion);
  parseConditions(assertion.getConditions(),allowNonUpnFormat);
  parseSubject(assertion.getSubject());
  parseIssuer(assertion.getIssuer());
  parseAuthnStatement(assertion.getAuthnStatementOrAttributeStatement());
  if (assertion.getAuthnStatementOrAttributeStatement() != null) {
    parseAttributeStatement(assertion.getAuthnStatementOrAttributeStatement());
  }
  if (assertion.getAdvice() != null) {
    parseAdvice(assertion.getAdvice());
  }
  _log.debug("Token fields are successfully populated");
}

@ SuppressWarnings ( "unchecked" ) private void validateAndPopulate ( Boolean allowNonUpnFormat ) throws InvalidTokenException { JAXBElement < AssertionType > jaxbParserResult = null ; try { Unmarshaller unmarshaller = _jaxbContext . createUnmarshaller ( ) ; unmarshaller . setSchema ( SAML_SCHEMA ) ; jaxbParserResult = ( JAXBElement < AssertionType > ) unmarshaller . unmarshal ( _parsedToken ) ; } catch ( JAXBException e ) { _log . info ( PARSING_TOKEN_ERROR_MSG , e ) ; throw new MalformedTokenException ( PARSING_TOKEN_ERROR_MSG , e ) ; } AssertionType assertion = jaxbParserResult . getValue ( ) ; parseAssertionAttributes ( assertion ) ; parseConditions ( assertion . getConditions ( ) , allowNonUpnFormat ) ; parseSubject ( assertion . getSubject ( ) ) ; parseIssuer ( assertion . getIssuer ( ) ) ; parseAuthnStatement ( assertion . getAuthnStatementOrAttributeStatement ( ) ) ; if ( assertion . getAuthnStatementOrAttributeStatement ( ) != null ) { parseAttributeStatement ( assertion . getAuthnStatementOrAttributeStatement ( ) ) ; } if ( assertion . getAdvice ( ) != null ) { parseAdvice ( assertion . getAdvice ( ) ) ; } _log . debug ( "Token fields are successfully populated" ) ; }
parses the xml string representing the saml token . < br > validates that the schema format is correct and the token fields are semantically correct . < br > populates the class members with the values provided in the token . < br >
