In the tutorial, it is recommended to install the Postman extension for Google Chrome, but any other REST client should work as fine as long as you can configure properly the different parameters of each request.
Common issues:
Could not get any response
This error is usually caused because the URL entered is incorrect.
In the tutorial, C4PAURL
is used to reference your application URL, but is not properly replaced in the field.
For example, in the “Dataset” call you will have to use the following URL:
Which would give you something like this (where XXXXXXXXXXX is your account identifier:
https://aac4paservicesXXXXXXXXXXXtrial.hanatrial.ondemand.com/com.sap.aa.c4pa.services/dataset/sync
405 Method Not Allowed
Most of the predictive services uses GET
or the POST
method and by default, all services will return a response even if an error is triggered. So, if you don’t get any response, it most likely due to an unsupported method error as displayed on the following screenshot.
Make you are using the right method as detailed in the tutorial.
404 Not Found
Most of the predictive services uses GET
or the POST
method, but some uses the DELETE
method, for example to delete a job or a dataset registration.
The identifier for the item to be deleted is passed in the URL.
When the item is not found, then the service will return a 404 Not Found and this is as designed.
Your browser does not support JavaScript
In the tutorial, it is recommended to install the Postman Interceptor extension for Google Chrome which will allow Postman to use your current browser session and its cookies.
Therefore your credentials won’t be validated what you are using for the Basic Auth
fields.
However, if your session expires in Google Chrome you won’t be able to access the services anymore unless the aac4paservices
application is properly configured and the provided credentials are correct.
This is the error message you will receive:
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no">
<meta http-equiv="pragma" content="no-cache" />
</head>
<body style="background-color:#FFFFFF" onload="var url=window.location.hash;if(url&&0!==url.length){var anchorCookie='oucrszlgqsasuroctotpzddvo_anchor="'+encodeURIComponent(url)+'"';document.cookie=anchorCookie}document.forms[0].submit()">
<p>
<script language="javascript">document.write("Please wait ...");</script>
</p>
<noscript>
<p>Note: Your browser does not support JavaScript or it is turned off. Press the button to proceed.</p>
</noscript>
<form method="post" action="https://accounts.sap.com/saml2/idp/sso/accounts.sap.com">
<input type="hidden" name="SAMLRequest" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>
<input type="hidden" name="RelayState" value="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"/>
<noscript>
<input type="submit" value="Continue"/>
</noscript>
</form>
</body>
</html>
and in the Postman context:
-
Check the Authentication Configuration
Go back to the aac4paservicess
overview page in the SAP Cloud Platform Cockpit, then under Security > Authentication Configuration.
Make sure that Custom Configuration is active
and if not click on Activate Custom Configuration.
Make sure that the User name and password and Client certificate.
After making any update, click on Save.
Then you will need to restart the aac4paservicess
application
-
Check your SAP credentials
When using an account on any of the SAP site, you will be locked after 5 failed attempts.
However, you won’t get an explicit message stating that your user has been locked (for security reasons).
If you have a session that is open, you will be able to keep it until it expires.
So, you will have to explicitly logout (usually you will get a button for that in the upper right corner of the screen).
If you can’t login again, it probably means that you will need to reset your password using the provided link on the screen.
-
Check your SAP credentials in Postman
When you enter your credentials in Postman, they will be encoded once in the header in a key named Authorization.
So if you want to update your credentials, you will have to either delete the header entry or use the Update Request on the Authorization.
You also have the possibility to view the current password using the Show Password checkbox.