on 06-30-2022 11:46 AM
Hi All,
We have scenario where we make a HTTP call to generate salesforce token via UDF using OAuth authentication, it works fine in SAP PI 7.5 dev environment
When we are trying to do the same in test environment we are seeing 'org.w3c.www.protocol.http.HttpException: Connect timed out'
The UDF code and the parameters used and token URL(via VM) all remains the same in both environments.
The UDF code goes as below
String urlParameters = "grant_type=password&username="+username+"&password="+password+"&client_id="+client_id+"&client_secret="+client_secret;
byte[] postData = urlParameters.getBytes(StandardCharsets.UTF_8);
URL url = new URL( token_url);
HttpURLConnection httpClient = (HttpURLConnection) url.openConnection();
httpClient.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded");
DataOutputStream wr = new DataOutputStream(httpClient.getOutputStream());
wr.write(postData);
The configuration works well if used in SAP REST communication channel in test environment as well
Any suggestions on what could be causing this issue in ESR (UDF) of test environment only, any help appreciated.
Regards,
Smitha
Hi Smitha,
You can try to increase timeout and see if it works.
Regards,
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.