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.

Calling a service from different bundles

Avatar

Level 1

There is a requirement where I have a service (lets say GetBundleInfoservice) in Bundle A. Now I need to access this service in Bundle B. What should be my approach. I have a servlet which returns a Json using that Service. However, I should atleast be able to call the service from Bundle A to Bundle B? Any suggestions?

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Community Advisor

@RekhaAd7473 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/access-service-from-anothe...

 

You need to make sure the service in Bundle A is getting exported. In Bundle B pom.xml, add the dependency of Bundle A. Once you have the dependency you can instantiate with (@Reference) and call the service methods in Bundle A.