e.printStackTrace();
log.error("Error while handling jms message", e);
    public void onMessage(final Message message) {        try {            endpoint.getServiceUnit().getComponent().getWorkManager().scheduleWork(new Work() {                public void release() {                }                public void run() {                    try {                        InputStream is = null;                        if (message instanceof TextMessage) {                            is = new ByteArrayInputStream(((TextMessage) message).getText().getBytes());                        } else if (message instanceof BytesMessage) {                            int length = (int) ((BytesMessage) message).getBodyLength();                            byte[] bytes = new byte[length];                            ((BytesMessage) message).readBytes(bytes);                            is = new ByteArrayInputStream(bytes);                        } else {                            throw new IllegalArgumentException("JMS message should be a text or bytes message");                        }                        String contentType = message.getStringProperty("Content-Type");                        SoapMessage soap = soapMarshaler.createReader().read(is, contentType);                        MessageExchange exchange = soapHelper.createExchange(soap);                        // TODO: copy protocol messages                        //inMessage.setProperty(JbiConstants.PROTOCOL_HEADERS, getHeaders(message));                        pendingMessages.put(exchange.getExchangeId(), message);                        BaseLifeCycle lf = (BaseLifeCycle) endpoint.getServiceUnit().getComponent().getLifeCycle();                        lf.sendConsumerExchange(exchange, MultiplexingConsumerProcessor.this);                                            } catch (Exception e) {                        // TODO: log exception                        e.printStackTrace();                    }                }            });        } catch (WorkException e) {            // TODO: log exception            e.printStackTrace();        }    }