How to call https rest endpoint URL in AEM | Community
Skip to main content
New Participant
May 17, 2018 6:26 AM UTC

How to call https rest endpoint URL in AEM

Hi all,

I need to call the following rest endpoint from one of AEM java model/servlet.

https://localhost:9002/ws410/rest/catalogs/fanengagement/catalogversions/Staged/products/11009

I am getting the following exception.

javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

So I installed the .cer file in my local jdk.

Then I was able to call the above rest point from a static java program.

But I am still unable to call this url from my AEM servlet / model.

Can anyone tell me the steps that I need to follow for successful invocation of the rest url

Thanks,

Suswan

[Here is the list of all Adobe forums... https://forums.adobe.com/welcome]

[Comments is to ask about the operation of the Forum, not a specific program]

[Moved from the Comments forum to the specific Program forum... Mod]

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

5 replies

smacdonald2008
Level 10
Jul 10, 2018 4:00 PM UTC

Please let us know if you have tried the suggestions posted in this thread.

Translate
Employee
Jul 10, 2018 2:18 PM UTC

Can you add '-Djavax.net.debug=all' to your startup arguments, restart the system and retest the scenario ? Once replicated, share the stdout.log for review

Translate
kautuk_sahni
Employee
Jul 10, 2018 11:24 AM UTC

Check:

If there was a missing certificate in my truststore that wasn't allowing full certificate chain validation. Root CAs are in JVM, so if author is configured with CA signed certificates you should not see handshake exceptions. If this is same instance, try to make links relative instead of absolute.

Translate
Kautuk Sahni
joerghoh
Employee
Jul 7, 2018 5:26 PM UTC

What exception do you get from AEM? Are you using the same local JDK for your test program as for AEM?

Jörg

Translate
Jitendra_S_Toma
Level 10
Jul 6, 2018 6:30 PM UTC

Hi,

Are you running your AEM Instance on https and have used the same certificate?

Regards,

Jitendra

Translate