• sumanth v 7
  • NEWBIE
  • 10 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 3
    Replies
I am facing this error in REST API webservice callout. Could you any one help to resolve this?

Note: I tried in giving req.setTimeout(20);

req.setEndpoint(toolingendpoint);
req.setMethod('GET');
Http h = new Http();
req.setTimeout(20);
HttpResponse res = h.send(req);
If i give hard code the value as below 
String toolingendpoint ='https://xxxxxxx.xxxxxx.com/sap/opu/odata/sap/xxxx_xxx_xxx/xxxx_xx?mat_num=\'*1160\'&sap-client=300';[1160 is hardcode value here]    able to retrieve data. But when i try as below unable to retieve

String toolingendpoint ='https://xxxxxxx.xxxxxx.com/sap/opu/odata/sap/xxxx_xxx_xxx/xxxx_xx?mat_num=\'*searchstring\'&sap-client=300'; [searchstring the value comes from VF page]. 

There is some mistake with '\' i am doing here. Please help.
System.CalloutException: Server chose TLSv1, but that protocol version is not enabled or not supported by the client. 

 
I am facing this error in REST API webservice callout. Could you any one help to resolve this?

Note: I tried in giving req.setTimeout(20);

req.setEndpoint(toolingendpoint);
req.setMethod('GET');
Http h = new Http();
req.setTimeout(20);
HttpResponse res = h.send(req);
If i give hard code the value as below 
String toolingendpoint ='https://xxxxxxx.xxxxxx.com/sap/opu/odata/sap/xxxx_xxx_xxx/xxxx_xx?mat_num=\'*1160\'&sap-client=300';[1160 is hardcode value here]    able to retrieve data. But when i try as below unable to retieve

String toolingendpoint ='https://xxxxxxx.xxxxxx.com/sap/opu/odata/sap/xxxx_xxx_xxx/xxxx_xx?mat_num=\'*searchstring\'&sap-client=300'; [searchstring the value comes from VF page]. 

There is some mistake with '\' i am doing here. Please help.
System.CalloutException: Server chose TLSv1, but that protocol version is not enabled or not supported by the client.