var destination = $。net.http.readDestination(" com.sap.demo", " WorkflowDestination"); var client = new $ .net.http.Client(); var xrftoken = RetrieveXSRFToken(destination,client); var service =' var request = new $ .web.WebRequest($。net.http.POST,service); request.headers.set('x-csrf-token',xrftoken); < em> request.headers.set('Content-Type','application/json'); ....等。
您还可以使用基本身份验证代替AppToAppSSO,为此,您需要在SCP驾驶舱中创建一个新目的地。
然后可以如下创建xttpDest:
description =" WorkflowDestination";
host =" bpmworkflowruntime.hana.ondemand.com ";
port = 443;
pathPrefix =" <工作流服务API相对URL>";
proxyType =无;
authType =基本;
useSSL = true;
timeout = 500;
sslAuth =客户端;
,然后您可以在xsjs
var destination = $。net.http.readDestination(" com.sap.demo", " WorkflowDestination");
var client = new $ .net.http.Client();
var xrftoken = RetrieveXSRFToken(destination,client);
var service ='
var request = new $ .web.WebRequest($。net.http.POST,service);
request.headers.set('x-csrf-token',xrftoken);
< em> request.headers.set('Content-Type','application/json');
....等。
希望有帮助,
Archana
一周热门 更多>