I have updated smooks config to have free marker templates;

<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd";
xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd"; xmlns:fl="
http://www.milyn.org/xsd/smooks/fixed-length-1.3.xsd";>
      <params>
<param name="stream.filter.type">SAX</param>
<param name="stream.filter.readerPoolSize">100</param>
</params>

      <fl:reader
fields="RecordId[10]?trim,CompactedCorpName[60]?trim,FileNumber[9]?trim,CorporationName[60]?trim,FirstAddressLine1[30]?trim"
skipLines="1"></fl:reader>

      <resource-config selector="csv-record">
         <resource>org.milyn.delivery.DomModelCreator</resource>
      </resource-config>
      <ftl:freemarker applyOnElement="csv-record">

 <ftl:template>/repository/resources/smooks/csv_record_as_xml.ftl</ftl:template>
         <ftl:use>
            <ftl:bindTo id="csv_record_as_xml"></ftl:bindTo>
         </ftl:use>
      </ftl:freemarker>
   </smooks-resource-list>

And my freemarker template resource is like;
#assign csvrec = .vars["csv-record"]>
<Corporation>
<RecordId>${csvrec.RecordId}</RecordId>
<CompactedCorpName>${csvrec.CompactedCorpName}</CompactedCorpName>
<FileNumber>${csvrec.FileNumber}</FileNumber>
<CorporationName>${csvrec.CorporationName}</CorporationName>
<FirstAddressLine1>${csvrec.FirstAddressLine1}</FirstAddressLine1>
</Corporation>

Still ESB returns empty set.
Any clue?


On 14 May 2014 11:12, Vijayaratha Vijayasingam <[email protected]> wrote:

> Hi all;
> I have following smooks config registered;
>
> <smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"; 
> xmlns:ftl="http://www.milyn.org/xsd/smooks/freemarker-1.1.xsd"; 
> xmlns:fl="http://www.milyn.org/xsd/smooks/fixed-length-1.3.xsd";>
>          <fl:reader fields="RecordId[10],CompactedCorpName[60],FileNumber[9]" 
> skipLines="1"></fl:reader>
>
>       </smooks-resource-list>
>
>
> And im passing a text file to be processed. But as the outcome i get an
> empty set.[1]
> Smooks mediator config;[2]
>
> [1]<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.or
>
> g/soap/envelope/"><soapenv:Body><set></set></soapenv:Body></soapenv:Envelope>
>
> [2]
>  <smooks config-key="acc-smooks">
>             <input type="text"/>
>             <output type="xml"/>
>          </smooks>
>
> Am i missing anything in smooks configuration?
>
> Thanks.
>
> --
> -Ratha
> mobile: (+94)755906608
>



-- 
-Ratha
mobile: (+94)755906608
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to