Call an OOTB Sling Servlet from a workflow process
Hi All,
I have a usecase where I need to call an OOTB AEM Sling Servlet from a workflow step process and store the response from the servlet in asset metadata. Is there a way to call the sling servlet running in the same AEM instance without using the Apache HTTP api? I have already tried calling the servlet using the Apache HTTP api with basic authentication, and it works but, I have to hardcode the url to something like "http://localhost:4502/.... (in my local instance). Is there a better way to do this than using the http api? I don't like to hardcode (or use configs) the host:port to build the url and the credentials. And, i feel it defeats the purpose since I am trying to call the servlet from within the same AEM instance from a bundle.
I would greatly appreciate any help or helpful pointers you can provide.
-SKM


