Smooks Building Query - A new Service
Issue
Smooks Transformation
is used in anESB service
where it is trying to transform from anXML
message to aJava object
. The following is a sampleXML message
which it tries to transform intoJava object
of 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, tools, and much more.