Bad Request Error when invoking third party Restful web services via .json

Avatar

Avatar

samery56615784

Avatar

samery56615784

samery56615784

29-08-2016

Hi 

We are trying to call the third party REST service in AEM 6.1 and following the example as per below URL.

https://helpx.adobe.com/experience-manager/using/restful-services.html

This example is working when we are creating the template and render the component that uses template. But when we are trying to create the separate component and using that component in some other template the it is not working and throwing the error like "Unable to retrieve data Bad request 400 (Bad Request)" (see the attached screenshot). Any idea what we are missing? or it will work only in case of render component that uses the template only not with separate component?

Thanks

~S

View Entire Topic

Avatar

Avatar

samery56615784

Avatar

samery56615784

samery56615784

31-08-2016

To reproduce it, you can follow the below steps (don't import the package as is on the helpx site):

1: Create one new separate component

2: Just copy the same code in to created component and also the query.json.jsp and clientlibs as well

3: Create one new page use any template and drop this new component from sidekick on the page.

4. Now, click on "Get Distance" button , you will see the error in to browser console as well

Thanks

~S