Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
RichiKleibl
Advisor
Advisor

We offer in CPI the possibility to use WebService via HTTP Adapter. I usually use this feature to quickly test an Integration Flow. Especially if I don't have an SOAP Interface




  • SFTP

  • Timer Event



Of course you could add a Content Modifier and set the payload hardcoded, but I preferred to have more flexibility and testing different use cases without redeploying the IFlow. The first time I used the http Adapter I couldn't find the Endpoint or any documentation how to find this (documentation is now far better but still the endpoint is not shown as you have it on SOAP Interfaces.


IFLow with HTTP Endpoint:




 

IFlow with SOAP Endpoint:





 

Where to find the HTTP Endpoint?


In the past I couldn't find this information in the documentation, but when I looked around in the Cloud Cockpit


I could find the following information



I knew that cxf is used for the SOAP Endpoints so I tried if http is working for the HTTP Endpoints.


So I jused used the HTTP URL and added my values from the channel configuration.


To test the IFlow I used Postman



In the use case above I had to implement a quick access to the ARIBA Catalog. The customer already implemented the On-Premise coding to directly access ARIBA via REST Call. Afterwards they had to follow architecture guidelines to use CPI as middleware between. Therefore I created an HTTP Inbound Interface on CPI.





Update: As of the hint of engswee.yeoh and maximilianocolman

We can use dynamic endpoints by adding wildmask to it e.g.

<BASE_PATH>/http/AribaCatalog/*

This allows to send requests like: <BASE_PATH>/http/AribaCatalog/catalogs?date=2014-01-01T00:00:00

The Camel server automatically extracts the query and the resource into following header fields:

CamelHttpQuery : date=2014-01-01T00:00:00

CamelHttpPath : catalogs

 

If you don't remove those Header fields the get automatically added on the HTTP Outbound Adapter.

 

 

I hope this helps to quickly set up an HTTP IFlow.

 
9 Comments