[java-opensaml] branch main updated: OSJ-293: Consider strict mode to reject unexpected content

Brent Putman putmanb at georgetown.edu
Fri Aug 11 00:06:05 UTC 2023


This is an automated email from the git hooks/post-receive script.

putmanb pushed a commit to branch main
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=2e5e7458cbdcb7bc02e08f4f219b38d7ea6e4120

The following commit(s) were added to refs/heads/main by this push:
     new 2e5e7458c OSJ-293: Consider strict mode to reject unexpected content
2e5e7458c is described below

commit 2e5e7458cbdcb7bc02e08f4f219b38d7ea6e4120
Author: Brent Putman <putmanb at georgetown.edu>
AuthorDate: Wed Aug 9 20:56:36 2023 -0400

    OSJ-293: Consider strict mode to reject unexpected content
---
 ...ractElementExtensibleXMLObjectUnmarshaller.java | 20 --------
 .../core/xml/io/AbstractXMLObjectUnmarshaller.java | 58 ++++++++++++++++++----
 .../core/xml/schema/impl/XSQNameUnmarshaller.java  |  3 +-
 .../saml2/core/impl/NameIDPolicyUnmarshaller.java  |  6 +--
 .../saml2/metadata/impl/KeyDescriptorTest.java     | 10 ++--
 .../org/opensaml/saml/saml1/core/FullResponse.xml  | 44 ++++++++++++++--
 .../opensaml/saml/saml2/encryption/Assertion.xml   |  8 +--
 .../opensaml/saml/saml2/encryption/Attribute.xml   |  4 +-
 .../org/opensaml/saml/security/test1-metadata.xml  |  3 +-
 .../soap/soap11/impl/BodyUnmarshaller.java         |  4 --
 .../soap/soap11/impl/DetailUnmarshaller.java       |  5 --
 .../soap/soap11/impl/EnvelopeUnmarshaller.java     |  4 --
 .../soap/soap11/impl/FaultUnmarshaller.java        | 14 +-----
 .../soap/soap11/impl/HeaderUnmarshaller.java       |  4 --
 .../AbstractWSAddressingObjectUnmarshaller.java    | 31 ------------
 .../soap/wsfed/impl/AddressUnmarshaller.java       |  2 +
 .../soap/wsfed/impl/AppliesToUnmarshaller.java     | 12 +----
 .../wsfed/impl/EndPointReferenceUnmarshaller.java  | 11 +---
 .../RequestSecurityTokenResponseUnmarshaller.java  | 12 +----
 .../impl/RequestedSecurityTokenUnmarshaller.java   | 10 ----
 .../impl/AbstractWSPolicyObjectUnmarshaller.java   | 31 ------------
 .../impl/AbstractWSSecurityObjectUnmarshaller.java | 31 ------------
 .../impl/AbstractWSTrustObjectUnmarshaller.java    | 30 -----------
 .../core/xml/mock/SimpleXMLObjectUnmarshaller.java | 15 +++---
 .../impl/AbstractXACMLObjectUnmarshaller.java      | 21 --------
 .../impl/AbstractXMLEncryptionUnmarshaller.java    | 34 -------------
 .../impl/AbstractXMLSignatureUnmarshaller.java     | 34 -------------
 .../signature/impl/NamedCurveUnmarshaller.java     |  2 +
 .../impl/X509SerialNumberUnmarshaller.java         |  4 +-
 29 files changed, 128 insertions(+), 339 deletions(-)

diff --git a/opensaml-core-api/src/main/java/org/opensaml/core/xml/AbstractElementExtensibleXMLObjectUnmarshaller.java b/opensaml-core-api/src/main/java/org/opensaml/core/xml/AbstractElementExtensibleXMLObjectUnmarshaller.java
index ae273d2c7..f6e97e93d 100644
--- a/opensaml-core-api/src/main/java/org/opensaml/core/xml/AbstractElementExtensibleXMLObjectUnmarshaller.java
+++ b/opensaml-core-api/src/main/java/org/opensaml/core/xml/AbstractElementExtensibleXMLObjectUnmarshaller.java
@@ -18,7 +18,6 @@ import javax.annotation.Nonnull;
 
 import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
 import org.opensaml.core.xml.io.UnmarshallingException;
-import org.w3c.dom.Attr;
 
 /**
  * AbstractElementExtensibleUnmarshaller unmarshalls element of type <code>xs:any</code>, but without
@@ -38,23 +37,4 @@ public abstract class AbstractElementExtensibleXMLObjectUnmarshaller extends Abs
         any.getUnknownXMLObjects().add(childXMLObject);
     }
 
-    /**
-     * No <code>xs:anyAttribute</code> attribute.
-     * 
-     * {@inheritDoc}
-     */
-    @Override
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-    }
-
-    /**
-     * No text content.
-     * 
-     * {@inheritDoc}
-     */
-    @Override
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-    }
-
 }
\ No newline at end of file
diff --git a/opensaml-core-api/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectUnmarshaller.java b/opensaml-core-api/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectUnmarshaller.java
index c73e54032..9aee7a83c 100644
--- a/opensaml-core-api/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectUnmarshaller.java
+++ b/opensaml-core-api/src/main/java/org/opensaml/core/xml/io/AbstractXMLObjectUnmarshaller.java
@@ -15,17 +15,13 @@
 package org.opensaml.core.xml.io;
 
 import java.util.Objects;
+import java.util.Properties;
 
 import javax.annotation.Nonnull;
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilderFactory;
 
