Skip to main content
Oct 23, 2015 11:13 PM UTC
Solved

Integration with IBM Watson Explorer (WEX)

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? 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
kautuk_sahni
kautuk_sahniAccepted solution
Level 9
Oct 26, 2015 6:05 AM UTC

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

Kautuk Sahni

2 replies

smacdonald2008
Level 10
Oct 24, 2015 1:57 PM UTC

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)

Translate
kautuk_sahni
kautuk_sahniAccepted solution
Level 9
Oct 26, 2015 6:05 AM UTC

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

Translate
Kautuk Sahni