postMethod.setRequestEntity(new ByteArrayRequestEntity((byte[]) src, outboundMimeType));
}
else if (src instanceof OutputHandler)
{
final MuleEvent event = RequestContext.getEvent();
postMethod.setRequestEntity(new StreamPayloadRequestEntity((OutputHandler) src, event));
}
else
{
final byte[] buffer = SerializationUtils.serialize((Serializable) src);
postMethod.setRequestEntity(new ByteArrayRequestEntity(buffer, outboundMimeType));