Test CPI-PI(Cloud Foundry) Interfaces using POSTMAN
I was using CPI-PI service on Cloud Foundry environment. However, when I was trying to test interfaces using soapui/postman, I was facing connectivity issue between these tools and CPI tenant. We usually test CPI-PI interfaces using SOAPUI/POSTMAN tool. However, if you are using CPI-PI on cloud foundry environment you might have also faced connectivity issue between SOAPUI/POSTMAN to SAP CPI-PI.
Below is the error while trying to invoke interface –>
In case of neo environment, either client based or role based interfaces can be triggered from soapui/postman.
To be able to send inbound messages from sender system to CPI-PI you can configure OAUTH authentication.
- Login to CPI Tenant –> Monitor –> Roles –> Download ESBMessaging.send
- Login to SCP – Cockpit –> Select Cloud Found Subaccount –>
- Go to Spaces –>
- Select Service Market place under Service and search for the “Process Integration Runtime”
- Create Instance –> Create Instance –> Next –> Assign downloaded Role from the step 1 –> Next –> Again Next –> Finish
- Click on created instance –> Select Service Keys –> Click on create service keys –>
- Use the tokenurl?grant_type=client_credentials> as first call to get the access token –> Method POST, Authorization as Basic, Username = clientid and Password = clientsecret. Response contains the access token
- Copy Access Token and use it in the second call (CPI Endpoint), Authorization as OAUTH2.0
Now you can login to CPI Tenant –> Monitor –> Message Monitor and can see entries here.
Hope this will help in testing interfaces using soapui/postman. If you find any other way then do share it via comments.
Nice article...keep it up...gud to c u sharing ur expertise wid learners
Thank you for this guide.
currently we are using an on premise PI with loads of no auth rest sender channels and a lot of technical users for soap Senders which currently use basic authentication.
Can we setup the same mechanisms on cloud integration on CF or will everything need to be OAuth?
If we need to use oauth for everything it will be painful since all clients need to implement it. In such a case how could we provide each their individual client credentials? Do we create individual service keys for each consumer?
OAuth is not mandatory, you can use client ID and client secret as basic authentication...
Before you start remember to add entitlements to you sub-account "Process Integration Runtime"
otherwise Process Integration Runtime won't be visible in Service Marketplace