Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

[resolved] The method getHeaders() is undefined for the type Response

Highlighted
One Star

[resolved] The method getHeaders() is undefined for the type Response

Hi All,
I'm getting below exception when I try to execute the rest webservices through tRestClient component.
java.lang.Error: Unresolved compilation problems:
The method getHeaders() is undefined for the type Response
The method readEntity(Class<String>) is undefined for the type Response
The method getHeaders() is undefined for the type Response

when I check the logs in the code section here I'm getting the exception.
globalMap.put("tRESTClient_1_HEADERS",webClient_tRESTClient_1.getResponse().getHeaders());

Attached the screen shots of tRestclient component cofiguration.
Can any one please advice me on this?.

Accepted Solutions
Highlighted
One Star

Re: [resolved] The method getHeaders() is undefined for the type Response

Hi All,
I resolved the issue by installing latest version 5.5.1 of TOS for ESB in my system.I am suspecting the issue might be because of jar files or there may be a bug in the tRestClient component.

View solution in original post


All Replies
Highlighted
One Star

Re: [resolved] The method getHeaders() is undefined for the type Response

is this configuration issue with in the component or am I missing anything?
Highlighted
One Star

Re: [resolved] The method getHeaders() is undefined for the type Response

Hi All,
I resolved the issue by installing latest version 5.5.1 of TOS for ESB in my system.I am suspecting the issue might be because of jar files or there may be a bug in the tRestClient component.

View solution in original post

Highlighted
Five Stars

Re: [resolved] The method getHeaders() is undefined for the type Response

I have a similar problem in one of my jobs.  This issue appears to be with the tRESTClient (i.e., that's where the error shows in the Code window), but when I disable a tREST component lower in the job the complaint goes away.  I'm running v.5.4.1, and it appears like these two components won't play together.

2019 GARTNER 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

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog