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: 
former_member86721
Participant
Introduction:

Triggering a Test message to SAP CPI cloud foundry trial account is different from sending it to Neo environment. In this Blog, we are going to see on how to send a message to SAP CPI trial account.

Sending message to SAP CPI Trial Account:

  • Logon to Trial Home and navigate to the subaccount where in the Process Integration has been subscribed.

  • Create Instance for the Process Integration by navigating to Services ->Service Instances -> Create Instance.





  • Select the options from the dropdown as shown in the below screenshot and input the alias name for your instance, click Next.





  • In the specify parameters tab, input the below json and select “Create Instance”.


{

"roles":[

"ESBMessaging.send"

]

}

  • Now, the service instance has been created with the role “ESBMessaging.send”. The Next step is to “Create Service key”.

  • Select the three dotted line on the service instance -> “Create Service Key”.





  • Give a name to service key and select create.





  • In this way, you can create n number of service keys for each source dedicatedly which enables us to remove the service key easily if in case any sender goes out of scope.

  • Select three dots on the service created and select “View”.





  • Copy the values of clientid, clientsecret and tokenurl parameters. These are the credentials that you use to make a request to your integration flow.





  • I have created an integration flow with http sender which just outputs “This is a test message”.





  • Navigate to Integrate Content and select the appropriate IFlow to see the http URL which needs to be used to call this integration flow.





  • Now, we are going to trigger a test message to CPI via Postman. In Postman, specify the endpoint URL as the value which you have got in the token endpoint URL and append ?grant_type=client_credentials.

  • Select the Authorization as “Basic Auth” . Input “ClientID” value as username and “Client Secret” value as password.

  • Now, send the message and you will get a response back with the access_token.





  • Now, call the actual integration flow URL now by selecting the authorization as “Bearer” and input the value which you have got in the access_token field of the previous step.





  • Hurray!! Its success and we have got the expected response back.

  • The Postman test can also be done in another way. Call the Integration Flow endpoint directly by selecting the authorization as “Oauth 2.0”.

  • Then, Configure the new token by selecting the Grant type as “Client Credentials” and fill in the appropriate filed with its respective data.





  • Click “Get New Access Token” --> ”Proceed” --> “Use Token”. Now, send the request and you can see the same expected response.

  • Also, you can see sync button and select the same to get the access token each time the request is being made.





  • Hurray!! Its success again and we have got the expected response back.


Conclusion:

  • Finally, We arrived at a conclusion on how to trigger a test message to SAP CPI Trial account. You can also create n number of service keys with the associated instance depending on your needs.

  • Each Service keys can be used for dedicated purpose.

4 Comments
Labels in this area