Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
GopisettySai
Explorer

Chapter 1 - HTTP Adapter


In the world of enterprise integration, adapters play a crucial role in connecting different systems and applications. In SAP CPI (Cloud Platform Integration), there are a wide variety of adapters available that can work as both sender and receiver, allowing data to flow seamlessly between different systems.

In this blog post, we'll take a closer look at the HTTP adapter, one of the most widely used adapters in SAP CPI. We'll explore its features, use cases, and provide step-by-step instructions for configuring the adapter as both a sender and receiver.

By the end of this blog post, readers will have a better understanding of the HTTP adapter and how it can be used to integrate systems in their organization.

HTTP Adapter Overview

The HTTP adapter is a lightweight adapter that can be used as both a sender and receiver to exchange data between different systems over HTTP/HTTPS protocols. The HTTP adapter supports various message formats such as XML, JSON, and plain text, making it a versatile option for integration scenarios.

Use Cases

The HTTP adapter can be used in a wide range of integration scenarios, including:

  • Connecting cloud and on-premise systems

  • Exchanging data with external partners and vendors

  • Integrating different applications within an organization


Configuring the Sender HTTP Adapter:




Address Field:


The Address field should start with '/ ' and can contain alphanumeric values, '_' and '/ '. For example, a valid address is /test/123

Authorization:


You can select one of the following options:

1)User role

Allows you to enter a role based on which the inbound authorization is checked.

The role ESBMessaging.send is provided by default. It is a predefined role provided by SAP which authorizes a sender system to process messages on a tenant.

2)Client Certificate

Allows you to select one or more client certificates (based on which the inbound authorization is checked).

Choose Add Option to add a new certificate for inbound authorization for the selected adapter. You can then select a certificate stored locally on your computer. You can also delete certificates from the list.

For each certificate, the following attributes are displayed: Subject DN (information used to authorize the sender) and Issuer DN (information about the certificate authority that issues the certificate).

In SAP BTP cockpit, select the subaccount that hosts your SAP Cloud Integration virtual environment and create a service instance and service key.

Proceed as described under Creating Service Instance and Service Key for Inbound Authentication.

For this use case, specify the service instance and service key parameters as follows:



CSRF Protected:


This option prevents Cross-Site Request Forgery (CSRF), which is a malicious online attack. Such attacks expose user content without their authorization.

Conditions:


Body Size : It gives you option to set a maximum size limit to the payload body.


 

 

Configuring the Receiver HTTP Adapter:



 

Address:


Enter the target system URL, which we need to connect. If we need to connect to a dynamic URL then we can pass the URL from runtime. If we are getting the URL from headers, we need to specify ${header.name} if it is from exchange property, we need to specify ${property.name}.

Query:


Every URL call contains a query, when we are posting data to the receiver system. That query cannot be given in the address field. The Query can be externalized, and we can get it from the runtime too like URL.

Proxy Type:


The type of proxy that we are using to connect to the target system:

1)Internet: If we are connecting to a cloud system, we can use the option “Internet”.

2)On-Premise : If we are connecting to a on-premise system, then we need to add the URL in cloud connector

Location Id:


These can be used only when we select the On-Premise proxy type.

Method:


This gives the scope what http operation need to perform. CPI is covered with all the HTTP operations like GET, POST,DELETE,DYNAMIC,HEAD,PUT,PATCH,TRACE.

Authentication:


It Defines in which authentication method we need to connect to the receiver system.

We can use :

1)None

If there is no authentication method, then we will use None method.

2)Basic

If we receiver system has basic method, we will add the user-id and password in security material and call the key value.

And we have other Methods like Client Certificate, Oauth2 credentials, OAuth2 SAML Bearer Assertion.

Where we will be using the methods according to the receiver system and do the necessary configuration.

Timeout:


It gives us scope to wait for the response back from receiver system without terminating the message processing.

Throw Exception on Failure:


By default, the option is enabled. This option throws an exception when there are failed HTTP responses from the remote server. If there are failed HTTP responses, then the message processing fails too.

Header Details:


It gives us the scope which headers we can use in the request and response message. We can use different headers in request and response.

We Will be using an " * " to send all custom headers to the target system.

 

In summary, the HTTP adapter is a powerful integration tool that can be used as both a sender and receiver in SAP CPI. By following the steps outlined in this blog post, you'll be able to configure the adapter and exchange data seamlessly between different systems in your organization.

Thank you for reading this blog post, and we hope you found it informative and helpful. Stay tuned for more blog posts on other adapters in SAP CPI.

Please comment your views and suggestions and follow the below content for more information.

(https://answers.sap.com/tags/67837800100800006801), (https://blogs.sap.com/tags/67837800100800006801/)


Bye for now, will be back with another adapter soon!!!!!


 
9 Comments
Labels in this area