-import net.shibboleth.shared.primitive.LoggerFactory;
-import net.shibboleth.shared.primitive.StringSupport;
-import net.shibboleth.shared.xml.ParserPool;
-import net.shibboleth.shared.xml.QNameSupport;
-import net.shibboleth.shared.xml.XMLConstants;
-
+import org.opensaml.core.config.ConfigurationService;
 import org.opensaml.core.xml.AttributeExtensibleXMLObject;
 import org.opensaml.core.xml.Namespace;
 import org.opensaml.core.xml.XMLObject;
@@ -35,13 +31,19 @@ import org.opensaml.core.xml.config.XMLObjectProviderRegistrySupport;
 import org.opensaml.core.xml.schema.XSBooleanValue;
 import org.opensaml.core.xml.util.XMLObjectSupport;
 import org.slf4j.Logger;
-
 import org.w3c.dom.Attr;
 import org.w3c.dom.Element;
 import org.w3c.dom.NamedNodeMap;
 import org.w3c.dom.Node;
 import org.w3c.dom.Text;
 
+import net.shibboleth.shared.annotation.constraint.NotEmpty;
+import net.shibboleth.shared.primitive.LoggerFactory;
+import net.shibboleth.shared.primitive.StringSupport;
+import net.shibboleth.shared.xml.ParserPool;
+import net.shibboleth.shared.xml.QNameSupport;
+import net.shibboleth.shared.xml.XMLConstants;
+
 /**
  * A thread safe abstract unmarshaller. This unmarshaller will:
  * <ul>
@@ -75,6 +77,10 @@ import org.w3c.dom.Text;
  * </p>
  */
 public abstract class AbstractXMLObjectUnmarshaller implements Unmarshaller {
+    
+    /** Config property for controlling the use of strict mode. */
+    @Nonnull @NotEmpty public static final String CONFIG_PROPERTY_XML_STRICT_MODE =
+            "opensaml.config.xml.unmarshall.strictMode";
 
     /** Class logger. */
     @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractXMLObjectUnmarshaller.class);
@@ -84,6 +90,9 @@ public abstract class AbstractXMLObjectUnmarshaller implements Unmarshaller {
 
     /** Factory for creating unmarshallers for child elements. */
     @Nonnull private final UnmarshallerFactory unmarshallerFactory;
+    
+    /** Flag for strict mode which disallows unexpected content. */
+    private final boolean strictMode;
 
     /**
      * Constructor.
@@ -91,6 +100,10 @@ public abstract class AbstractXMLObjectUnmarshaller implements Unmarshaller {
     protected AbstractXMLObjectUnmarshaller() {
         xmlObjectBuilderFactory = XMLObjectProviderRegistrySupport.getBuilderFactory();
         unmarshallerFactory = XMLObjectProviderRegistrySupport.getUnmarshallerFactory();
+
+        final Properties props = ConfigurationService.getConfigurationProperties(); 
+        strictMode = (props != null) ? Boolean.parseBoolean(props.getProperty(CONFIG_PROPERTY_XML_STRICT_MODE, "true"))
+                : true;
     }
 
     /** {@inheritDoc} */
@@ -365,7 +378,14 @@ public abstract class AbstractXMLObjectUnmarshaller implements Unmarshaller {
      */
     protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
             @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
-        log.debug("Ignoring unknown child element {}", childXMLObject.getElementQName());
+
+        if (strictMode) {
+            throw new UnmarshallingException(String.format("Saw invalid child element %s on parent %s",
+                    childXMLObject.getElementQName(), parentXMLObject.getElementQName()));
+        }
+
+        log.debug("Ignoring unknown child element {} of parent {}", childXMLObject.getElementQName(),
+                parentXMLObject.getElementQName());
     }
 
     /**
@@ -380,7 +400,14 @@ public abstract class AbstractXMLObjectUnmarshaller implements Unmarshaller {
      */
     protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
             throws UnmarshallingException {
-        log.debug("Ignoring unknown attribute {}", QNameSupport.getNodeQName(attribute));
+
+        if (strictMode) {
+            throw new UnmarshallingException(String.format("Saw invalid attribute %s on element %s",
+                    QNameSupport.getNodeQName(attribute), xmlObject.getElementQName()));
+        }
+
+        log.debug("Ignoring unknown attribute {} on element {}", QNameSupport.getNodeQName(attribute),
+                xmlObject.getElementQName());
     }
 
     /**
@@ -390,9 +417,18 @@ public abstract class AbstractXMLObjectUnmarshaller implements Unmarshaller {
      * 
      * @param xmlObject XMLObject the content will be given to
      * @param elementContent the Element's content
+     * 
+     * @throws UnmarshallingException if there is a problem adding the element content to the XMLObject
      */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        log.debug("Ignoring unknown element content {}", elementContent);
+    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent)
+            throws UnmarshallingException {
+
+        if (strictMode) {
+            throw new UnmarshallingException(String.format("Saw invalid element content %s of elemment %s",
+                    elementContent, xmlObject.getElementQName()));
+        }
+
+        log.debug("Ignoring unknown element content {} of element {}", elementContent, xmlObject.getElementQName());
     }
     
     /**
diff --git a/opensaml-core-impl/src/main/java/org/opensaml/core/xml/schema/impl/XSQNameUnmarshaller.java b/opensaml-core-impl/src/main/java/org/opensaml/core/xml/schema/impl/XSQNameUnmarshaller.java
index 48cf8dadf..231f9a2bd 100644
--- a/opensaml-core-impl/src/main/java/org/opensaml/core/xml/schema/impl/XSQNameUnmarshaller.java
+++ b/opensaml-core-impl/src/main/java/org/opensaml/core/xml/schema/impl/XSQNameUnmarshaller.java
@@ -35,8 +35,7 @@ public class XSQNameUnmarshaller extends AbstractXMLObjectUnmarshaller {
     /** {@inheritDoc} */
     protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
             @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
