Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

how to pass headers while using guidelib.wsdlUtils.invokeWebService API or guidelib.wsdlUtils.invokeWebService API

Avatar

Level 4

I have a couple of questions regarding invoking rest api's in AEM forms.

  1. I am trying to invoke a rest api within a form which is built using AEM forms. As per Adobe docs I have read about guidelib.wsdlUtils.invokeWebService API to invoke a form data model service. Within the rules editor when I select a formdata model service to be invoked it gives me an option to select the form fields/objects to be mapped with input and output. However I dont see any option to pass header information. I need to send some access/security tokens as part of the header. Below is the api function which I tried to use:
    guidelib.dataIntegrationUtils.executeOperation(operationInfo, inputs, outputs);
    I dont see any method arguments to pass the headers. Is there a way to pass header information to the execute operation function ?
  2. Also I see another guidelib api which can be used to call webservices i.e.guidelib.wsdlUtils.invokeWebService (wsdlPath, invokeData, successHandler, errorHandler, myData). But I dont see any way to pass headers even with this function. Is there any difference between these two guidelib api's ?
3 Replies