Smooks Building Query - A new Service

Solution Unverified - Updated -

Issue

  • Smooks Transformation is used in an ESB service where it is trying to transform from an XML message to a Java object. The following is a sample XML message which it tries to transform into Java object of type SalaryPayroll .

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.

Current Customers and Partners

Log in for full access

Log In