Page 1 of 1

XML Output Stage Not Generating XML File

Posted: Tue Jul 21, 2009 8:46 am
by skilletrx2
Hi all, I'm trying to figure out what I am missing. When I run my job, everything looks fine and green, but no XML file is generated out of my XML Output Stage. I have checked the box to Write out the XML output but no file is ever created.

I have also referenced the IBM example, and still did not get an XML file outputted, despite a successfully executed job.

http://www-128.ibm.com/developerworks/d ... 0703xiong/

Any hints, comments, tips would be appreciated. Thanks in advance.

Posted: Tue Jul 21, 2009 9:17 am
by chulett
This typically means your XPath Expressions are not correct. How were they generated - from an xsd or manually? Can you post some samples of what you are trying to generate and the XPath Expressions you are using?

Posted: Tue Jul 21, 2009 9:21 am
by datskosaraju
In addition you can always check this for more information on XML and web services( Ernie's Blog)

http://dsrealtime.wordpress.com/

Posted: Tue Jul 21, 2009 9:44 am
by skilletrx2
chulett wrote:This typically means your XPath Expressions are not correct. How were they generated - from an xsd or manually? Can you post some samples of what you are trying to generate and the XPath Expressions you are using?
Hi there, this is my input Sequential File:
0001, Company, Lee, Chen, Lee@gmail.com

I use:
Sequential File Stage (bring in the input CSV file), connect it to the TRANSFORMER Stage, which is connected to the XML Output Stage.

I mapped the transformer stage to the xml output stage, and in the xml output stage I set the following:

(everything default except:
STAGE > Document Settings > Namespace Declaration > [x] Include
and I loaded the target.xml definition which looks like this:

<CustomerInfo xmlns="http://www.ibm.com/schemas/SimpleXMLDemo"
xmlns:cnt="http://www.ibm.com/schemas/ContactDemo"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CustomerID>0000000001</CustomerID>
<CompanyName>MindLight Corp.</CompanyName>
<Contacts>
<cnt:Contact>
<cnt:FirstName>Lee</cnt:FirstName>
<cnt:LastName>Chen</cnt:LastName>
<cnt:Email>LeeChen@gmail.com</cnt:Email>
</cnt:Contact>L
</Contacts>
</CustomerInfo>

Also changed TRANSFORMATION SETTINGS to output a single row, and set it to output the XML file.

TIA!

Posted: Tue Jul 21, 2009 1:02 pm
by skilletrx2
Found it:

XPATH was the correct issue, I had no idea, that resided in the "DESCRIPTION" column of the XML Output Stage (Input > Columns > Description)

That had to be mapped correctly for it to work, the best thing to do would be to use a table definition instead of quickly putting columns in. Using Table Definitions seem to populate the "DESCRIPTION" field which I believe are XPATH values.

Just wanted to jot this down in case it helps some noobie.

Thanks all.

Posted: Tue Jul 21, 2009 1:06 pm
by chulett
Correct, the XPath Expressions go in the "Description" field... glad you got that figured out. :wink: