Class JaxbMarshallingTool

java.lang.Object
org.cruk.clarity.api.jaxb.JaxbMarshallingTool

@Component("clarityMarshallingTool") public class JaxbMarshallingTool extends Object
Tool to help debugging: a short cut for marshalling an object to a string.

Used to help debugging of the REST client by marshalling the object back into XML form for printing.

  • Constructor Details

    • JaxbMarshallingTool

      public JaxbMarshallingTool()
    • JaxbMarshallingTool

      public JaxbMarshallingTool(Marshaller marshaller)
  • Method Details

    • setMarshaller

      @Autowired @Qualifier("clarityJaxbMarshaller") public void setMarshaller(Marshaller marshaller)
      Set the marshaller used to create the XML.
      Parameters:
      marshaller - The Jaxb Marshaller.
    • marshal

      public String marshal(Object thing) throws XmlMappingException
      Marshals the object into a string of XML.
      Parameters:
      thing - The object to marshal.
      Returns:
      The XML string.
      Throws:
      XmlMappingException - if there is a problem marshalling the object.