if (builder instanceof DataSourceMessageBuilder) {
documentElement = ((DataSourceMessageBuilder)builder).processDocument(
new BytesMessageDataSource((BytesMessage)message), contentType,
msgContext);
} else {
documentElement = builder.processDocument(
new BytesMessageInputStream((BytesMessage)message), contentType,
msgContext);
}
} else if (message instanceof TextMessage) {
TextMessageBuilder textMessageBuilder;