Facing issue in consuming restful webservices | Community
Skip to main content
Level 3
October 16, 2015
Solved

Facing issue in consuming restful webservices

  • October 16, 2015
  • 3 replies
  • 1208 views

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.

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

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

3 replies

Jitendra_S_Toma
Level 10
October 16, 2015

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
Ratna_Kumar
Level 10
October 16, 2015

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.

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
October 16, 2015

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