One Star

tFileInputMSXML - book example doesn't work

Please help this absolute Talend novice.
I am following the text in Components_TOS_RG_EN.pdf version 3.1_c very closely. I can't follow them exactly because they talk about a third tLogRow which is not defined in any way, so I'm ignoring that.

Point to note, the definition of the XPath Queries field in the tFileInputMSXML, Basic settings, Outputs section is not well described at all. I am going on the assumption that I need to have the same thing as per the screenshot in the book -- i.e. ".". I tried it with and without, and the result is exactly the same.
This result is -- when I press F6, I get the message
Execution failed :Failed to generate code.

Other jobs are compiling and running fine, so I'm guessing it's not the setup, but please correct me.
I did notice that the links don't seem to inherit any columns, even though I have defined the column when declaring the schema (as per the screenshot).
I manually created a schema for tLogRow_1 and 2, with the columns named "record" and "book" respectively and Sync'ed the columns. Again, tried it with and without declaring the columns, exactly the same happens.
Please tell me it's something very easy.
Kind regards,
Mihai
10 REPLIES
Community Manager

Re: tFileInputMSXML - book example doesn't work

Hello
See 7779.
Best regards

shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: tFileInputMSXML - book example doesn't work

saw that. just going to try it out. However, given that Talend couldn't generate the code, not sure how a different XML structure will help.
Anyway -- my laptop's slept now, maybe it's feeling better today.
One Star

Re: tFileInputMSXML - book example doesn't work

ok -- didn't get very far. I was unable to define "disk" as a link name and also, I was not allowed to have "book" as a schema name. I'm uninstalling Talend and I'll try re-installing. What Java version are you running?
One Star

Re: tFileInputMSXML - book example doesn't work

Allrightey then!
I'm on Windows XP, logged in as a local administrator.
Deleted the Talend directory (del C:\Program Files\Talend\*.* /s /q /f)
Upgraded Java to the latest release (6) -- which is supported according to the Talend installation instructions.
My PATH variable is :
Microsoft Windows XP 
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\mihai.doros>echo %PATH%
C:\Program Files\Java\jre6\bin;C:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C
:\Program Files\Oracle\jre\1.1.8\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wb
em;C:\Program Files\Common Files\Roxio Shared\9.0\DLLShared\;C:\Program Files\Common Files
\DivX Shared\;C:\Program Files\Common Files\Roxio Shared\DLLShared\;"C:\!My Shared Files\M
ihai's Toolkit\Mihai's Toolkit\Shell"
C:\Documents and Settings\mihai.doros>

Re-installed Talend from the executable I downloaded last week (3.1.3.r26090)
Used the guidance in http://www.talendforge.org/forum/viewtopic.php?id=7779 Shong helpfully provided.
Using the xml file called multi.xml with the content
<root>
<subRoot>

<mybook>
<mybookRec1>livre 1</mybookRec1>
<mybookRec2>livre 2</mybookRec2>
<mybookRec3>livre 3</mybookRec3>
<mybookRec4>livre 4</mybookRec4>

</mybook>
<mydisk>
<mydiskRec1>mydisk 1</mydiskRec1>
<mydiskRec2>mydisk 2</mydiskRec2>
<mydiskRec3>mydisk 3</mydiskRec3>
<mydiskRec4>mydisk 4</mydiskRec4>

</mydisk>

</subRoot>
<subRoot>
<mybook>
<mybookRec1>livre 11</mybookRec1>
<mybookRec2>livre 22</mybookRec2>
<mybookRec3>livre 33</mybookRec3>
<mybookRec4>livre 44</mybookRec4>
</mybook>
<mydisk>

<mydiskRec1>mydisk 11</mydiskRec1>
<mydiskRec2>mydisk 22</mydiskRec2>
<mydiskRec3>mydisk 33</mydiskRec3>
<mydiskRec4>mydisk 44</mydiskRec4>


</mydisk>
</subRoot>
</root>

I tried to use the words "book" and "disk" but I couldn't because first they were invalid, then they're apparently in use. (I don't know why that is, because, like I said, just un-installed and re-installed Talend, but I'll move on.)
So I did a global replace on "book" --> "mybook" and "disk" --> "mydisk" and used that from there on.
Commentary on the pictures themselves.
I would realy apreciate your help.
One Star

Re: tFileInputMSXML - book example doesn't work

