/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { GeneratedKey key = (GeneratedKey) samlObject; QName attrName = XMLHelper.getNodeQName(attribute); if (GeneratedKey.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) { key.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue())); } else if (GeneratedKey.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) { key.setSOAP11Actor(attribute.getValue()); } else { super.processAttribute(samlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { RequestAuthenticated ra = (RequestAuthenticated) xmlObject; QName attrName = XMLHelper.getNodeQName(attribute); if (RequestAuthenticated.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) { ra.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue())); } else if (RequestAuthenticated.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) { ra.setSOAP11Actor(attribute.getValue()); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { RelayState relayState = (RelayState) xmlObject; QName attrName = XMLHelper.getNodeQName(attribute); if (RelayState.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) { relayState.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue())); } else if (RelayState.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) { relayState.setSOAP11Actor(attribute.getValue()); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { SessionKey key = (SessionKey) samlObject; QName attrName = XMLHelper.getNodeQName(attribute); if (SessionKey.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) { key.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue())); } else if (SessionKey.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) { key.setSOAP11Actor(attribute.getValue()); } else if (attribute.getLocalName().equals(SessionKey.ALGORITHM_ATTRIB_NAME)) { key.setAlgorithm(attribute.getValue()); } else { super.processAttribute(samlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { ChannelBindings cb = (ChannelBindings) xmlObject; QName attrName = XMLHelper.getNodeQName(attribute); if (attribute.getLocalName().equals(ChannelBindings.TYPE_ATTRIB_NAME)) { cb.setType(attribute.getValue()); } else if (ChannelBindings.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) { cb.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue())); } else if (ChannelBindings.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) { cb.setSOAP11Actor(attribute.getValue()); } else { super.processAttribute(xmlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { SubjectConfirmation sc = (SubjectConfirmation) samlObject; QName attrName = XMLHelper.getNodeQName(attribute); if (SubjectConfirmation.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) { sc.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue())); } else if (SubjectConfirmation.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) { sc.setSOAP11Actor(attribute.getValue()); } else if (attribute.getLocalName().equals(SubjectConfirmation.METHOD_ATTRIB_NAME)) { sc.setMethod(attribute.getValue()); } else { super.processAttribute(samlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { Response response = (Response) samlObject; QName attrName = XMLHelper.getNodeQName(attribute); if (Response.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) { response.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue())); } else if (Response.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) { response.setSOAP11Actor(attribute.getValue()); } else if (Response.ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME.equals(attribute.getLocalName())) { response.setAssertionConsumerServiceURL(attribute.getValue()); } else { super.processAttribute(samlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { Request request = (Request) samlObject; QName attrName = XMLHelper.getNodeQName(attribute); if (Request.SOAP11_MUST_UNDERSTAND_ATTR_NAME.equals(attrName)) { request.setSOAP11MustUnderstand(XSBooleanValue.valueOf(attribute.getValue())); } else if (Request.SOAP11_ACTOR_ATTR_NAME.equals(attrName)) { request.setSOAP11Actor(attribute.getValue()); } else if (Request.IS_PASSIVE_NAME_ATTRIB_NAME.equals(attribute.getLocalName())) { request.setPassive(XSBooleanValue.valueOf(attribute.getValue())); } else if (Request.PROVIDER_NAME_ATTRIB_NAME.equals(attribute.getLocalName())) { request.setProviderName(attribute.getValue()); } else { super.processAttribute(samlObject, attribute); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { ShibbolethMetadataKeyAuthority authority = (ShibbolethMetadataKeyAuthority) xmlObject; if (attribute.getLocalName().equals(ShibbolethMetadataKeyAuthority.VERIFY_DEPTH_ATTRIB_NAME)) { authority.setVerifyDepth(Integer.valueOf(attribute.getValue())); } else { QName attribQName = XMLHelper.getNodeQName(attribute); if (attribute.isId()) { authority.getUnknownAttributes().registerID(attribQName); } authority.getUnknownAttributes().put(attribQName, attribute.getValue()); } }
/** * Check whether the attribute's QName is registered in the global ID attribute registry. If it is, and the * specified attribute's DOM Level 3 Attr.isId() is false (due to lack of schema validation, for example), then * declare the attribute as an ID type in the DOM on the attribute's owning element. This is to handle cases where * the underlying DOM needs to accurately reflect an attribute's ID-ness, for example ID reference resolution within * the Apache XML Security library. * * @param attribute the DOM attribute to be checked */ protected void checkIDAttribute(Attr attribute) { QName attribName = XMLHelper.getNodeQName(attribute); if (Configuration.isIDAttribute(attribName) && !attribute.isId()) { attribute.getOwnerElement().setIdAttributeNode(attribute, true); } }
/** * Check whether the attribute's QName is registered in the global ID attribute registry. If it is, and the * specified attribute's DOM Level 3 Attr.isId() is false (due to lack of schema validation, for example), then * declare the attribute as an ID type in the DOM on the attribute's owning element. This is to handle cases where * the underlying DOM needs to accurately reflect an attribute's ID-ness, for example ID reference resolution within * the Apache XML Security library. * * @param attribute the DOM attribute to be checked */ protected void checkIDAttribute(Attr attribute) { QName attribName = XMLHelper.getNodeQName(attribute); if (Configuration.isIDAttribute(attribName) && !attribute.isId()) { attribute.getOwnerElement().setIdAttributeNode(attribute, true); } }
/** * {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { QName attribName = XMLHelper.getNodeQName(attribute); if (LangBearing.XML_LANG_ATTR_NAME.equals(attribName)) { OrganizationURL url = (OrganizationURL) samlObject; LocalizedString urlStr = url.getURL(); if (urlStr == null) { urlStr = new LocalizedString(); } urlStr.setLanguage(attribute.getValue()); url.setURL(urlStr); } }
/** * {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { QName attribName = XMLHelper.getNodeQName(attribute); if (LangBearing.XML_LANG_ATTR_NAME.equals(attribName)) { ServiceName name = (ServiceName) samlObject; LocalizedString nameStr = name.getName(); if (nameStr == null) { nameStr = new LocalizedString(); } nameStr.setLanguage(attribute.getValue()); name.setName(nameStr); } }
/** * {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { QName attribName = XMLHelper.getNodeQName(attribute); if (LangBearing.XML_LANG_ATTR_NAME.equals(attribName)) { ServiceDescription description = (ServiceDescription) samlObject; LocalizedString descStr = description.getDescription(); if (descStr == null) { descStr = new LocalizedString(); } descStr.setLanguage(attribute.getValue()); description.setDescription(descStr); } }
/** * {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { QName attribName = XMLHelper.getNodeQName(attribute); if (LangBearing.XML_LANG_ATTR_NAME.equals(attribName)) { OrganizationName name = (OrganizationName) samlObject; LocalizedString nameStr = name.getName(); if (nameStr == null) { nameStr = new LocalizedString(); } nameStr.setLanguage(attribute.getValue()); name.setName(nameStr); } }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributeValueType attributeValue = (AttributeValueType) xmlObject; QName attribQName = XMLHelper.getNodeQName(attribute); if (attribute.isId()) { attributeValue.getUnknownAttributes().registerID(attribQName); } attributeValue.getUnknownAttributes().put(attribQName, attribute.getValue()); if(attribute.getLocalName().equals(AttributeValueType.DATA_TYPE_ATTRIB_NAME)){ attributeValue.setDataType(DatatypeHelper.safeTrimOrNullString(attribute.getValue())); } }
/** * Retrieves the unmarshaller for the given element. The schema type, if present, is tried first as the key with the * element QName used if no schema type is present or does not have a unmarshaller registered under it. * * @param domElement the element to retrieve the unmarshaller for * * @return the unmarshaller for the XMLObject the given element can be unmarshalled into */ public Unmarshaller getUnmarshaller(Element domElement) { Unmarshaller unmarshaller; unmarshaller = getUnmarshaller(XMLHelper.getXSIType(domElement)); if (unmarshaller == null) { unmarshaller = getUnmarshaller(XMLHelper.getNodeQName(domElement)); } return unmarshaller; }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { ResourceContentType resourceContent = (ResourceContentType) xmlObject; QName attribQName = XMLHelper.getNodeQName(attribute); if (attribute.isId()) { resourceContent.getUnknownAttributes().registerID(attribQName); } resourceContent.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** {@inheritDoc} */ protected void processAttribute(XMLObject xmlObject, Attr attribute) throws UnmarshallingException { AttributeValueType attributeValue = (AttributeValueType) xmlObject; QName attribQName = XMLHelper.getNodeQName(attribute); if (attribute.isId()) { attributeValue.getUnknownAttributes().registerID(attribQName); } attributeValue.getUnknownAttributes().put(attribQName, attribute.getValue()); }
/** * {@inheritDoc} */ protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { Organization org = (Organization) samlObject; QName attribQName = XMLHelper.getNodeQName(attribute); if (attribute.isId()) { org.getUnknownAttributes().registerID(attribQName); } org.getUnknownAttributes().put(attribQName, attribute.getValue()); } }