Hi all I have created and registred osgi service which returns json string, but I have some problems with calling the service in the sling model. I forgot how is the correct way. Should I use @INJECT Or @OSGIService?
Solved! Go to Solution.
Views
Replies
Total Likes
Agree with Scott, You should use WCMUsePojo while invoking a 3rd party service.
You can find a different examples as well:
Creating an Experience Manager YouTube Component
Let us know if you will face any issues.
~ Prince
Views
Replies
Total Likes
I would look at using WCMUsePojo in this case - then you can call a Restful service from that class and display in the front end of the HTL component - Article and video here:
You do not have to use Sling Model when you want to invoke a 3rd party service from the backend of the HTL component. WCMUsePojo is a better option.
Views
Replies
Total Likes
Agree with Scott, You should use WCMUsePojo while invoking a 3rd party service.
You can find a different examples as well:
Creating an Experience Manager YouTube Component
Let us know if you will face any issues.
~ Prince
Views
Replies
Total Likes