Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

JSONP Store Component with custom url

Avatar

Level 3

HI All,

Good Evening All !!!

i am facing issue while using the 'JSONPStore' context store component with the below url.

http://www.gampa.com:4502/etc/clientlibs/myko/services/profile.json?callback=${callback},

JSON obj :

${callback}({"firsName":"Nani","lastName":"Gampa","age":"Gampa"})

it is not loading json object in JSONPStore component with above url.

But it is working fine with given url(Adobe url) -->

   http://api.wipmania.com/jsonp?callback=${callback}

JSONPStore obj =>

${callback}({"latitude":"21.3675","longitude":"82.7671","zoom":4,"address":{"continent":"Asia","continent_code":"AS","city":"-","country":"India","country_code":"IN","region":"-"}})

 

 It is loading proprely with the given url.

Can you please suggest me if am doing wrong.

Thanks in advance.

Thanks,

venkatesham G

2 Replies

Avatar

Level 10

Are you using this URL in the same domain or different domain ? 

Is this domain public ?

Are you seeing any errors in the browsers/ logs ?

Avatar

Level 3

In the same domain,

i dont see any authorization issue.

i see error in browser console

SyntaxError: missing ; before statement
     
 
${callback}({"firsName":"Nani","lastName":"Gampa","age":"Gamp

 

but  java side(osgi-service side)  JSON obj construction is 

${callback}({"firsName":"Nani","lastName":"Gampa","age":"Gampa"})

how to do make public for this domain?

Thanks in advance.

Thanks,

Venkatesham