-        // no child elements
-        // left this in to bypass the "ignore" logging message since we're not in fact ignoring the content
+        super.processChildElement(parentXMLObject, childXMLObject);
     }
 
     /** {@inheritDoc} */
diff --git a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/NameIDPolicyUnmarshaller.java b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/NameIDPolicyUnmarshaller.java
index 0082e2a04..c5eb593de 100644
--- a/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/NameIDPolicyUnmarshaller.java
+++ b/opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/core/impl/NameIDPolicyUnmarshaller.java
@@ -41,11 +41,9 @@ public class NameIDPolicyUnmarshaller extends AbstractSAMLObjectUnmarshaller {
         if (attribute.getNamespaceURI() == null) {
             if (attribute.getLocalName().equals(NameIDPolicy.FORMAT_ATTRIB_NAME)) {
                 policy.setFormat(attribute.getValue());
-            }
-            if (attribute.getLocalName().equals(NameIDPolicy.SP_NAME_QUALIFIER_ATTRIB_NAME)) {
+            } else if (attribute.getLocalName().equals(NameIDPolicy.SP_NAME_QUALIFIER_ATTRIB_NAME)) {
                 policy.setSPNameQualifier(attribute.getValue());
-            }
-            if (attribute.getLocalName().equals(NameIDPolicy.ALLOW_CREATE_ATTRIB_NAME)) {
+            } else if (attribute.getLocalName().equals(NameIDPolicy.ALLOW_CREATE_ATTRIB_NAME)) {
                 policy.setAllowCreate(XSBooleanValue.valueOf(attribute.getValue()));
             } else {
                 super.processAttribute(xmlObject, attribute);
diff --git a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorTest.java b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorTest.java
index 7bf609a16..5b5663ed1 100644
--- a/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorTest.java
+++ b/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorTest.java
@@ -15,11 +15,15 @@
 package org.opensaml.saml.saml2.metadata.impl;
 
 import org.testng.annotations.Test;
+
+import net.shibboleth.shared.xml.XMLParserException;
+
 import org.testng.annotations.BeforeMethod;
 import org.testng.Assert;
 import javax.xml.namespace.QName;
 
 import org.opensaml.core.testing.XMLObjectProviderBaseTestCase;
+import org.opensaml.core.xml.io.UnmarshallingException;
 import org.opensaml.saml.common.xml.SAMLConstants;
 import org.opensaml.saml.saml2.metadata.EncryptionMethod;
 import org.opensaml.saml.saml2.metadata.KeyDescriptor;
@@ -74,9 +78,9 @@ public class KeyDescriptorTest extends XMLObjectProviderBaseTestCase {
         Assert.assertEquals(keyDescriptor.getUse(), expectedUse, "Use attribute");
     }
     
-    @Test
-    public void testSingleElementUnknownAttribute() {
-        unmarshallElement("/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorUnknownAttribute.xml");
+    @Test(expectedExceptions=UnmarshallingException.class)
+    public void testSingleElementUnknownAttribute() throws XMLParserException, UnmarshallingException {
+        unmarshallElement("/org/opensaml/saml/saml2/metadata/impl/KeyDescriptorUnknownAttribute.xml", true);
     }
     
     @Test
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml1/core/FullResponse.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml1/core/FullResponse.xml
index dc4164c41..3d68d1e9c 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml1/core/FullResponse.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml1/core/FullResponse.xml
@@ -1,7 +1,46 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- xsi:schemaLocation="urn:oasis:names:tc:SAML:1.0:protocol ../../../../../src/schema/oasis-sstc-saml-schema-assertion-1.1.xsd"-->
-<Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2001/04/xmlenc#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:oasis:names:tc:SAML:1.0:protocol" InResponseTo="_aa3cde13c0963b75651196e0e9c2095f" IssueInstant="2005-12-09T09:27:55.124Z" MajorVersion="1" MinorVersion="1" ResponseID="_e75ba05f107c1f21feb6aa984f050c4d">
-    <ds:Signature>dfsdfsdf</ds:Signature>
+<Response xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:samlp="urn:oasis:names:tc:SAML:1.0:protocol" xmlns:saml="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:oasis:names:tc:SAML:1.0:protocol" InResponseTo="_aa3cde13c0963b75651196e0e9c2095f" IssueInstant="2005-12-09T09:27:55.124Z" MajorVersion="1" MinorVersion="1" ResponseID="_e75ba05f107c1f21feb6aa984f050c4d">
+    <!-- This signature is not valid, but we don't care b/c testing message structre only. -->
+    <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
+        <ds:SignedInfo>
+            <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
+            <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
+            <ds:Reference URI="#rident">
+                <ds:Transforms>
+                    <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
+                    <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
+                </ds:Transforms>
+                <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
+                <ds:DigestValue>WjLtIcoArwwdHVOks5QnbnFuE9g=</ds:DigestValue>
+            </ds:Reference>
+        </ds:SignedInfo>
+        <ds:SignatureValue>
+            cwC985/W+J8HrkDgMK1fYPfRP7e6aAAKJM/8rTWbOnI6feF8jrsQhSQ9qBon5o46
+            4eHMDYAcH4xd9rGPeYib4jjH2hAPAF0rqLX1FWNTZgS+lJQFhhj5Sys0Ja6C0wsx
+            0CoEWraR/IiDpRwnz9gGj2jGnfokfBdsLiomuxC2ZNY=
+        </ds:SignatureValue>
+        <ds:KeyInfo>
+            <ds:X509Data>
+                <ds:X509Certificate>
+                    MIICjzCCAfigAwIBAgIJAKk8t1hYcMkhMA0GCSqGSIb3DQEBBAUAMDoxCzAJBgNV
+                    BAYTAlVTMRIwEAYDVQQKEwlJbnRlcm5ldDIxFzAVBgNVBAMTDnNwLmV4YW1wbGUu
+                    b3JnMB4XDTA1MDYyMDE1NDgzNFoXDTMyMTEwNTE1NDgzNFowOjELMAkGA1UEBhMC
+                    VVMxEjAQBgNVBAoTCUludGVybmV0MjEXMBUGA1UEAxMOc3AuZXhhbXBsZS5vcmcw
+                    gZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANlZ1L1mKzYbUVKiMQLhZlfGDyYa
+                    /jjCiaXP0WhLNgvJpOTeajvsrApYNnFX5MLNzuC3NeQIjXUNLN2Yo2MCSthBIOL5
+                    qE5dka4z9W9zytoflW1LmJ8vXpx8Ay/meG4z//J5iCpYVEquA0xl28HUIlownZUF
+                    7w7bx0cF/02qrR23AgMBAAGjgZwwgZkwHQYDVR0OBBYEFJZiO1qsyAyc3HwMlL9p
+                    JpN6fbGwMGoGA1UdIwRjMGGAFJZiO1qsyAyc3HwMlL9pJpN6fbGwoT6kPDA6MQsw
+                    CQYDVQQGEwJVUzESMBAGA1UEChMJSW50ZXJuZXQyMRcwFQYDVQQDEw5zcC5leGFt
+                    cGxlLm9yZ4IJAKk8t1hYcMkhMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQAD
+                    gYEAMFq/UeSQyngE0GpZueyD2UW0M358uhseYOgGEIfm+qXIFQF6MYwNoX7WFzhC
+                    LJZ2E6mEvZZFHCHUtl7mGDvsRwgZ85YCtRbvleEpqfgNQToto9pLYe+X6vvH9Z6p
+                    gmYsTmak+kxO93JprrOd9xp8aZPMEprL7VCdrhbZEfyYER0=
+                </ds:X509Certificate>
+            </ds:X509Data>
+        </ds:KeyInfo>
+    </ds:Signature>
     <Status>
         <StatusCode Value="samlp:Success">
             <StatusCode Value="nibble, a happy warthog"/>
@@ -67,7 +106,6 @@
                 <AttributeValue Scope="iay.org.uk" xsi:type="typens:AttributeValueType">rdw</AttributeValue>
             </Attribute>
         </AttributeStatement>
-        <Statement/>
         <AuthenticationStatement/>
     </Assertion>
 </Response>
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/encryption/Assertion.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/encryption/Assertion.xml
index 8ccc83e06..fa9002355 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/encryption/Assertion.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/encryption/Assertion.xml
@@ -10,11 +10,11 @@
         </saml:AuthnContext>
     </saml:AuthnStatement>
     <saml:AttributeStatement xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-        <saml:Attribute>
-            <saml:AttributeValue Name="urn:string:attribName" xsi:type="xsd:string">SomeValue</saml:AttributeValue>
+        <saml:Attribute Name="urn:string:attribName" >
+            <saml:AttributeValue xsi:type="xsd:string">SomeValue</saml:AttributeValue>
         </saml:Attribute>
-        <saml:Attribute>
-            <saml:AttributeValue Name="urn:string:attribName2" xsi:type="xsd:string">SomeOtherValue</saml:AttributeValue>
+        <saml:Attribute Name="urn:string:attribName2">
+            <saml:AttributeValue xsi:type="xsd:string">SomeOtherValue</saml:AttributeValue>
         </saml:Attribute>
     </saml:AttributeStatement>
 </saml:Assertion>
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/encryption/Attribute.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/encryption/Attribute.xml
index ed0cd2103..2fc840566 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/encryption/Attribute.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/saml2/encryption/Attribute.xml
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
-    <saml:AttributeValue Name="urn:string:attribName" xsi:type="xsd:string">SomeValue</saml:AttributeValue>
+<saml:Attribute Name="urn:string:attribName" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+    <saml:AttributeValue xsi:type="xsd:string">SomeValue</saml:AttributeValue>
 </saml:Attribute>
diff --git a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/security/test1-metadata.xml b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/security/test1-metadata.xml
index 7131c141e..c8f6941f3 100644
--- a/opensaml-saml-impl/src/test/resources/org/opensaml/saml/security/test1-metadata.xml
+++ b/opensaml-saml-impl/src/test/resources/org/opensaml/saml/security/test1-metadata.xml
@@ -119,7 +119,8 @@
          <KeyDescriptor use="signing">
             <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                <ds:KeyName>idp.example.org</ds:KeyName>
-            </ds:KeyInfo>> </KeyDescriptor>
+            </ds:KeyInfo>
+         </KeyDescriptor>
          <AttributeService Binding="urn:oasis:names:tc:SAML:1.0:bindings:SOAP-binding" Location="https://idp.example.org:8443/shibboleth/AA"/>
       </AttributeAuthorityDescriptor>
       
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/BodyUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/BodyUnmarshaller.java
index 43d3eef9f..85ac06e4d 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/BodyUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/BodyUnmarshaller.java
@@ -49,8 +49,4 @@ public class BodyUnmarshaller extends AbstractXMLObjectUnmarshaller {
         body.getUnknownAttributes().put(attribQName, attribute.getValue());
     }
 
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        // do nothing, no child content
-    }
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/DetailUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/DetailUnmarshaller.java
index 8e18c37c0..bd5231344 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/DetailUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/DetailUnmarshaller.java
@@ -49,9 +49,4 @@ public class DetailUnmarshaller extends AbstractXMLObjectUnmarshaller {
         detail.getUnknownAttributes().put(attribQName, attribute.getValue());
     }
 
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        // do nothing, no child content
-    }
-
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/EnvelopeUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/EnvelopeUnmarshaller.java
index f5eb64389..3f0c6579f 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/EnvelopeUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/EnvelopeUnmarshaller.java
@@ -58,8 +58,4 @@ public class EnvelopeUnmarshaller extends AbstractXMLObjectUnmarshaller {
         envelope.getUnknownAttributes().put(attribQName, attribute.getValue());
     }
 
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        // do nothing, no child content
-    }
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/FaultUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/FaultUnmarshaller.java
index 85d0ef7fd..b75ae2293 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/FaultUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/FaultUnmarshaller.java
@@ -27,7 +27,6 @@ import org.opensaml.soap.soap11.Fault;
 import org.opensaml.soap.soap11.FaultActor;
 import org.opensaml.soap.soap11.FaultCode;
 import org.opensaml.soap.soap11.FaultString;
-import org.w3c.dom.Attr;
 
 /**
  * A thread-safe unmarshaller for {@link org.opensaml.soap.soap11.Fault}s.
@@ -47,18 +46,9 @@ public class FaultUnmarshaller extends AbstractXMLObjectUnmarshaller {
             fault.setActor((FaultActor) childXMLObject);
         }else if(childXMLObject instanceof Detail){
             fault.setDetail((Detail) childXMLObject);
+        } else {
+            super.processChildElement(parentXMLObject, childXMLObject);
         }
     }
 
-    /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-        // nothing to do, no attributes
-    }
-
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        //nothing to do, no element conent
-    }
-
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/HeaderUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/HeaderUnmarshaller.java
index bd36f857b..8eda03d9d 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/HeaderUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/soap11/impl/HeaderUnmarshaller.java
@@ -49,8 +49,4 @@ public class HeaderUnmarshaller extends AbstractXMLObjectUnmarshaller {
         header.getUnknownAttributes().put(attribQName, attribute.getValue());
     }
 
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        // do nothing, no child content
-    }
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsaddressing/impl/AbstractWSAddressingObjectUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsaddressing/impl/AbstractWSAddressingObjectUnmarshaller.java
index 63e43981e..83cfa36dc 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsaddressing/impl/AbstractWSAddressingObjectUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsaddressing/impl/AbstractWSAddressingObjectUnmarshaller.java
@@ -14,42 +14,11 @@
 
 package org.opensaml.soap.wsaddressing.impl;
 
-import javax.annotation.Nonnull;
-
-import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
-import org.opensaml.core.xml.io.UnmarshallingException;
-import org.slf4j.Logger;
-import org.w3c.dom.Attr;
-
-import net.shibboleth.shared.primitive.LoggerFactory;
 
 /**
  * An abstract unmarshaller implementation for XMLObjects from {@link org.opensaml.soap.wsaddressing.impl}.
  */
 public abstract class AbstractWSAddressingObjectUnmarshaller extends AbstractXMLObjectUnmarshaller {
 
-    /**
-     * Logger.
-     */
-    @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractWSAddressingObjectUnmarshaller.class);
-
-    /** {@inheritDoc} */
-    protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
-            @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
-        log.warn("{} ignoring unknown child element {}", parentXMLObject.getElementQName().getLocalPart(),
-                childXMLObject.getElementQName().getLocalPart());
-    }
-
-    /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-        log.warn("{} ignoring unknown attribute {}", xmlObject.getElementQName().getLocalPart(), attribute
-                .getLocalName());
-    }
-
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        log.warn("{} ignoring unknown element content: {}", xmlObject.getElementQName().getLocalPart(), elementContent);
-    }
 }
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/AddressUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/AddressUnmarshaller.java
index 40cef8027..7228a8b8e 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/AddressUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/AddressUnmarshaller.java
@@ -34,12 +34,14 @@ public class AddressUnmarshaller extends AbstractXMLObjectUnmarshaller {
     /** {@inheritDoc} */
     protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
             throws UnmarshallingException {
+        super.processAttribute(xmlObject, attribute);
 
     }
 
     /** {@inheritDoc} */
     protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
             @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
+        super.processChildElement(parentXMLObject, childXMLObject);
     }
 
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/AppliesToUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/AppliesToUnmarshaller.java
index 8d0403d99..10dbd8c30 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/AppliesToUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/AppliesToUnmarshaller.java
@@ -21,7 +21,6 @@ import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
 import org.opensaml.core.xml.io.UnmarshallingException;
 import org.opensaml.soap.wsfed.AppliesTo;
 import org.opensaml.soap.wsfed.EndPointReference;
