this.jaxbContext = jaxbContext;
}
public MessageAbstraction getRequestMessage(Object obj)
{
HTTPMessageImpl reqMsg = null;
try
{
if (Source.class.isAssignableFrom(type))
{
Source source = (Source)obj;
reqMsg = new HTTPMessageImpl(source);
if(validateDispatch)
reqMsg.doValidate();
}
else if (jaxbContext != null)
{
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, true);
BufferedStreamResult result = new BufferedStreamResult();
marshaller.marshal(obj, result);
reqMsg = new HTTPMessageImpl(result);
}
}
catch (RuntimeException rte)
{
throw rte;