Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

How to call https rest endpoint URL in AEM

Avatar

Avatar
Ignite 1
Level 1
suswan12345
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
View profile

Avatar
Ignite 1
Level 1
suswan12345
Level 1

Likes

0 likes

Total Posts

4 posts

Correct Reply

0 solutions
Top badges earned
Ignite 1
View profile
suswan12345
Level 1

16-05-2018

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]

Replies

Avatar

Avatar
Validate 1
Level 7
Jitendra_S_Toma
Level 7

Likes

71 likes

Total Posts

615 posts

Correct Reply

84 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
Level 7
Jitendra_S_Toma
Level 7

Likes

71 likes

Total Posts

615 posts

Correct Reply

84 solutions
Top badges earned
Validate 1
Give Back 50
Give Back 5
Give Back 3
Give Back 25
View profile
Jitendra_S_Toma
Level 7

06-07-2018

Hi,

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

Regards,

Jitendra

Avatar

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,089 likes

Total Posts

3,123 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,089 likes

Total Posts

3,123 posts

Correct Reply

1,063 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

07-07-2018

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

Jörg

Avatar

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,130 likes

Total Posts

6,151 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile

Avatar
Establish
Community Manager
kautuk_sahni
Community Manager

Likes

1,130 likes

Total Posts

6,151 posts

Correct Reply

1,144 solutions
Top badges earned
Establish
Coach
Originator
Contributor 2
Contributor
View profile
kautuk_sahni
Community Manager

10-07-2018

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.

Avatar

Avatar
Give Back 50
Employee
Kunwar
Employee

Likes

65 likes

Total Posts

253 posts

Correct Reply

72 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile

Avatar
Give Back 50
Employee
Kunwar
Employee

Likes

65 likes

Total Posts

253 posts

Correct Reply

72 solutions
Top badges earned
Give Back 50
Give Back 5
Give Back 3
Give Back 25
Give Back 10
View profile
Kunwar
Employee

10-07-2018

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

Avatar

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile

Avatar
Validate 25
Level 10
smacdonald2008
Level 10

Likes

1,406 likes

Total Posts

12,671 posts

Correct Reply

2,278 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Give back 900
Give back 600
View profile
smacdonald2008
Level 10

10-07-2018

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