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

OSTwoDevManJavaNewMarshaller

Creating a new SAML Object Marshaller

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

  • Create a public, no argument, constructor that invokes super().
  • Override marshallAttributes(XMLObject, Element) if you need to marshall information from the SAMLObject into attributes on the given DOM Element
  • Override marshallElementContent(SAMLObject, Element) if you need to marshall information from the SAMLObject into the DOM Element's content. Use the XMLHelper#appendTextContent(Element, String) method to add your string content to the Element.
  • Ensure that your Marshaller 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.