Configuring OAuth Support for Siebel REST Outbound Connections - 22.9 Onwards

Note: For Siebel Update 21.8 to 22.8, follow the instructions at Configuring OAuth Support for Siebel REST Outbound Connections. After Siebel Update 22.9, to add a security header you can either follow the instructions in this section or follow the instructions at Configuring OAuth Support for Siebel REST Outbound Connections. The difference is that till 22.8 the steps are to add a Proxy Business Service Method Argument (Name: "Authorization:header") and then add a script to the proxy business service's Service_PreInvokeMethod event handler to assign a value to this parameter. Post Siebel Update 22.9, this can also be achieved by using the Custom Filter service steps for injecting the "Authorization" or any other parameter as described at Siebel REST API Guide -> Overview of the REST Outbound Filter Service.

The following procedure shows how to configure OAuth support for any outbound REST proxy business service.

To configure OAuth support for any outbound REST proxy business service

  1. Create a Workspace and open it in Siebel Tools/Web Tools.

  2. Import the swagger – open the API JSON file for the outbound REST service in Web Tools.

  3. Verify that the proxy business service has been created. Check the method arguments for the business service where you want to configure OAuth support.

  4. Create a new filter business service; for example 'RESTFilterTesting' with methods, for example UpdateInput and UpdateOutput methods.
  5. Add a script to the newly created Filter business service’s Service_PreInvokeMethod event handler for which you want OAuth support. For more information, see the following topics:

    1. Add Script for OAuth Support
    2. Sample Script
    3. Configure Administration – Web Service -> Outbound REST Services screen with the above for Request Filter under Filters for the REST Service -> Service Methods that you need to inject these above parameters with the Custom Filter Service that you created (for example 'RESTFilterTesting') at step 4. Caution needs to be taken to add the Filter Service method (for example UpdateInput) used in the script, to make sure that the appropriate parameters get added to the input (Request)/output (Response) property.

    4. You can add appropriate script if required, to intercept the response such as the script below.
      function Service_PreInvokeMethod (MethodName, Inputs, Outputs)
      {
         if(MethodName == "UpdateOutput" && Outputs!= null)
            {
                // write your script code here to update the response
            }
         return (CancelOperation);
      }
  6. For the existing “Siebel XSL to XML Converter” business service, set the attributes shown in the following table. This will allow you to reference the Siebel XSL to XML Converter business service in the script.

    Attribute Value

    External Use

    Yes

    Server Enabled

    Yes

    Hidden

    No

  7. After making these changes and adding the script in step 4, deliver the Workspace.

    Here's a sample updated Request done by the Filter business service script:

    > Value = 
    > Type = 
    - > Child property set #1 at level 1:
    - > Value = 
    - > Type = url
    - > httpMethod = POST
    - > url = https://https://petstore3.swagger.io/api/v3/pet
    - > Child property set #2 at level 1:
    - > Value = 
    - > Type = query
    - > query = 
    - > Child property set #3 at level 1:
    - > Value = 
    - > Type = body
    - - > Child property set #1 at level 2:
    - - > Value = 
    - - > Type = Req2SwaggerPetstoreOpenAPI30:body
    - - - > Child property set #1 at level 3:
    - - - > Value = 
    - - - > Type = ReqBody__SKIP__WRAPPER
    - - - - > Child property set #1 at level 4:
    - - - - > Value = 
    - - - - > Type = pet
    - - - - > long_id = 512312459
    - - - - > string_status = pending
    - - - - > string_name = kk5name123
    - - - - - > Child property set #1 at level 5:
    - - - - - > Value = 
    - - - - - > Type = category
    - - - - - > long_id = 11
    - - - - - > string_name = categorykk5name
    - - - - - > Child property set #2 at level 5:
    - - - - - > Value = 
    - - - - - > Type = ListOftags__Array
    - - - - - - > Child property set #1 at level 6:
    - - - - - - > Value = 
    - - - - - - > Type = tags
    - - - - - - > long_id = 5
    - - - - - - > string_name = tagskk15name
    - - - - - - > Child property set #2 at level 6:
    - - - - - - > Value = 
    - - - - - - > Type = tags
    - - - - - - > long_id = 6
    - - - - - - > string_name = tagskk25name
    - - - - - > Child property set #3 at level 5:
    - - - - - > Value = 
    - - - - - > Type = ListOfphotoUrls__Primitive
    - - - - - - > Child property set #1 at level 6:
    - - - - - - > Value = 
    - - - - - - > Type = photoUrls
    - - - - - - > string_elem__value = 55
    - - - - - - > Child property set #2 at level 6:
    - - - - - - > Value = 
    - - - - - - > Type = photoUrls
    - - - - - - > string_elem__value = 66
    - > Child property set #4 at level 1:
    - > Value = 
    - > Type = security
    - > Child property set #5 at level 1:
    - > Value = 
    - > Type = misc
    - > serviceMethod = addPet
    - > Child property set #6 at level 1:
    - > Value = 
    - > Type = header
    - > Authorization = tokentype 1234567890
    - > Content-Type = application/json