<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: ExecuteRESTService timeout in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/executerestservice-timeout/qaa-p/12420379#M4649802</link>
    <description>&lt;P&gt;That was it ! Thank you sir.&lt;BR /&gt;&lt;BR /&gt;is the documentation/signature of this function somewhere in the SDK documentation ? because I could not find it &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I only worked from examples found online..&lt;BR /&gt;&lt;BR /&gt;Have a nice day&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Sep 2021 09:07:03 GMT</pubDate>
    <dc:creator>nerevar</dc:creator>
    <dc:date>2021-09-20T09:07:03Z</dc:date>
    <item>
      <title>ExecuteRESTService timeout</title>
      <link>https://community.sap.com/t5/technology-q-a/executerestservice-timeout/qaq-p/12420377</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
  &lt;P&gt;I am using an external webservice call to synchronise email between the SAP cloud for customer and SAP IAS.&lt;/P&gt;
  &lt;P&gt;For now I am testing with some hardcoded elements, and try to update the email field in SAP IAS via scim interface.&lt;/P&gt;
  &lt;P&gt;here is my script to do so in BeforeSave.absl&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;

import ABSL;
import AP.PDI.Utilities;
import AP.Common.GDT;
import AP.PDI.bo;
var customerDB = Customer.Retrieve(this.InternalID);
var result_post: RESTCallResult;
var urlParams : collectionof NameAndValue;
var headerParams : collectionof NameAndValue;
var msg : LONG_Description;
var body : LANGUAGEINDEPENDENT_Text  ;
var headerParam: NameAndValue;


headerParam.Name = "Content-Type";
headerParam.Value = "application/scim+json";
headerParams.Add(headerParam);


body = "{\"emails\": [{\"value\": \""+this.AddressSnapshot.DefaultEMail.URI.content+"\","+
"\"primary\": true} ],\"schemas\":[\"urn:ietf:params:"+
"scim:schemas:core:2.0:User\",\"urn:ietf:params:scim:schemas"+
":extension:enterprise:2.0:User\",\"urn:sap:cloud:scim:schemas"+
":extension:custom:2.0:User\"],\"id\": \"P000005\"}";


headerParam.Name = "Content-Length";
headerParam.Value = body.Length().ToString();
headerParams.Add(headerParam);
this.CurrentCommon.IDP_LastError = "";
result_post = WebServiceUtilities.ExecuteRESTService("IDPSynchScenario","ExternalWebServiceIDP","PUT","/P000005",urlParams,headerParams, body,"");


if( result_post.Code == "200 " || result_post.Code == "201 " || result_post.Code == "202 " || result_post.Code == "204 ") // Any code of 2XX will be considered as successfull hence checking all the possible http codes
{
	return;
}
else
{
	this.Common.GetFirst().IDP_LastError = result_post.Content.Substring(0,120);
	// Raise error message and return
	//msg.content = "Webservice "+result_post.Content;
	//Err_Emp.Create("E",msg);
	return;
}
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;everything works smoothly in postman calling the scim service but I keep getting timeout errors in my absl script. And I have no way to debug this. Any ideas?&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1977685-capture.png" /&gt;&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I followed everything is this &lt;A href="https://blogs.sap.com/2021/03/09/calling-external-api-from-absl-script-in-sap-cloud-application-studio/"&gt;blog &lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 10:36:55 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/executerestservice-timeout/qaq-p/12420377</guid>
      <dc:creator>nerevar</dc:creator>
      <dc:date>2021-09-17T10:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteRESTService timeout</title>
      <link>https://community.sap.com/t5/technology-q-a/executerestservice-timeout/qaa-p/12420378#M4649801</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Based on the code snippet that you shared there is the parameter wrongly passed to WebServiceUtilities.ExecuteRESTService.&lt;/P&gt;&lt;P&gt;Your code says:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;result_post = WebServiceUtilities.ExecuteRESTService("IDPSynchScenario","ExternalWebServiceIDP","PUT","/P000005",urlParams,headerParams, body,"");&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Whereas ideally, it should be:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;result_post = WebServiceUtilities.ExecuteRESTService("IDPSynchScenario","ExternalWebServiceIDP","PUT","/P000005",urlParams,headerParams,"application/scim+json
",body);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Basically, between headerParams AND body, there is another optional parameter(which system expects)called "contentType" which you forgot to pass. As a result, the system interprets "body" variable as contentType value and "" as body and so on which might be causing issues at runtime.&lt;/P&gt;&lt;P&gt;Hence, can you please try passing content type as "application/scim+json"?&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Saurabh&lt;/P&gt;</description>
      <pubDate>Fri, 17 Sep 2021 22:20:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/executerestservice-timeout/qaa-p/12420378#M4649801</guid>
      <dc:creator>former_member226</dc:creator>
      <dc:date>2021-09-17T22:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteRESTService timeout</title>
      <link>https://community.sap.com/t5/technology-q-a/executerestservice-timeout/qaa-p/12420379#M4649802</link>
      <description>&lt;P&gt;That was it ! Thank you sir.&lt;BR /&gt;&lt;BR /&gt;is the documentation/signature of this function somewhere in the SDK documentation ? because I could not find it &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I only worked from examples found online..&lt;BR /&gt;&lt;BR /&gt;Have a nice day&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 09:07:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/executerestservice-timeout/qaa-p/12420379#M4649802</guid>
      <dc:creator>nerevar</dc:creator>
      <dc:date>2021-09-20T09:07:03Z</dc:date>
    </item>
    <item>
      <title>Re: ExecuteRESTService timeout</title>
      <link>https://community.sap.com/t5/technology-q-a/executerestservice-timeout/qaa-p/12420380#M4649803</link>
      <description>&lt;P&gt;Glad that it worked for you.&lt;/P&gt;&lt;P&gt;Yes, there is official documentation on help.sap.com where SAP mentioned all the params for the method. Pls see: &lt;A href="https://help.sap.com/viewer/cbcebe3cfb1647a8b0322c18dbb0b481/LATEST/en-US/75d2f40373e21014a153e5dcf2ce5d88.html" target="test_blank"&gt;https://help.sap.com/viewer/cbcebe3cfb1647a8b0322c18dbb0b481/LATEST/en-US/75d2f40373e21014a153e5dcf2ce5d88.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But my personal favorite is, SDK "Display Parameter Info" button, as shown:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1975753-2021-09-20-18-14-40.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2021 16:16:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/executerestservice-timeout/qaa-p/12420380#M4649803</guid>
      <dc:creator>former_member226</dc:creator>
      <dc:date>2021-09-20T16:16:26Z</dc:date>
    </item>
  </channel>
</rss>

