Configuring the tJavaRow component - 6.5

ESB REST

author
Talend Documentation Team
EnrichVersion
6.5
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for Big Data
Talend Open Studio for Data Integration
Talend Open Studio for ESB
Talend Open Studio for MDM
Talend Real-Time Big Data Platform
task
Data Governance > Third-party systems > ESB components > ESB REST components
Data Quality and Preparation > Third-party systems > ESB components > ESB REST components
Design and Development > Third-party systems > ESB components > ESB REST components
EnrichPlatform
Talend Studio

Procedure

  1. Connect tRESTRequest to tJavaRow using the Row > UserInfo connection.
  2. Double-click tJavaRow in the design workspace to display its Basic settings view.
  3. Enter the following code in the Code box to convert the message into Document type and print it in the console.
    String  result = new String(input_row.id,0,input_row.id.length);
    
    routines.system.Document doc = new routines.system.Document();
    
    doc.setDocument(org.dom4j.DocumentHelper.parseText(result));
    
    output_row.id = doc;
    
    System.out.println(result);