Unable to transform from SOAP response with CDATA block to a POJO in FSW 6

Solution In Progress - Updated -

Issue

We have a Switchyard project which is using a component reference with a SOAP binding. This SOAP service is not a very common SOAP service in the sense that the response of the operation contains CDATA blocks which in turn contains the XML structure we need:

For example:


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:GetStatisticsResponse xmlns:ns2="http://web.service.com/"> <return><![CDATA[<statistics name="Foo"> <value>100</value> <clickthrough>20</clickthrough> </statistics>]]></return> </ns2:GetStatisticsResponse> </soap:Body> </soap:Envelope>

We are interested in the statistics element and its subelements within the CDATA block.

Our problem is that we need a transformer to go from this SOAP response to a POJO which contains the Java representation of this statistics element.

We do not want to parse the DOM ourselves via a Java transformer, but want to use Smooks for this. We were able to transform the SOAP response to a String, but we would need an additional transformation to parse this String into XML fields to populate the POJO with. How can this be done in FSW 6?

Environment

  • Red Hat JBoss Fuse Service Works (FSW)
    • 6.0.0

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