Announcement Announcement Module
No announcement yet.
WebServiceTemplate 1.5M1 problem message type problem? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • WebServiceTemplate 1.5M1 problem message type problem?

    Hi all...

    Trying to send a message via the WebServiceTemplate
    public Object marshalSendAndReceive(Object requestPayload)
    When i debug, i see that my castor mapper does its job correctly, and that the soap message looks ok. When the JMS message actually gets sent to ActiveMQ, something strikes me as odd when i look at the message with HermesJMS (see attached picture).
    Hermes says that the message has "text/xml" content type, but SpringWS sends BytesMessage messages, which subsequently leads to
    "byte[size=585]" being interpreted as the message payload!

    Am i wrong and missing something??

    Thanks in advance for any comments!

  • #2
    I think you are receiving the message sent by Spring-WS as TextMessage. Spring-WS does use BytesMessage, and not TextMessage. The reason for this is that XML is a series of bytes + encoding, which can be turned into Strings by an XML parser. Also, TextMessage cannot cope with attachments.

    In 1.5-M2, we will support TextMessages as well as BytesMessages, but the latter is preferred.