textMessageBuilder = (TextMessageBuilder)builder;
} else {
textMessageBuilder = new TextMessageBuilderAdapter(builder);
}
String content = ((TextMessage)message).getText();
documentElement = textMessageBuilder.processDocument(content, contentType, msgContext);
} else {
handleException("Unsupported JMS message type " + message.getClass().getName());
return; // Make compiler happy
}
msgContext.setEnvelope(TransportUtils.createSOAPEnvelope(documentElement));