SoapFault headerFault = processHeaders(inMessage, endpointHandler);
SoapMessage outMessage;
if (headerFault != null)
{
outMessage = new SoapMessage(documentFactory);
outMessage.getBodyElement().add(headerFault.toXmlElement());
}
else
{
outMessage = endpointHandler.handleRequestResponse(inMessage, request.getParameter("SOAPAction"));
}