Index Changes

Using multiple records with custom encoder

This article shows how to read multiple CSV records using custom encoder

Create a simple schema with a root element and set of child-element

Apply Custom encoding on the schema, Right Click on the schema Node, Encoding-------->Apply Custom Encoding


Once encoding is applied , configure the root/top element as shown below, Click on the Delimiter list to set the delimiter




Create wsdl with poll option, use the schema created above, Points to note while creating the wsdl,

  • use poll option
  • mutiple records = true
  • encoded type = customencoder-1.0
  • message type= encoded data
  • use the schema created above for the input message




Now create a BP which reads the data and write the records in a file




Create a composite APP

Input Data


a|b|c
e|f|g
x|y|z

Output Data

<ns1:x xmlns="http://xml.netbeans.org/schema/encoder" xmlns:ns1="http://xml.netbeans.org/schema/encoder" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xml.netbeans.org/schema/encoder C:/glassfishesb/glassfish/domains/domain1/jbi/service-assemblies/encoderCA/encoderCA-sun-file-binding/sun-file-binding/encoderBP/encoder.xsd">
    <a>a</a>
    <b>b</b>
    <c>c</c>
</ns1:x>
<ns1:x xmlns="http://xml.netbeans.org/schema/encoder" xmlns:ns1="http://xml.netbeans.org/schema/encoder" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xml.netbeans.org/schema/encoder C:/glassfishesb/glassfish/domains/domain1/jbi/service-assemblies/encoderCA/encoderCA-sun-file-binding/sun-file-binding/encoderBP/encoder.xsd">
    <a>e</a>
    <b>f</b>
    <c>g</c>
</ns1:x>
<ns1:x xmlns="http://xml.netbeans.org/schema/encoder" xmlns:ns1="http://xml.netbeans.org/schema/encoder" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xml.netbeans.org/schema/encoder C:/glassfishesb/glassfish/domains/domain1/jbi/service-assemblies/encoderCA/encoderCA-sun-file-binding/sun-file-binding/encoderBP/encoder.xsd">
    <a>x</a>
    <b>y</b>
    <c>z</c>
</ns1:x>

Try the application

Multiple Records with Custom Encoder(info)

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-8) was last changed on 18-Feb-09 14:15 PM, -0800 by sujit