-import org.w3c.dom.Attr;
 
 /** A thread-safe unmarshaller for {@link AppliesTo} objects. */
 public class AppliesToUnmarshaller extends AbstractXMLObjectUnmarshaller {
@@ -34,16 +33,9 @@ public class AppliesToUnmarshaller extends AbstractXMLObjectUnmarshaller {
 
         if (childXMLObject instanceof EndPointReference) {
             appliesTo.setEndPointReference((EndPointReference) childXMLObject);
+        } else {
+            super.processChildElement(parentXMLObject, childXMLObject);
         }
     }
 
-    /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-    }
-
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject fedObject, @Nonnull final String content) {
-
-    }
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/EndPointReferenceUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/EndPointReferenceUnmarshaller.java
index b52bb4470..95ce6cf29 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/EndPointReferenceUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/EndPointReferenceUnmarshaller.java
@@ -33,16 +33,9 @@ public class EndPointReferenceUnmarshaller extends AbstractXMLObjectUnmarshaller
 
         if (childXMLObject instanceof Address) {
             endPointReference.setAddress((Address) childXMLObject);
+        } else {
+            super.processChildElement(parentXMLObject, childXMLObject);
         }
     }
 
-    /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-    }
-
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject fedObject, @Nonnull final String content) {
-
-    }
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/RequestSecurityTokenResponseUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/RequestSecurityTokenResponseUnmarshaller.java
index 7833dc5f6..099a4ad98 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/RequestSecurityTokenResponseUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/RequestSecurityTokenResponseUnmarshaller.java
@@ -22,7 +22,6 @@ import org.opensaml.core.xml.io.UnmarshallingException;
 import org.opensaml.soap.wsfed.AppliesTo;
 import org.opensaml.soap.wsfed.RequestSecurityTokenResponse;
 import org.opensaml.soap.wsfed.RequestedSecurityToken;
