Red Hat Training

A Red Hat training course is available for JBoss Enterprise SOA Platform

13.3.5. ObjectToCSVString

Input Type User Object
Output Type java.lang.String
Class org.jboss.soa.esb.actions.converters.ObjectToCSVString
Takes the Object bound as the message payload and converts it into a Comma-Separated Value (CSV) String (based on the supplied message object) and a comma-separated "bean-properties" list.

Table 13.3. ObjectToCSVString Properties

Property Description Required
bean-properties
List of Object bean property names used to get CSV values for the output CSV String. The Object should support a getter method for each of listed properties.
Yes
fail-on-missing-property
Flag indicating whether or not the action should fail if a property is missing from the Object, that is if the Object does not support a getter method for the property. Default value is false.
No

Example 13.4. Sample Configuration

<action name="transform"
    class="org.jboss.soa.esb.actions.converters.ObjectToCSVString">
    <property name="bean-properties"
        value="name,address,phoneNumber"/>
    <property name="fail-on-missing-property" 
        value="true" />
</action>