Hi Mihai !
Sorry, it works fine.
Here is my xml file :
<root>
<subRoot>
<book>
<bookRec1>livre 1</bookRec1>
<bookRec2>livre 2</bookRec2>
<bookRec3>livre 3</bookRec3>
<bookRec4>livre 4</bookRec4>
</book>
<disk>
<DiskRec1>disk 1</DiskRec1>
<DiskRec2>disk 2</DiskRec2>
<DiskRec3>disk 3</DiskRec3>
<DiskRec4>disk 4</DiskRec4>
</disk>
</subRoot>
<subRoot>
<book>
<bookRec1>livre 11</bookRec1>
<bookRec2>livre 22</bookRec2>
<bookRec3>livre 33</bookRec3>
<bookRec4>livre 44</bookRec4>
</book>
<disk>
<DiskRec1>disk 11</DiskRec1>
<DiskRec2>disk 22</DiskRec2>
<DiskRec3>disk 33</DiskRec3>
<DiskRec4>disk 44</DiskRec4>
</disk>
</subRoot>
<subRoot>
<book>
<bookRec1>livre 111</bookRec1>
<bookRec2>livre 222</bookRec2>
<bookRec3>livre 333</bookRec3>
<bookRec4>livre 444</bookRec4>
</book>
</subRoot>
<subRoot>
<book>
<bookRec1>livre 1111</bookRec1>
<bookRec2>livre 2222</bookRec2>
<bookRec3>livre 3333</bookRec3>
<bookRec4>livre 4444</bookRec4>
</book>
<disk>
<DiskRec1>disk 111</DiskRec1>
<DiskRec2>disk 222</DiskRec2>
<DiskRec4>disk 444</DiskRec4>
</disk>
</subRoot>
</root>
Here are several print from my job. If I can get your mail, I can send you my job and my xml file.
Good luck !
Kim
One Star

Re: tFileInputMSXML - book example doesn't work

Hi !
Others picutres was too big... Oups.
Bye.
Kim
One Star

Re: tFileInputMSXML - book example doesn't work

Thank you Kim. Problem was capitalisation in the tLogRow_ schemas.
The tFileInputMSXML stage had the XPath Querys as "mybookRec1", "mybookRec2" etc.
The tLogRow entries had "mybookrec1", "mybookrec2" etc.
One Star

Re: tFileInputMSXML - book example doesn't work

... no it isn't solved.
Kim's job runs with no problems, but when I try to re-create the job from a blank canvas, I cannot create the "book" link -- back to the "Input is invalid" message when I try to name the link
<sigh>
I only thought my job was running. What was, in fact, happening was that the tabs at the botton of TOS were not updating correctly. I was looking at my job, but the Run tab was still pointing at Kim's job, giving me a false impression of what was running.
One Star

Re: tFileInputMSXML - book example doesn't work

Ok -- astounded! got it to work.
Instead of dragging a link between objects and naming it, you need to right-click on the tFileInputXML object, select row, pick which row and drop the end on the tLogRow object.
by Jove!
One Star

Re: tFileInputMSXML - book example doesn't work