-import org.w3c.dom.Attr;
 
 /** A thread-safe unmarshaller for {@link RequestSecurityTokenResponse} objects. */
 public class RequestSecurityTokenResponseUnmarshaller extends AbstractXMLObjectUnmarshaller {
@@ -36,16 +35,9 @@ public class RequestSecurityTokenResponseUnmarshaller extends AbstractXMLObjectU
             response.getRequestedSecurityToken().add((RequestedSecurityToken) childXMLObject);
         } else if (childXMLObject instanceof AppliesTo) {
             response.setAppliesTo((AppliesTo) childXMLObject);
+        } else {
+            super.processChildElement(parentXMLObject, childXMLObject);
         }
     }
 
-    /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-    }
-
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject fedObject, @Nonnull final String content) {
-
-    }
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/RequestedSecurityTokenUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/RequestedSecurityTokenUnmarshaller.java
index b29dd7ba0..f3bcbf013 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/RequestedSecurityTokenUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wsfed/impl/RequestedSecurityTokenUnmarshaller.java
@@ -20,7 +20,6 @@ import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
 import org.opensaml.core.xml.io.UnmarshallingException;
 import org.opensaml.soap.wsfed.RequestedSecurityToken;
-import org.w3c.dom.Attr;
 
 /** A thread-safe unmarshaller for {@link org.opensaml.soap.wsfed.RequestedSecurityToken} objects. */
 public class RequestedSecurityTokenUnmarshaller extends AbstractXMLObjectUnmarshaller {
@@ -32,13 +31,4 @@ public class RequestedSecurityTokenUnmarshaller extends AbstractXMLObjectUnmarsh
         requestedSecurityToken.getSecurityTokens().add(childXMLObject);
     }
 
