XMLUtils cannot be resolved

One Star

XMLUtils cannot be resolved

Hi,
I am using Talend Open studio 5.6.1. While running below Java code in a tJava component
System.out.println(XMLUtils.DOMToString((Document) globalMap.get("req.payload")));
I get the error message : "XMLUtils cannot be resolved"
I am using java version "1.7.0_67". Which jar file do I need to load using tLibraryLoad component.
Thanks,
Alok
Community Manager

Re: XMLUtils cannot be resolved

Hi 
You need to load axis.jar with tLibraryLoad before using its API. About API, see 
https://axis.apache.org/axis/java/apiDocs/org/apache/axis/utils/XMLUtils.html
and you should write the complete package name. 
System.out.println(org.apache.axis.utils.XMLUtils.DOMToString((Document) globalMap.get("req.payload")));

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Downloads and Trials

Test drive Talend's enterprise products.

Downloads