I often test the API(s) required for Interface development in postman before using them in SAP CPI IFlow. Postman gives me the flexibility to see the Raw HTTP request that worked successfully to invoke the API. I wish there was a possibility in SAP CPI to view the Raw HTTP request similarly.
Because it's not there yet, I end up using HTTP Bin which replies the actual request message as a response for various HTTP Methods for sniffing. Other options are to use the Request Catcher as explained in the Blog How to sniff SAP CPI and SAP PO requests or use mitmproxy as explained in the HTTPS tracing and debugging: (4) Cloud to cloud (using Cloud Foundry) blog. Each method has it's own merits, I won't discuss it here.
Often I use HTTB Bin or Request Catcher from SAP CPI or SAP APIM for tracing HTTP traffic. In use cases where I had to inspect the OAUTH Flow, JWT Token Flow, OAUTH2SAMLBearer assertion, etc I had no option to anonymize security artifacts, but at the same time concerned using an Internet service to inspect it. So I wrote a Node JS application that act as an Echo Service and deployed it to the SAP Cloud Platform. With this set-up, I no longer worry about the data sent for HTTP tracing.
I thought to share it with the community so it could be of use to someone someday.
cf login -a https://api.cf.eu10.hana.ondemand.com
cf push
cf apps
Update the integration flow Receiver connection details with Echoservice URL.
{
"uri": "<URL Path of http Call>",
"method": "<HTTP Method>",
"headers": {
"<Request Header Name>": "<Request Header Value>"
},
"params": {
"<Query Parameter Name>": "<Query Parameter Value>"
},
"data": "<Request Body>"
}
cf logs echoservice --recent | findstr /L APP/PROC/WEB/0
In the next blog SAP APIM – Route Service plan to Manage Cloud Foundry Apps, I will show how to manages this Cloud Foundry Micro Service using SAP API Management Route service.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
7 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |