Closed anishj0shi closed 6 years ago
Hi Anish,
you should be able to use any of the available archetypes to get an empty project. While there is no pre-generated integration code such as the S/4HANA VDM, you can still call the OData services as described here:
https://blogs.sap.com/2017/05/21/step-4-with-sap-s4hana-cloud-sdk-calling-an-odata-service/
Best regards Sander
Hi Sander,
Thanks for responding, i tried running the sdk with spring boot target, but when i try to hit any api using odataquerybuilder i get some dumps:
2017-12-27 13:59:26.982 WARN 11799 --- [nio-9080-exec-2] c.s.c.s.c.s.u.UserRequestContextListener : Failed to initialize UserRequestContextListener: Failed to get current user: user not authenticated. For testing purposes, you may fall back to a mocked user by setting the environment variable "ALLOW_MOCKED_AUTH_HEADER" to "true". CAUTION: This variable must never be used in productive environments! For details on the security configuration, please refer to the SAP Cloud Platform documentation. A tutorial on the configuration is available at "https://blogs.sap.com/2017/07/18/step-7-with-sap-s4hana-cloud-sdk-secure-your-application-on-sap-cloud-platform-cloudfoundry/". 2017-12-27 13:59:26.982 WARN 11799 --- [nio-9080-exec-2] c.s.c.s.c.t.TenantRequestContextListener : Failed to initialize TenantRequestContextListener: Failed to get current tenant: user not authenticated. Note that, on SCP CF, tenant information requires authentication since it is obtained from the JWT bearer in the "Authorization" header of a request. For testing purposes, you may fall back to a mocked tenant by setting the environment variable "ALLOW_MOCKED_AUTH_HEADER" to "true". CAUTION: This variable must never be used in productive environments! For details on the security configuration, please refer to the SAP Cloud Platform documentation. A tutorial on the configuration is available at "https://blogs.sap.com/2017/07/18/step-7-with-sap-s4hana-cloud-sdk-secure-your-application-on-sap-cloud-platform-cloudfoundry/".
Could you please suggest some solution ?
Regards, ANish
Hi Anish,
This warning informs about a missing security configuration. Please have a look at the tutorial link that is provided in the message for an explanation.
Best regards Sander
Hi Sander,
for running app locally, i still have to conform these security protocol ?
Thanks, Anish
Hi Anish,
you can use the mentioned variable "ALLOW_MOCKED_AUTH_HEADER" to use a mocked tenant and user for local testing. Please be aware that this should only be used for testing and that you will get an error message warning you about this every time the variable is used to get the mocked tenant or user.
You can take a look at the last paragraph in the following blog post for a detailed explanation: https://blogs.sap.com/2017/06/23/step-5-resilience-with-hystrix/
Best regards Sander
Hello Colleagues,
I'm trying to extend the S4-sdk to Hybris Marketing Cloud, but unfortunately there's no archetype to do so, is there a way i can extend this sdk for creating a new sdk ? so far I've just seen the templates w.r.t packaging an executable nothing in terms of library.
Regards, Anish