Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Facing issue in consuming restful webservices

Avatar

Level 4

Hi,

I have been trying to consume the Restful webservices in AEM. I have followed the article https://helpx.adobe.com/experience-manager/using/restful-services.html

In eclipse , Build Success coming.

But when I tried to install the jar in AEM ,bundle activation was unsuccessful.

It's giving errors like

org.apache.http.client --> cannot be resolved
org.apache.http.conn --> cannot be resolved
 

Please help me in resolving this issue

 

Thank You.

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi Vijaya Immadisetty

Please make sure that you are doing as mentioned below :-

1. Both jar should be used: - " httpclient-4.0.jar (or an older version) and httpcore-4.3.2.jar ".

Its working for me.

I hope this will solve your problem.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni

View solution in original post

3 Replies

Avatar

Level 9

Hi Vijaya,

Follow below to find out the root cause:

  1. Make sure your bundle is active.
  2. Is your component & servlet active in Apache Felix console?.
  3. Just make sure, required dependencies are available.
In general, if you use a third party HTTP client API which is OSGI bundle/not bundle has to be deployed in felix container.. You can keep it under /apps/install folder also.
For more help, provide logs etc.
----
Jitendra

Avatar

Level 10

Hi Vijaya,

That should work fine, if you include both the jars i.e., httpclient-4.0.jar (or an older version) and httpcore-4.3.2.jar into CQ bundle fragment.

Kindly check once again, whether the bundle in active state, It worked for me in one go!!

Thanks,
Ratna Kumar.

Avatar

Correct answer by
Administrator

Hi Vijaya Immadisetty

Please make sure that you are doing as mentioned below :-

1. Both jar should be used: - " httpclient-4.0.jar (or an older version) and httpcore-4.3.2.jar ".

Its working for me.

I hope this will solve your problem.

 

Thanks and Regards

Kautuk Sahni



Kautuk Sahni