Skip to Content
h3.  New module on the block : Often we come across a requirement to convert XML to text. The module *StrictXml2PlainBean* has made our life easier to do that conversion. *StrictXml2PlainBean* module can be used to convert an XML document in the main payload of the XI message to text format. Within an XML document, different recordset types can be displayed either separately or with a fixed field length (mixed display). The structure of the XML document is checked based on the entries you make in the module. If any structures are found in document that do not correspond to your definition, a processing error is triggered at runtime. h3. _An example is worth a thousand words :_  Lets take a simple example to understand the usability of this module. Lets assume a scenario for converting an XML data to a asterisk separated TEXT file, wherein we don’t need any data transformation between source and target and we have same number of fields under the different recordsets. *+Input XML :+* image Before the module came,  to convert the above xml to text format, we needed to specify a separate  File Content Conversion for “_Customer_” and for “_ContactInfo_ “. But now we can replace our File Content Conversion with the *StrictXml2PlainBean* module.  The module provides more conversion options and a check of the structure that is to be converted h3. _Lets see how :_ *Step 1: *In your receiver File Communication channel, select the message protocol as “File” and fill the rest of the information needed for your receiver file CC. 

*Step 2:* Go to the_Module tab in your CC_ and insert the module in front of the adapter module as shown in the screen shot.  �›       Enter the module name _AF_Modules/StrictXml2PlainBean_. �›       Select the module type _Local Enterprise Bean._       The default module key is displayed. ( In our case its 1, as highlighted) *Step 3:* In the module configuration, enter the parameter names and parameter values for the module key 1 of the module. Here comes the exciting part. As we can see that in our example we have same number of fields in the “Customer” as well as in the “ContactInfo”, we can use the parameter Name “*singleRecordType*” and avoid defining the parameters twice for the different recordset. _Module Key: 1 _ Parameter Name : *singleRecordType* _Parameter Value : dataRec_ *Step 4:*  For the asterisk separator, define the following parameters in your module configuration.  As we have defined “*SingleRecordType*” in the above step, all the parameters we will be defined in our module configuration will be applicable to all recordsets. _Module Key: 1_ _Parameter Name : dataRec.fieldSeparator _  Parameter Value : *



To report this post you need to login first.


You must be Logged on to comment or reply to a post.

  1. Former Member
    Hi Pooja,

    Thanks for sharing the content. However, this feature was available with PI 7.0 too. You may add this as a note in your blog.

    Best Regards,

    1. Former Member Post author
      Thanks for your feedback Gaurav.

      As I dint find any sdn blog for the module, I thought there was no harm in highlighting the module :).


  2. Former Member
    Hi Pooja,
    I have a similar payload as you’ve shown in the example but when I use the module, my text file is being created but it is empty. I donno why.Please help me out if possoble.
  3. Former Member
    Hi mates, i’m trying to work with to configure the comm channel moduele: StrictXML2PlainBean. But when i test it, the sxmb_moni only gives me the same message response: NameNotFoundException: Object not found in lookup of StrictXML2PlainBean.

    Some one knows something about the reason of this issue?
    Thanks in advance.

  4. Former Member Post author

    Hi Pooja,USA13<br/>0110Preeti25<br/>0220David30<br/>0210109, Briarcliff roadAtlanta, GA, 30889<br/>02201009, Marshal StreetAtlanta, GA, 30007<br/><br/>I want the whole “Store” segment to have “01” begin segment and the segments inside will have “02*”. It returns me an error “Invalid structure name encountered during conversion: Store at XML element MT_Src_File,Store”. <br/><br/>Regards,<br/>Kevin

  5. Former Member Post author
    I want the output to be:

    02*10*109, Briarcliff road*Atlanta, GA, 30889
    02*20*1009, Marshal Street*Atlanta, GA, 30007


Leave a Reply