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.