Highlighted

Creating bundles that consume webservices over https

Avatar

Avatar

krishna_priya_a

Avatar

krishna_priya_a

krishna_priya_a

23-12-2016

We are trying to consume a https web service from a bundle. It is throwing null pointer exception, as the socket creation for the port 443 is failing.

How can we fix this issue. Is there any configuration in AEM or is it a network issue, so that we can talk to our network team and open some port for this.

Please help

 

Regards,

Krishna Priya.

Replies

Highlighted

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

959

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

959

Correct Answer

1.1K
kautuk_sahni
Community Manager

23-12-2016

Hi 

Please have a look at these Community articles showcasing "bundles that invoke third party Restful web services" and "Developing AEM components that display WordPress information(RESTful)"

Link:- https://helpx.adobe.com/experience-manager/using/restful-services.html

Link:- https://helpx.adobe.com/experience-manager/using/aem_wordpress.html

I hope this would help you.

~kautuk

Highlighted

Avatar

Avatar

Brumoon_Ahamat

Avatar

Brumoon_Ahamat

Brumoon_Ahamat

23-12-2016

One quick thing you can do to eliminate whether it is an AEM issue or a network issue, is to login to the AEM server's shell and execute a curl to consume the webservice and see whether you get a response back. If you do get a response, then the issue is with AEM. If you don't then, then it is most probably a Network issue.

Highlighted

Avatar

Avatar

raja_vijay_sing

Avatar

raja_vijay_sing

raja_vijay_sing

28-12-2016

You would need to add your certificate to java truststore cacert

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

30-12-2016

Our AEM community articles that show use of web service do not use HTTPS. They simply use Apache CXF and Restful HTTP Java calls. 

This looks like a Java/Network issue. See:  http://stackoverflow.com/questions/1255083/consuming-https-web-services.

Highlighted

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

959

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.5K

Likes

959

Correct Answer

1.1K
kautuk_sahni
Community Manager

02-01-2017

Hi 

Adding one reference post here:

Link:-http://stackoverflow.com/questions/875467/java-client-certificates-over-https-ssl

// Java client certificates over HTTPS/SSL

 

You need to establish a chain of trust from the server cert to the JVM's own trusted CA certs. As long as a CA cert is available that starts that chain, you should be fine. If you self sign certs, you will need to add your signing CA to the java's keystore. You do not need to import every server's certificate. Just the trusted CA certificate that signed them all if it is not already trusted.

Import a root or intermediate CA certificate to an existing Java keystore:

keytool -import -trustcacerts -alias root -file Thawte.crt -keystore keystore.jks

~kautuk