soapHelper.getJBIMarshaler().fromNMS(soapMessage, nm);
Context context = soapHelper.createContext(soapMessage);
soapHelper.onSend(context);
SoapWriter writer = soapHelper.getSoapMarshaler().createWriter(soapMessage);
copyHeaderInformation(nm, method);
RequestEntity entity = writeMessage(writer);
// remove content-type header that may have been part of the in message
if (!endpoint.isWantContentTypeHeaderFromExchangeIntoHttpRequest()) {
method.removeRequestHeader(HEADER_CONTENT_TYPE);
method.addRequestHeader(HEADER_CONTENT_TYPE, entity.getContentType());
}
if (entity.getContentLength() < 0) {
method.removeRequestHeader(HEADER_CONTENT_LENGTH);
} else {
method.setRequestHeader(HEADER_CONTENT_LENGTH, Long.toString(entity.getContentLength()));
}
if (endpoint.isSoap() && method.getRequestHeader(HEADER_SOAP_ACTION) == null) {
if (endpoint.getSoapAction() != null) {
method.setRequestHeader(HEADER_SOAP_ACTION, endpoint.getSoapAction());
} else {