cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow with SAP NetWeaver Gateway version 7.4 ( POST the HTTP request with Headers Issue )

0 Kudos

Hi Everyone,

We are trying approve the workflow decision by POST the HTTP request with Headers (SAP Business Workflow with SAP NetWeaver Gateway version 7.4).

HTTP POST with Headers (x-csrf-token)

we are following the SAP document

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/509c922a-aa9a-2f10-328c-d3814560d...

Below the code we are trying the same.

var oHeaders = {};

oHeaders["x-csrf-token"] = "<?php echo $csrftoken['xcsrfToken'];?>";

oHeaders["Authorization"] = "Basic ZGV2ZWxvcGVyOm5vc2VjcmV0";

jQuery.ajax({

    type: "POST",

    url: "http://server:port/sap/opu/odata/IWWRK/WFSERVICE/ApplyDecision?workitem_id='000000072621'&dec_key='0...'",

    data: null,

    headers: oHeaders,

    success: successFunc,

    error: errorFuncDefault

});

function successFunc(data) {

    alert(data);

}

function errorFuncDefault(data) {

    alert(data + 'error');

}

We facing the below errors like Method not supported some time and Authorization failed and we tried all possible ways but no result.

Could please help me, where  we are going wrong.

Thanks in advance

Venky.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Venky,

Not sure if this is in the correct forum.  Perhaps you ought to post this in the Netweaver community instead as there are more likely to be developers there.

Regards

Graham