Skip to Content
Technical Articles
Author's profile photo Appala Naidu Uppada

Cloud Integration- Developing Custom Adapters to access On-Premise systems


SAP Cloud Integration offers Adapter Development Kit (ADK) to develop custom adapters. This blog describes the steps required to implement on-premise connectivity from the custom adapter.

Using ADK on CPI, you can now develop custom adapters which can also connect to on-premise systems.


  1. I assume that you are already experienced with the development of custom adapters using ADK on CPI. Incase if you are new to adapter development using the ADK on CPI, You can get started here
  2. Cloud Connector is already installed and the on-premise system is configured in the cloud connector.


The below diagram shows how SAP Cloud Integration establishes the connection to the on-premise system.

Developing the custom adapter:

  1. Download the Generic API and Adapter API bundles from the CPI Tools page.

2.Add the and file to the resources folder that is in your ADK project.

3.Add the generic.api.jar and adapter.api.jar as a dependency in the pom.xml as shown below:

        <version>.X.X/version> <!— Replace with the downloaded version -- >                          
        <version>2.x.x</version> <!— Replace with the downloaded version -- >                          

4. Add the group ID to the <excludeGroupIds> in the pom.xml.

5. In order to achieve the on-premise connectivity from the receiver adapter, you need to import the below classes on * class


Retrieve the cloudconnector properties with the below code snippet:

CloudConnectorContext context = new CloudConnectorContext();
CloudConnectorProperties props = ITApiFactory.getService(CloudConnectorProperties.class, context);

6. Using the above retrieved properties, you can write the below sample code to establish http connection to the on-premise system.

String virtualAddress = endpoint.getAddress()  <!— Should match the address configured in the cloud connector virtual address -- > 
String locationId  = endpoint.getLocationId(); <!- Optional field -->
String proxyHost = props.getProxyHost();
String proxyPort = props.getProxyPort();
Map<String, String> additionalHeaders = props.getAdditionalHeaders();   

// create and prepare the client
 DefaultHttpClient httpclient = new DefaultHttpClient();
 HttpGet httpGet = new HttpGet(address);
 HttpHost proxy = new HttpHost(proxyHost, proxyPort);
 httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
 if (locationId != null) {
   httpGet.setHeader("SAP-Connectivity-SCC-Location_ID", locationId); 
 setAdditionalHeaders(additionalHeaders, httpGet);

That’s all. Now your custom adapter should be able to connect to on-premise system.




Assigned Tags

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

      Dear Appala Naidu,

      Great technical write-up!

      Thank you for officially supporting this feature and making custom-adapter developers' lives easier!

      Best regards,

      Author's profile photo Jürgen Flandorfer
      Jürgen Flandorfer


      thanks for the article!

      Is it possible to deploy a custom adapter on an PO 7.5 with on-premise CPI runtime? The *.esa output is not deployable via the Cloud Integration Content Management Cockpit on the PO.


      Author's profile photo adrian di ruggiero
      adrian di ruggiero


      First of all, thank you for sharing this article. Very clear!

      I'm having a problem, for some reason, these two methods of "endpoint" class are undefined:

      String virtualAddress = endpoint.getAddress();
      String locationId = endpoint.getLocationId();

      Did you build a custom class to include these methods()?

      In SAP sample (, both "address" and "locationId" are undefined:

      Sorry if this question is so basic, but I'm just beginning to develop an adapter, and the official documentation is not really helpful.

      Thanks in advance.


      Author's profile photo Denise Landers
      Denise Landers

      Hi Adrian, Fatih and Jurgen,

      Were you able to use the code snippet in this blog in a working custom adapter and make http connections using Basic Authentication?

      Thank you,




      Author's profile photo adrian di ruggiero
      adrian di ruggiero

      Hi Denise,

      I'm afraid I was unable to make it work... and after that, I've changed the way to retrieve the data I needed.

      I'm pretty sure building your own custom adapter should be a good thing, but right now I have no time (and not skills enough) in order to invest on this matter.


      Author's profile photo sangwon Lim
      sangwon Lim


      Thanks for your information.

      Can custom adapter develop to connection On-Premise application using TCP connection via using Cloud Connector?

      SAP official document and thi blog only described HTTP connection.