-    /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-    }
-
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject fedObject, @Nonnull final String content) {
-
-    }
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wspolicy/impl/AbstractWSPolicyObjectUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wspolicy/impl/AbstractWSPolicyObjectUnmarshaller.java
index ff66ee218..467199853 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wspolicy/impl/AbstractWSPolicyObjectUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wspolicy/impl/AbstractWSPolicyObjectUnmarshaller.java
@@ -14,42 +14,11 @@
 
 package org.opensaml.soap.wspolicy.impl;
 
-import javax.annotation.Nonnull;
-
-import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
-import org.opensaml.core.xml.io.UnmarshallingException;
-import org.slf4j.Logger;
-import org.w3c.dom.Attr;
-
-import net.shibboleth.shared.primitive.LoggerFactory;
 
 /**
  * An abstract unmarshaller implementation for XMLObjects from WS-Policy.
  */
 public abstract class AbstractWSPolicyObjectUnmarshaller extends AbstractXMLObjectUnmarshaller {
 
-    /**
-     * Logger.
-     */
-    @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractWSPolicyObjectUnmarshaller.class);
-
-    /** {@inheritDoc} */
-    protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
-            @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
-        log.warn("{} ignoring unknown child element {}", parentXMLObject.getElementQName().getLocalPart(),
-                childXMLObject.getElementQName().getLocalPart());
-    }
-
-    /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-        log.warn("{} ignoring unknown attribute {}", xmlObject.getElementQName().getLocalPart(), attribute
-                .getLocalName());
-    }
-
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        log.warn("{} ignoring unknown element content: {}", xmlObject.getElementQName().getLocalPart(), elementContent);
-    }
 }
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wssecurity/impl/AbstractWSSecurityObjectUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wssecurity/impl/AbstractWSSecurityObjectUnmarshaller.java
index 8452bc044..8b2689641 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wssecurity/impl/AbstractWSSecurityObjectUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wssecurity/impl/AbstractWSSecurityObjectUnmarshaller.java
@@ -14,42 +14,11 @@
 
 package org.opensaml.soap.wssecurity.impl;
 
