Search in sources :

Example 1 with HasQName

use of org.keycloak.saml.processing.core.parsers.util.HasQName in project keycloak by keycloak.

the class StaxParserUtil method getRequiredAttributeValue.

public static String getRequiredAttributeValue(StartElement startElement, HasQName attrName) throws ParsingException {
    final QName qName = attrName.getQName();
    Attribute attr = startElement.getAttributeByName(qName);
    if (attr == null)
        throw logger.parserRequiredAttribute(qName.getLocalPart());
    return StaxParserUtil.getAttributeValue(attr);
}
Also used : Attribute(javax.xml.stream.events.Attribute) HasQName(org.keycloak.saml.processing.core.parsers.util.HasQName) QName(javax.xml.namespace.QName)

Example 2 with HasQName

use of org.keycloak.saml.processing.core.parsers.util.HasQName in project keycloak by keycloak.

the class StaxParserUtil method getRequiredAttributeValueRP.

public static String getRequiredAttributeValueRP(StartElement startElement, HasQName attrName) throws ParsingException {
    final QName qName = attrName.getQName();
    Attribute attr = startElement.getAttributeByName(qName);
    if (attr == null)
        throw logger.parserRequiredAttribute(qName.getLocalPart());
    return StaxParserUtil.getAttributeValueRP(attr);
}
Also used : Attribute(javax.xml.stream.events.Attribute) HasQName(org.keycloak.saml.processing.core.parsers.util.HasQName) QName(javax.xml.namespace.QName)

Aggregations

QName (javax.xml.namespace.QName)2 Attribute (javax.xml.stream.events.Attribute)2 HasQName (org.keycloak.saml.processing.core.parsers.util.HasQName)2