One Star

problem when I convert String to Document

Hi,
I have problem when I convert String to Document:
1- I send String with tJMSOutput (with ActiveMQ)
2- I recive the String, I convert it to Document with tConvertType
the tLogRow show that the convertion is OK but I can't write  xml with tFileOutputXml. look at screenshot:



but when I don't use the jms and I send the same message  everything works correctly

any Ideas?
Thanks
Lachmiter
9 REPLIES
Community Manager

Re: problem when I convert String to Document

Hi
I have made a testing that using tConvertType to convert a string to a document, and I am able to output the document to a XMl file with tFileOutputXML.
Make sure the XML tree structure defined on tXMLMap_1 is the same as the XML string before it is converted. If so, you could see result are printed correctly on tLogRow_4. On tFileOutputXML component, check the 'incoming is a document' box.  
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: problem when I convert String to Document

Hi,
My problem is only when I send the string with  tJmsOutPut tJmsInput, but when I bypass the components JmsOutPut JmsInput I have the xml file with tFileOutPutXML.
You test with  tJmsOutPut and tJmsInput components ?
version Talend Entreprise 5.6.2
One Star

Re: problem when I convert String to Document

how about ParseUtils.parseTo_Document(xmlString)?
One Star

Re: problem when I convert String to Document

Hi,
The same problem when I use  ParseUtils.parseTo_Document(xmlString). 
Lachmiter
Community Manager

Re: problem when I convert String to Document

Hi lachmiter 
I did't test it with tJMSInput component, but I am interesting in why you have different result with tJMSInput component, do you have the expected string (printed on tLogRow_1) after tJMSInput? The string will be convert to Document in this case.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: problem when I convert String to Document

Hi Team,
Myself also having the similar issue as he explained. If tXMLmap in the normal flow i can get the output from tXMLMap component. 
But in case of the consuming the message as XML string from the MQ where i'm trying to convert using ParseUtils.parseTo_Document(xmlString)
I can able to print the output after the conversion from String to Document conversion. But i'm not able to get the output from tXMLMap.
Is it defect in the tool or am i making any mistakes.???
Thanks
Jeeva
Community Manager

Re: problem when I convert String to Document

Hi Jeeva 
Which component are you using in the job? What's the data type?
Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Four Stars

Re: problem when I convert String to Document

Hi ,
I'm not able to attach the screen shot though it is in jpg format. 
The flow is as follows. 
JMSInput -->Log1 ---> JavaRow--->Log2 --->tMap ---> Log3 ---> tXMLMap ---> Log4
I'm reading the message from MQ as Object and then converting them as Document for further parsing. ( Through JavaRow component i'm reading object content and setting them into row3.message and using tMap converting it into Document object using ParseUtils class. ) 
I could log the results of tMap using LogRow_3 component. But i could not see the results after message is crossing from tXMLMap. 
FlieReader --> Log1 --- tXMLMap1---> Log2 --->tXMLMap2--->Log3
I've tried similar scenario to read content from file instead of MQ where tXMLMap gives the results.  But in MQ scenario there is type conversion we doing extra. Hope this information is enough. If still need more information let me know


Thanks
Jeeva
Four Stars

Re: problem when I convert String to Document

Hi Guys,
The issue has been resolved  adding the iterate link between JMSInput component with JavaFlex Component.  The connection type main is not worked out. 
Thanks
Jeeva