Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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:

0683p000009MBbt.png
0683p000009MBby.png
but when I don't use the jms and I send the same message  everything works correctly
0683p000009MBc3.png
any Ideas?
Thanks
Lachmiter
Labels (3)
9 Replies
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

how about ParseUtils.parseTo_Document(xmlString)?
Anonymous
Not applicable
Author

Hi,
The same problem when I use  ParseUtils.parseTo_Document(xmlString). 
Lachmiter
Anonymous
Not applicable
Author

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
Jeeva
Contributor
Contributor

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
Anonymous
Not applicable
Author

Hi Jeeva 
Which component are you using in the job? What's the data type?
Regards
Shong
Jeeva
Contributor
Contributor

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
Jeeva
Contributor
Contributor

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