Announcement Announcement Module
Collapse
No announcement yet.
Unmarshalling Fails but Marshalling Works Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Unmarshalling Fails but Marshalling Works

    I have a <ws:outbound-gateway>. I'm able to marshall using a marshalling-transformer and also by setting the marshaller attribute in the outbound-gateway (I just choose one).

    But when setting a unmarshalling-transformer or setting the unmarshaller attribute, I get a ClassCastException

    Code:
    java.lang.ClassCastException: java.lang.String cannot be cast to org.example.Magazine
    Which is expected because the message that's received from the web service is indeed a String. But isn't it that's reason why we have unmarshallers? To unmarshall those back to object? Whose gonna convert that String back to Object?

    If the marshalling works, then it means the JaxB generated classes are correct. So the unmarshalling process should work as well?

    By the way when I print out the String result from the web service, I get the correct response but I needed it back as an object

  • #2
    SOLVED

    The issue was a mispelling in the web service elements. Instead of uppercase S it should had been lower case s!

    Comment

    Working...
    X