The OpenSAML V2 software has reached its End of Life and is no longer supported. This documentation is available for historical purposes only.

OSTwoDevManJavaNewUnmarshaller

Creating a new SAML Object Unmarshaller

Create a class that extends org.opensaml.common.io.impl.AbstractSAMLObjectUnmarshaller and meets the following guidelines:

  • Create a public, no argument, constructor that invokes super().
  • Override processChildElement(SAMLObject, SAMLObject) if your SAMLObject contains child SAMLObjects. Be sure to call super.processChildElement(SAMLObject, SAMLObject) if your unmarshaller does not handle a given child object.
  • Override processAttribute(SAMLObject, Attr) if you need to unmarshall information from XML attributes into your SAMLObject. Be sure to call super.processAttribute(SAMLObject, Attr) if your unmarshaller does not handle a given attribute.
  • Override processElementContent(SAMLObject, String) if you need to unmarshall information from the XML element's content into your SAMLObject
  • Ensure your unmarshaller is stateless

Additional Configuration

If your class requires additional configuration information this can be provided in the OpenSAML configuration file; refer to the Extending the ObjectProvider section for more information.