public void createRequest(final MessageExchange exchange,
final NormalizedMessage inMsg,
final SmxHttpExchange httpExchange) throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
Message msg = binding.createMessage();
msg.put(JbiConstants.USE_JBI_WRAPPER, useJbiWrapper);
msg.setContent(MessageExchange.class, exchange);
msg.setContent(NormalizedMessage.class, inMsg);
msg.setContent(OutputStream.class, baos);
exchange.setProperty(Message.class.getName(), msg);
InterceptorChain phaseOut = getChain(Phase.ClientOut);
phaseOut.doIntercept(msg);
httpExchange.setMethod(HttpMethods.POST);
httpExchange.setURL(baseUrl);
httpExchange.setRequestContent(new ByteArrayBuffer(baos.toByteArray()));
for (String header : msg.getTransportHeaders().keySet()) {
httpExchange.setRequestHeader(header, msg.getTransportHeaders().get(header));
}
if (soapAction != null) {
httpExchange.setRequestHeader(SoapConstants.SOAP_ACTION_HEADER, soapAction);
}
/*