Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9191217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:37:55+00:00 2026-06-17T20:37:55+00:00

Dabbling with WSO2 ESB example http://wso2.org/library/articles/2011/01/wso2-esb-example-file-processing but encountering a problem where when a simple

  • 0

Dabbling with WSO2 ESB example http://wso2.org/library/articles/2011/01/wso2-esb-example-file-processing but encountering a problem where when a simple csv file

name0,value0
name1,value1
name2,value2
name3,value3

is parsed by smooks using this configuration

<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd" xmlns:csv="http://www.milyn.org/xsd/smooks/csv-1.1.xsd">
<csv:reader fields="name,value" />
</smooks-resource-list>

results in largely the correct output but the first line includes the payload namespace which is incorrect

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
    <text xmlns="http://ws.apache.org/commons/ns/payload">name0,value0
name1,value1
name2,value2
name3,value3</text>
</soapenv:Body>
</soapenv:Envelope>

so when the first name0 value is read it includes the which is also incorrect.

Smooks then converts this into

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
    <csv-set>
        <csv-record number="1">
            <name>&lt;?xml version='1.0' encoding='utf-8'?>&lt;text xmlns="http://ws.apache.org/commons/ns/payload">name0</name>
            <value>value0</value>
        </csv-record>
        <csv-record number="2">
            <name>name1</name>
            <value>value1</value>
        </csv-record>
        <csv-record number="3">
            <name>name2</name>
            <value>value2</value>
        </csv-record>
        <csv-record number="4">
            <name>name3</name>
            <value>value3&lt;/text></value>
        </csv-record>
    </csv-set>
</soapenv:Body>
</soapenv:Envelope>

So is Smooks doing all it is asked as the input includes the the as last? However, the number of elements it understands are counted as 4 so it isn’t as if the csv is supposed to have a header row. I can resolve (to a certain extent) by including a header row but then the element count is incorrect. I can resolve the end closing by just including a carriage return on the last line of csv.

How can I resolve this? I have found one other thread a year ago asking the same question but no answers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T20:37:57+00:00Added an answer on June 17, 2026 at 8:37 pm

    I have sorted this now. In my smooks tag

    <smooks xmlns="http://ws.apache.org/ns/synapse" config-key="conf:/smooks-config.xml">
       <input type="text"/>
       <output type="xml"/>
    </smooks>
    

    I had the first input element set to xml. Changing to text solved the issue. (in the GUI editor in WSO2 it defaults to having these elements whereas the tutorial doesn’t have these at all).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Dabbling with creating an installer with inno setup- but wondering: What are the pros
I've always been dabbling in javascript, but never really got hugely into writing a
Been dabbling with OpenGLES and having varying levels of success. My current problem is
I am not a Cocoa developer, but I have been dabbling in it to
I'm interested in dabbling in CoffeeScript , but I'd rather not have to recompile
I'm not a developer but I've been dabbling around with this for a while.
I'm familiar with Core Data basics and have done some dabbling, but have not
I'm used to WinForms graphics, but I've been dabbling in XNA, and one thing
I am currently dabbling in jQuery and have come across a problem which I
I'm dabbling with pChart and would like to start with a simple line graph

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.