Skip to Content
Author's profile photo Former Member

Consuming REST web service (with Parameters) in BODS using HTTP Adapter

Let us try to understand, how to access a REST based web service (with parameters) in batch job from BODS. This feature is supported from BODS 4.0 SP3 patch3.


In this example, we will try to call an external web service by passing two values viz. material number and type as arguments and will capture the material attribute details as return by the web service function.


To implement this in SAP Data Services, first of all we need to create a HTTP adapter instance, then add an operation to the adapter instance and create HTTP Adapter datastore. Next we need to Import the required function module. Finally build a Job and a Dataflow to consume the function module.


To add a HTTP adapter instance in the Administrator


  • Select Adapter Instances > Job Server.
  • Click the Adapter Configuration tab.
  • Click Add.
  • Select the adapter from the list of those available on this Job Server.
  • Enter the required information to create an HTTP adapter instance.
  • Click Apply.


Let’s name the Adapter Instance name as HttpAdapter. For the other fields, select default values.

The next step is to configure adapter operations. Adapter operations identify the integration operations available with the configured adapter instance.


To add an operation instance to an adapter instance


  • Select Adapter Instances > Job Server.
  • Click the Adapter Configuration tab.
  • Under Dependent Objects, click Operations.
  • Click Add to configure a new operation.
  • Select an operation type from the list (here Request/Reply), then click Apply. The options that appear depend on the operation specific design.
  • Complete the operation instance configuration form.
  • Click Apply.

Here for this demonstration I am using the below dummy web service.





  • Give name of the input xsd in ‘Request message format’.

  Input parameters can be converted to xsd as follows(the reason is that BODS can only use xml format as input and output):


  • Give schema name of the reply xml in ‘Response message format’.
  • Give ‘param-value’ in ‘convert input XML to’ column. This is required to convert the input xml to parameters.

   The next step is to create the Datastore. Go to the Datastore tab of the Local Object Library. Right-click and select New to create a Datastore.

For Datastore type, select Adapter. For Job Server, select the Job Server configured to handle HTTP adapter. For Adapter instance name, choose the instance name configured in the Administrator. Click OK to save values and create the datastore.



To import message functions

  • In the Designer, double-click the HTTP data store .The Adapter Metadata Browser window opens.
  • Right-click the operation instance to import and select Import from the menu.


The operation instance OPERATION_GET_DESC is added to the datastore.

So now we can find the imported function under the Message Functions section of the HTTP Datastore of the Local Object Library.

Double-click the function module to preview the Schema Definition. As mentioned previously this function module expects an input XML Schema as REQUEST and also returns an output XML Schema as REPLY or response.



Now a Dataflow in a data services job can consume the function call. Below is the implementation screenshot of the Dataflow.


Here the Source Table has columns CLIENT and PID. The requirement here is to pass this information to web service and get the reply message.


Here the query transform Q_Test_Nest is used to generate a XML Schema(TEST_ADAPTER_INPUT) as per the required input template for the Web Service Function. In query transform Q_Test_XML_Func_Call , function OPERATION_GET_DESC is called by using New function call and passed the generated XML schema (TEST_ADAPTER_INPUT)as input arguments to the Web Service Function.


Query Transform Q_Unnest_Records is used to UNNEST the Return Schema and finally the required fields from the response xml is populated to the table C_TEST_STG.

Assigned Tags

      You must be Logged on to comment or reply to a post.
      Author's profile photo Kamal Kumar
      Kamal Kumar

      Hey ,

      Thanks a lot for your post.

      I successfully implemented above mentioned steps but while executing the job I got following error

      Error calling function:<Adapter Request_Reply: : Untrusted Server Certificate Chain>

      Kindly have a look to resolve the issue.



      Author's profile photo Former Member
      Former Member

      Hi Jincy Mathew,

      Great informative post

      Have a question on ODBC - do you have the steps to emulate an ODBC on Solaris. Tried Datadirect but that did not work.


      Megha Chanchal A. Puthussery

      Author's profile photo Former Member
      Former Member
      Blog Post Author

      Hi Megha,

      Please check link

      (last comment by Scott Broadway). It may help you.



      Author's profile photo Former Member
      Former Member

      hi Jincy M

      Thank you for the post

      I would like to know if it is necessary to have a extranet connexion to import the operation in the datastore.

      thank you in advance for your reply


      Author's profile photo Arun Sasi
      Arun Sasi

      Excellent document Jincy!!


      Author's profile photo Former Member
      Former Member

      Great Post!

      Would like to know if there is a way to include custom HTTP header parameters in Adapter/Operation configuration?

      Thank you.

      Author's profile photo Rajendra Chandrasekhar
      Rajendra Chandrasekhar


      My BODS server is sitting behind a proxy server and all the http request goes via Proxy. Is there any way to configure Proxy server authentication in HttpAdapter ?

      My Adapter is working fine without proxy but fails to connect when proxy is enables ( Keep getting Connection Timed out" error.

      Author's profile photo Arun Sasi
      Arun Sasi

      If you are connecting to the adapter from behind a proxy

      server, add the following to the end of the Additional

      Java Launcher options







      Arun Sasi

      Author's profile photo Rajendra Chandrasekhar
      Rajendra Chandrasekhar

      Thanks Arun for your quick reply. I was able to configure the Proxy in HttpAdapter. However the proxy need authentication ( i.e user ID and password). Where can we configure this ?



      Author's profile photo Arun Sasi
      Arun Sasi

      Are you getting any error after adding the proxy parameters.

      Not sure about the parameters for an authenticating proxy. I would have tried with



      Just a copy from Google... 🙂


      Arun Sasi

      Author's profile photo Rajendra Chandrasekhar
      Rajendra Chandrasekhar

      Thanks Arun, I was able to make Adapter work without Proxy User ID and Password Authentication. For some reason my earlier restart of Adapter didn't worked , but 2nd attempt did worked.

      Thanks. Rajendra

      Author's profile photo Arun Sasi
      Arun Sasi

      Glad it worked!

      Author's profile photo Former Member
      Former Member

      I am getting connection timeout error. I am not sure where I am missing. What exactly the TARGET URL should be?