Smooks Building Query - A new Service
Issue
Smooks Transformationis used in anESB servicewhere it is trying to transform from anXMLmessage to aJava object. The following is a sampleXML messagewhich it tries to transform intoJava objectof typeSalaryPayroll.
Request XML payload.
<jesb:SalaryPayrollXML xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:jesb="http://www.jbossesb.com/jesb/">
...
<jesb:AccountNumber>1234567890</jesb:AccountNumber>
<jesb:AccountDebit>
...
<jesb:type xmlns:jesb="http://www.jbossesb.com/jesb/">
<jesb:DEBITPayee xmlns:jesb="http://www.jbossesb.com/jesb/">TEST_USER</jesb:DEBITPayee>
<jesb:DEBITBank xmlns:jesb="http://www.jbossesb.com/jesb/">TEST_BANK</jesb:DEBITBank>
...
</jesb:type>
...
</jesb:AccountDebit>
...
The Smooks Transformation looks like this.
...
<jb:bean beanId="customField" class="com.test.SalaryPayroll" createOnElement="SalaryPayrollXML/AccountDebit/customData">
<jb:value data="/SalaryPayrollXML/AccountDebit/type/DEBITPayee" property="payee"/>
<jb:value data="/SalaryPayrollXML/AccountDebit/type/DEBITBank" property="Bank"/>
</jb:bean>
But at the end of the transformation it appears that the values against one of the request XML elements (which came in as request message) , e.g. DEBITPayee are appearing as null . How to troubleshoot this kind of issue to find out the root cause?
Environment
- Red Hat JBoss SOA Platform (SOA-P)
- 5.x
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.
