InvalidPayloadException in Camel convertBodyTo Call
Issue
- We are creating a CXF web service proxy. So we are defining a CXF endpoint, calling
convertBodyToto obtain a POJO representing the incoming SOAP message, and then calling the real web service. My problem starts on theconvertBodyTocall. - 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
convertBodyTocall in the blueprint, we get aInvalidPayloadExceptionwhich 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
valueis 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 includedcamel-jaxbas 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 of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
