public class

MessageUtils

extends Object
java.lang.Object
   ↳ org.mule.modules.freshbooks.util.MessageUtils

Summary

Fields
private static MessageUtils freshbooksMessageUtils
Public Methods
JAXBElement createJaxbElement(Object obj)
Marshaller createMarshaller()
Create Marshaller from the JAXB context.
Unmarshaller createUnmarshaller()
Create UnMarshaller from the JAXB context.
static MessageUtils getInstance()
String getXmlDocument(Object objectToMarshall)
This method JAXBElement object to XML String.
Object parseResponse(String responseString)
Clients of this method must make their own determination as to the contents of the response.
Protected Methods
JAXBContext getJaxbContext()
Object getObjectFactory()
Get object of ObjectFactory class generated using JAXB and XSD
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private static MessageUtils freshbooksMessageUtils

Public Methods

public JAXBElement createJaxbElement (Object obj)

Parameters
obj

public Marshaller createMarshaller ()

Create Marshaller from the JAXB context.

Returns
  • Marshaller

public Unmarshaller createUnmarshaller ()

Create UnMarshaller from the JAXB context.

Returns
  • UnMarshaller

public static MessageUtils getInstance ()

public String getXmlDocument (Object objectToMarshall)

This method JAXBElement object to XML String. IDS REST Services process XML string and Responds in XML.@return

Parameters
objectToMarshall
Throws
JAXBException

public Object parseResponse (String responseString)

Clients of this method must make their own determination as to the contents of the response. Generally this can be safely achieved by checking the instanceof.

Parameters
responseString
Returns
  • The unmarshalled response object.
Throws
JAXBException If the response unmarshaling fails.
Exception

Protected Methods

protected JAXBContext getJaxbContext ()

protected Object getObjectFactory ()

Get object of ObjectFactory class generated using JAXB and XSD

Returns
  • ObjectFactory Class object.