-import javax.annotation.Nonnull;
-
-import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
-import org.opensaml.core.xml.io.UnmarshallingException;
-import org.slf4j.Logger;
-import org.w3c.dom.Attr;
-
-import net.shibboleth.shared.primitive.LoggerFactory;
 
 /**
  * An abstract unmarshaller implementation for XMLObjects from WS-Security.
  */
 public abstract class AbstractWSSecurityObjectUnmarshaller extends AbstractXMLObjectUnmarshaller {
 
-    /**
-     * Logger.
-     */
-    @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractWSSecurityObjectUnmarshaller.class);
-
-    /** {@inheritDoc} */
-    protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
-            @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
-        log.warn("{} ignoring unknown child element {}", parentXMLObject.getElementQName().getLocalPart(),
-                childXMLObject.getElementQName().getLocalPart());
-    }
-
-    /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-        log.warn("{} ignoring unknown attribute {}", xmlObject.getElementQName().getLocalPart(), attribute
-                .getLocalName());
-    }
-
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        log.warn("{} ignoring unknown element content: {}", xmlObject.getElementQName().getLocalPart(), elementContent);
-    }
 }
\ No newline at end of file
diff --git a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wstrust/impl/AbstractWSTrustObjectUnmarshaller.java b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wstrust/impl/AbstractWSTrustObjectUnmarshaller.java
index 4c5fcaecf..a5723c009 100644
--- a/opensaml-soap-impl/src/main/java/org/opensaml/soap/wstrust/impl/AbstractWSTrustObjectUnmarshaller.java
+++ b/opensaml-soap-impl/src/main/java/org/opensaml/soap/wstrust/impl/AbstractWSTrustObjectUnmarshaller.java
@@ -14,41 +14,11 @@
 
 package org.opensaml.soap.wstrust.impl;
 
-import javax.annotation.Nonnull;
-
-import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
-import org.opensaml.core.xml.io.UnmarshallingException;
-import org.slf4j.Logger;
-import org.w3c.dom.Attr;
-
-import net.shibboleth.shared.primitive.LoggerFactory;
 
 /**
  * An abstract unmarshaller implementation for XMLObjects from WS-Trust.
  * 
  */
 public abstract class AbstractWSTrustObjectUnmarshaller extends AbstractXMLObjectUnmarshaller {
-
-    /** Logger. */
-    @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractWSTrustObjectUnmarshaller.class);
-
-    /** {@inheritDoc} */
-    protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
-            @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
-        log.warn("{} ignoring unknown child element {}", parentXMLObject.getElementQName().getLocalPart(),
-                childXMLObject.getElementQName().getLocalPart());
-    }
-
-    /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-        log.warn("{} ignoring unknown attribute {}", xmlObject.getElementQName().getLocalPart(), attribute
-                .getLocalName());
-    }
-
-    /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        log.warn("{} ignoring unknown element content: {}", xmlObject.getElementQName().getLocalPart(), elementContent);
-    }
 }
