protected void doPut(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
throws ServletException, IOException
{
try
{
MessageReceiver receiver = getReceiverForURI(httpServletRequest);
httpServletRequest.setAttribute(PAYLOAD_PARAMETER_NAME, payloadParameterName);
MuleMessage message = receiver.createMuleMessage(httpServletRequest,
receiver.getEndpoint().getEncoding());
receiver.routeMessage(message);
httpServletResponse.setStatus(HttpServletResponse.SC_CREATED);
if (feedback)
{
httpServletResponse.getWriter().write(
"Item was created at endpointUri: " + receiver.getEndpointURI());
}
}
catch (Exception e)
{
handleException(e, "Failed to Post event to Mule" + e.getMessage(), httpServletResponse);