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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments
SOLVED

Integration with IBM Watson Explorer (WEX)

Avatar

Level 1

We are new to AEM and need to integrate IBM Watson Explorer (WEX) for enterprise search.  Has anyone done this and able to point me to some documentation? 

1 Accepted Solution

Avatar

Correct answer by
Administrator

Hi  randalma2120

As mentioned by Scott, there is no specific documentation for IBM watson explorer with AEM. But Yes, we can use it with IBM Watson Explorer's rest APIs.

Create a OSGI service or Sling Servlets and write a code to send HTTP request GET/POST in it. 

Example Code :-

import org.apache.commons.httpclient.HttpClient;import org.apache.commons.httpclient.methods.PostMethod;
 
String url = "http://www.google.com";InputStream in = null;try {HttpClient client = new HttpClient();PostMethod method = new PostMethod(url);//Add any parameter if u want to send it with Post req.method.addParameter("p", "apple");int statusCode = client.executeMethod(method);if (statusCode != -1) {in = method.getResponseBodyAsStream();}


Use The link provided by Scott and customize it according to your need.

I hope this would help you. 

 

Thanks and Regards

Kautuk Sahni

View solution in original post

2 Replies

Avatar

Level 10

There is no integration or connector component between these two products. You would have to create a custom AEM service and integrate with IBM using its Rest API - which it supports. Here is a community article on how to hook a Restful service into AEM.

Creating Adobe Experience Manager bundles that invoke third party Restful web services

(this shows hooking into a Google Restful web service)

Avatar

Correct answer by
Administrator

Hi  randalma2120

As mentioned by Scott, there is no specific documentation for IBM watson explorer with AEM. But Yes, we can use it with IBM Watson Explorer's rest APIs.

Create a OSGI service or Sling Servlets and write a code to send HTTP request GET/POST in it. 

Example Code :-

import org.apache.commons.httpclient.HttpClient;import org.apache.commons.httpclient.methods.PostMethod;
 
String url = "http://www.google.com";InputStream in = null;try {HttpClient client = new HttpClient();PostMethod method = new PostMethod(url);//Add any parameter if u want to send it with Post req.method.addParameter("p", "apple");int statusCode = client.executeMethod(method);if (statusCode != -1) {in = method.getResponseBodyAsStream();}


Use The link provided by Scott and customize it according to your need.

I hope this would help you. 

 

Thanks and Regards

Kautuk Sahni