diff --git a/opensaml-testing/src/main/java/org/opensaml/core/xml/mock/SimpleXMLObjectUnmarshaller.java b/opensaml-testing/src/main/java/org/opensaml/core/xml/mock/SimpleXMLObjectUnmarshaller.java
index 44f811754..23ab43596 100644
--- a/opensaml-testing/src/main/java/org/opensaml/core/xml/mock/SimpleXMLObjectUnmarshaller.java
+++ b/opensaml-testing/src/main/java/org/opensaml/core/xml/mock/SimpleXMLObjectUnmarshaller.java
@@ -32,10 +32,10 @@ import org.w3c.dom.Attr;
 public class SimpleXMLObjectUnmarshaller extends AbstractXMLObjectUnmarshaller {
 
     /** {@inheritDoc} */
-    protected void processChildElement(@Nonnull XMLObject parentXMLObject, @Nonnull XMLObject childXMLObject)
-            throws UnmarshallingException {
+    protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
+            @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
 
-        SimpleXMLObject simpleXMLObject = (SimpleXMLObject) parentXMLObject;
+        final SimpleXMLObject simpleXMLObject = (SimpleXMLObject) parentXMLObject;
 
         if (childXMLObject instanceof SimpleXMLObject) {
             simpleXMLObject.getSimpleXMLObjects().add((SimpleXMLObject) childXMLObject);
@@ -45,8 +45,9 @@ public class SimpleXMLObjectUnmarshaller extends AbstractXMLObjectUnmarshaller {
     }
 
     /** {@inheritDoc} */
-    protected void processAttribute(@Nonnull XMLObject xmlObject, @Nonnull Attr attribute) throws UnmarshallingException {
-        SimpleXMLObject simpleXMLObject = (SimpleXMLObject) xmlObject;
+    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
+            throws UnmarshallingException {
+        final SimpleXMLObject simpleXMLObject = (SimpleXMLObject) xmlObject;
 
         if (attribute.getLocalName().equals(SimpleXMLObject.ID_ATTRIB_NAME)) {
             simpleXMLObject.setId(attribute.getValue());
@@ -57,8 +58,8 @@ public class SimpleXMLObjectUnmarshaller extends AbstractXMLObjectUnmarshaller {
     }
 
     /** {@inheritDoc} */
-    protected void processElementContent(@Nonnull XMLObject xmlObject, @Nonnull String elementContent) {
-        SimpleXMLObject simpleXMLObject = (SimpleXMLObject) xmlObject;
+    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
+        final SimpleXMLObject simpleXMLObject = (SimpleXMLObject) xmlObject;
 
         simpleXMLObject.setValue(elementContent);
     }
diff --git a/opensaml-xacml-impl/src/main/java/org/opensaml/xacml/impl/AbstractXACMLObjectUnmarshaller.java b/opensaml-xacml-impl/src/main/java/org/opensaml/xacml/impl/AbstractXACMLObjectUnmarshaller.java
index 554e15862..3ad4af136 100644
--- a/opensaml-xacml-impl/src/main/java/org/opensaml/xacml/impl/AbstractXACMLObjectUnmarshaller.java
+++ b/opensaml-xacml-impl/src/main/java/org/opensaml/xacml/impl/AbstractXACMLObjectUnmarshaller.java
@@ -14,10 +14,7 @@
 
 package org.opensaml.xacml.impl;
 
-import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
-import org.opensaml.core.xml.io.UnmarshallingException;
-import org.w3c.dom.Attr;
 
 /**
  * An thread safe abstract unmarshaller. This abstract marshaller only works with
@@ -25,22 +22,4 @@ import org.w3c.dom.Attr;
  */
 public abstract class AbstractXACMLObjectUnmarshaller extends AbstractXMLObjectUnmarshaller {
 
-    /**
-     * {@inheritDoc}
-     */
-    protected void processChildElement(final XMLObject parentXMLObject, final XMLObject childXMLObject)
-            throws UnmarshallingException {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void processAttribute(final XMLObject xmlObject, final Attr attribute) throws UnmarshallingException {
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void processElementContent(final XMLObject xmlObject, final String elementContent) {
-    }
 }
\ No newline at end of file
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/encryption/impl/AbstractXMLEncryptionUnmarshaller.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/encryption/impl/AbstractXMLEncryptionUnmarshaller.java
index 5a61d2bd7..94a94687d 100644
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/encryption/impl/AbstractXMLEncryptionUnmarshaller.java
+++ b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/encryption/impl/AbstractXMLEncryptionUnmarshaller.java
@@ -14,45 +14,11 @@
 
 package org.opensaml.xmlsec.encryption.impl;
 
-import javax.annotation.Nonnull;
-
-import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
-import org.opensaml.core.xml.io.UnmarshallingException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Attr;
 
 /**
  * An abstract unmarshaller implementation for XMLObjects from XML Encryption.
  */
 public abstract class AbstractXMLEncryptionUnmarshaller extends AbstractXMLObjectUnmarshaller {
 
-    /**
-     * Logger.
-     */
-    private final Logger log = LoggerFactory.getLogger(AbstractXMLEncryptionUnmarshaller.class);
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
-            @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
-        log.debug("Ignoring unknown element {}", childXMLObject.getElementQName());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-        log.debug("Ignorning unknown attribute {}", attribute.getLocalName());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        log.debug("Ignoring element content {}", elementContent);
-    }
 }
\ No newline at end of file
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/AbstractXMLSignatureUnmarshaller.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/AbstractXMLSignatureUnmarshaller.java
index ea2cdab60..70a8faceb 100644
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/AbstractXMLSignatureUnmarshaller.java
+++ b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/AbstractXMLSignatureUnmarshaller.java
@@ -14,45 +14,11 @@
 
 package org.opensaml.xmlsec.signature.impl;
 
-import javax.annotation.Nonnull;
-
-import org.opensaml.core.xml.XMLObject;
 import org.opensaml.core.xml.io.AbstractXMLObjectUnmarshaller;
-import org.opensaml.core.xml.io.UnmarshallingException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.w3c.dom.Attr;
 
 /**
  * An abstract unmarshaller implementation for XMLObjects from XML Signature.
  */
 public abstract class AbstractXMLSignatureUnmarshaller extends AbstractXMLObjectUnmarshaller {
 
-    /**
-     * Logger.
-     */
-    private final Logger log = LoggerFactory.getLogger(AbstractXMLSignatureUnmarshaller.class);
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
-            @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
-        log.debug("Ignoring unknown element {}", childXMLObject.getElementQName());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
-            throws UnmarshallingException {
-        log.debug("Ignorning unknown attribute {}", attribute.getLocalName());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    protected void processElementContent(@Nonnull final XMLObject xmlObject, @Nonnull final String elementContent) {
-        log.debug("Ignoring element content {}", elementContent);
-    }
 }
\ No newline at end of file
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/NamedCurveUnmarshaller.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/NamedCurveUnmarshaller.java
index 5276810fd..9c7ac6160 100644
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/NamedCurveUnmarshaller.java
+++ b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/NamedCurveUnmarshaller.java
@@ -33,6 +33,8 @@ public class NamedCurveUnmarshaller extends AbstractXMLSignatureUnmarshaller {
 
         if (attribute.getLocalName().equals(NamedCurve.URI_ATTRIB_NAME)) {
             nc.setURI(attribute.getValue());
+        } else {
+            super.processAttribute(xmlObject, attribute);
         }
     }
 
diff --git a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/X509SerialNumberUnmarshaller.java b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/X509SerialNumberUnmarshaller.java
index f73bc83bb..26dd55cb4 100644
--- a/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/X509SerialNumberUnmarshaller.java
+++ b/opensaml-xmlsec-impl/src/main/java/org/opensaml/xmlsec/signature/impl/X509SerialNumberUnmarshaller.java
@@ -34,13 +34,13 @@ public class X509SerialNumberUnmarshaller extends AbstractXMLObjectUnmarshaller
     /** {@inheritDoc} */
     protected void processChildElement(@Nonnull final XMLObject parentXMLObject,
             @Nonnull final XMLObject childXMLObject) throws UnmarshallingException {
-        // no children
+        super.processChildElement(parentXMLObject, childXMLObject);
     }
 
     /** {@inheritDoc} */
     protected void processAttribute(@Nonnull final XMLObject xmlObject, @Nonnull final Attr attribute)
             throws UnmarshallingException {
-        //no attributes
+        super.processAttribute(xmlObject, attribute);
     }
 
     /** {@inheritDoc} */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list