Closed ahusemann closed 5 years ago
Thanks for reporting this! This is indeed incorrect in the tutorial.
One small suggestion: instead of setting /successfactors/odata/v2
as service path and then calling .execute({ url: 'https://sandbox.api.sap.com' })
, you can also move the /successfactors
to the end of the url in the execute call. This has the advantage that you can resuse the generated code for integrating with a real Successfactors system (since /odata/v2
is the actual service path for that case).
Thanks for that quick response, actually that solution came to my mind as well. Your explanation, why the other approach fits better is convincing.
Thank you for your feedback. The issue seems to be resolved, so I am closing the issue.
If you still have questions, feel free to reopen the issue.
Tutorial URL: https://developers.sap.com/tutorials/cloudsdk-js-generator.html
Please specify the step you are referring to Step 6: Integrate with Express.js application (optional)
The call of http://localhost:8080/candidates always fails, this is due to a wrong path defined in step 4. The API is available under the path https://sandbox.api.sap.com/successfactors/odata/v2/Candidate according to the API Business Hub, but the request with settings from step 4 results in a call to https://sandbox.api.sap.com/odata/v2/Candidate which gives a 404 error.
Changing the json from step 4 to "{ "RCMCandidate": { "directoryName": "sfo-data-service", "servicePath": "/successfactors/odata/v2", "npmPackageName": "sfo-data-service" } }" and regenerating the client resolves the issue.