hi
how to use tFileInputMSXML file to read below xml file :
<?xml version="1.0" encoding="UTF-8"?>
<!--
Generated by: tap3xml TAP3-XML Converter
copyright (c) 2005-2012 Javier Gutierrez
All rights reserved
tap3edit Tools (http://www.tap3edit.com)
-->
<RapDataInterChange>
<returnBatch>
<rapBatchControlInfoRap>
<sender>ARETC</sender>
<recipient>SYCCW</recipient>
<rapFileSequenceNumber>00750</rapFileSequenceNumber>
<rapFileCreationTimeStamp>
<localTimeStamp>20130304034636</localTimeStamp>
<utcTimeOffset>+0100</utcTimeOffset>
</rapFileCreationTimeStamp>
<rapFileAvailableTimeStamp>
<localTimeStamp>20130304034636</localTimeStamp>
<utcTimeOffset>+0100</utcTimeOffset>
</rapFileAvailableTimeStamp>
<specificationVersionNumber>3</specificationVersionNumber>
<releaseVersionNumber>11</releaseVersionNumber>
<rapSpecificationVersionNumber>1</rapSpecificationVersionNumber>
<rapReleaseVersionNumber>5</rapReleaseVersionNumber>
<tapDecimalPlaces>3</tapDecimalPlaces>
</rapBatchControlInfoRap>
<returnDetails>
<severeReturn>
<fileSequenceNumber>06875</fileSequenceNumber>
<gprsCall>
<gprsBasicCallInformation>
<gprsChargeableSubscriber>
<chargeableSubscriber>
<simChargeableSubscriber>
<imsi>424021431426942</imsi>
<msisdn>971504524600</msisdn>
</simChargeableSubscriber>
</chargeableSubscriber>
<pdpAddress>10.130.30.69</pdpAddress>
</gprsChargeableSubscriber>
<gprsDestination>
<accessPointNameNI>blackberry.net</accessPointNameNI>
<accessPointNameOI>mnc002.mcc424.gprs</accessPointNameOI>
</gprsDestination>
<callEventStartTimeStamp>
<localTimeStamp>20130303201159</localTimeStamp>
<utcTimeOffsetCode>0</utcTimeOffsetCode>
</callEventStartTimeStamp>
<totalCallEventDuration>0</totalCallEventDuration>
<partialTypeIndicator>I</partialTypeIndicator>
<chargingId>443428443</chargingId>
</gprsBasicCallInformation>
<gprsLocationInformation>
<gprsNetworkLocation>
<recEntity>
<RecEntityCode>1</RecEntityCode>
<RecEntityCode>4</RecEntityCode>
</recEntity>
<locationArea>1</locationArea>
<cellId>264</cellId>
</gprsNetworkLocation>
</gprsLocationInformation>
<equipmentIdentifier>
<imei>3574610464245312</imei>
</equipmentIdentifier>
<gprsServiceUsed>
<dataVolumeIncoming>0</dataVolumeIncoming>
<dataVolumeOutgoing>0</dataVolumeOutgoing>
<chargeInformationList>
<ChargeInformation>
<chargedItem>X</chargedItem>
<exchangeRateCode>0</exchangeRateCode>
<callTypeGroup>
<callTypeLevel1>10</callTypeLevel1>
<callTypeLevel2>0</callTypeLevel2>
<callTypeLevel3>0</callTypeLevel3>
</callTypeGroup>
<chargeDetailList>
<ChargeDetail>
<chargeType>00</chargeType>
<charge>0</charge>
<chargeableUnits>0</chargeableUnits>
<chargedUnits>0</chargedUnits>
</ChargeDetail>
</chargeDetailList>
<taxInformation>
<TaxInformation>
<taxCode>0</taxCode>
<taxValue>0</taxValue>
</TaxInformation>
</taxInformation>
</ChargeInformation>
</chargeInformationList>
</gprsServiceUsed>
</gprsCall>
<errorDetail>
<ErrorDetail>
<errorContext>
<ErrorContext>
<pathItemId>1</pathItemId>
<itemOccurrence>1</itemOccurrence>
<itemLevel>1</itemLevel>
</ErrorContext>
<ErrorContext>
<pathItemId>3</pathItemId>
<itemOccurrence>367</itemOccurrence>
<itemLevel>2</itemLevel>
</ErrorContext>
<ErrorContext>
<pathItemId>14</pathItemId>
<itemOccurrence>1</itemOccurrence>
<itemLevel>3</itemLevel>
</ErrorContext>
</errorContext>
<itemOffset>87340</itemOffset>
<errorCode>255</errorCode>
</ErrorDetail>
</errorDetail>
<operatorSpecList>
<OperatorSpecInformation>SeqNo:6875</OperatorSpecInformation>
<OperatorSpecInformation>DESCR: Duplicated GPRS call</OperatorSpecInformation>
<OperatorSpecInformation>CONTEXT: TransferBatch ->
CallEventDetailList ->
GprsCall</OperatorSpecInformation>
</operatorSpecList>
</severeReturn>
</returnDetails>
<rapAuditControlInfo>
<totalSevereReturnValue>0</totalSevereReturnValue>
<returnDetailsCount>1</returnDetailsCount>
</rapAuditControlInfo>
</returnBatch>
</RapDataInterChange>


i tried implementing the above logic of "book" and "disk" ,here the loop elements are "rapBatchControlInfoRap", "severeReturn" and "rapAuditControlInfo" the details for "severeReturn" is not getting displayed in tLogRow component . Do suggest the solution.