InvalidPayloadException in Camel convertBodyTo Call

Solution Verified - Updated -

Issue

  • We are creating a CXF web service proxy. So we are defining a CXF endpoint, calling convertBodyTo to obtain a POJO representing the incoming SOAP message, and then calling the real web service. My problem starts on the convertBodyTo call.
  • We are using a POJO that was generated from the WSDL of the real web service (at this point, the WSDL is the same as the real web service's WSDL; not sure if we will need any transformation or enrichment of the SOAP message, but want to prepare just in case). When we make the convertBodyTo call in the blueprint, we get a InvalidPayloadException which states the following:
15:00:09,321 | ERROR | qtp554010380-468 | DefaultErrorHandler              | 142 - org.apache.camel.camel-core - 2.12.0.redhat-610379 | Failed delivery for (MessageId: ID-VWKS06015-10409-1406061138218-35-1 on ExchangeId: ID-VWKS06015-10409-1406061138218-35-2). Exhausted after delivery attempt: 1 caught: org.apache.camel.InvalidPayloadException: No body available of type: com.hp.go.exstream.schema.cc_actions.ActionType but has value:

  • The value is the XML of my SOAP request. If we change the type to a bogus class name, we will get a different error, so Camel is resolving the class. We have included camel-jaxb as a dependency of my project. But nothing is working. Any ideas?

Environment

  • Red Hat JBoss Fuse
    • 6.x
  • Apache Camel
  • Apache Aries Blueprint

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content