How to set SOCKS(v4) proxy in tRestClient

Five Stars

How to set SOCKS(v4) proxy in tRestClient


I'm trying to access a Rest-Webservice from Talend,  I used tRestClient but to access the WebService i need to configure SOCKS(v4) proxy, 

So i used tSetProxy---------Component OK ------------>tRestClient-----------(response)---------->tLogRow.

but it throws an exception (attached the log file logs.txt).

1.  tSetProxy (Basic Setting: Proxy type: Socks proxy || host:  || port: 1111 
2. tRestClient(Basic Setting: Url: https://***.slnec2.lab.443/**, Relative Pathe: "88-100")

If I provide the same proxy in Firefox then I get the response easily from MozilaRestClient.


Please help


Re: How to set SOCKS(v4) proxy in tRestClient

Exception in component tRESTClient_1 (Demo1) SSLHandshakeException invoking PKIX path building failed: unable to find valid certification path to requested target
	at org.apache.cxf.jaxrs.client.AbstractClient.checkClientException(
	at org.apache.cxf.jaxrs.client.AbstractClient.preProcessResult(
	at org.apache.cxf.jaxrs.client.WebClient.doResponse(
	at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(
	at org.apache.cxf.jaxrs.client.WebClient.doInvoke(
	at org.apache.cxf.jaxrs.client.WebClient.doInvoke(
	at org.apache.cxf.jaxrs.client.WebClient.invoke(
	at org.apache.cxf.jaxrs.client.WebClient.get(
	at testfile.demo1_0_1.Demo1.tRESTClient_1Process(
	at testfile.demo1_0_1.Demo1.tSetProxy_1Process(
	at testfile.demo1_0_1.Demo1.runJobInTOS(
	at testfile.demo1_0_1.Demo1.main(


Does the SSLHandshakeException only happen when POST? or happon for any GET/PUT/POST?

Have you tried to use tSetKeystore to load the certification before you connect to REST using tRESTClient for https end point?

Best regards


Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Five Stars

Re: How to set SOCKS(v4) proxy in tRestClient

sorry for replying late

Yes  SSLHandshakeException happens for every operation. 1st i have download the certificate(.crt file) then convert it into .jks file using keytool. and use the same in tSetKeyStore, and I have used tSetProxy for SockProxy then tRestClient is use to call the rest client.

tSetKeyStore--------------OncomponentOK----------->tSetProxy-----------------OnSubject OK---------->tRestCleint---------tLog

And now it throws an exception (please find the attached log file).