Skip to Content
Technical Articles
Author's profile photo Karthikeyan Suresh

Sending Test Message to SAP CPI Trial Account

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.

Assigned Tags

      4 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Saurabh Kabra
      Saurabh Kabra

      Hello,

      You don't need to use the Token URL when authenticating against the runtime node of the CPI Trial tenant as this is already handled at the backend.

      You can simply trigger the endpoint of the CPI iflow run time URL with basic authentication where clientid from service key is the username whereas clientsecret corresponds to the password.

      Author's profile photo Arijit Mukherjee
      Arijit Mukherjee

      Is this feature of bypassing Token URL available only in Trial Tenant?

      Author's profile photo Prasadu Singarapu
      Prasadu Singarapu

      Hai,

      This is ok for Get Method

      But please show how to do POST Method ,if you doing Post Method 403 Forbidden Error Occur.

      Post%20Method%20Error

      Post Method Error

      Author's profile photo Pratibha Singh
      Pratibha Singh

      Hi

      now instance can also be found from BOOSTER on BTP home screen of trial license. This shall automatically help in creating instance , along with credentials that can be used in tools for testing.

      ThanksBooster%20on%20BTP%20trial%20license%20for%20active%20users

      Booster on BTP trial license for active users