Hi,I am trying to add / configure an new openSearch engine to Alfresco in order to query a distant mediawiki.I did customize the "web-scripts-config-custom.xml" that looks like below :
<alfresco-config>
<config evaluator="string-compare" condition="OpenSearch">
<opensearch>
<engines>
<engine label="WIKI CVF" proxy="remote">
<url type="application/atom+xml">[WIKI_HOST]/api.php?action=opensearch&search={searchTerms}&limit=10&namespace=0&format=xmlfm</url>
</engine>
</engines>
</opensearch>
</config>
</alfresco-config>
While launching a query specifying this new engine, I do have this error poped-up :
An error occurred:
Cannot read property 'documentElement' of null
While looking at the results sent back by the wiki, I may see this :
1 requests ❘ 1.08KB transferred
atom
/wcservice/api/search/engine/remote
HeadersContentCookiesTiming
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>MediaWiki API Result</title>
</head>
<body>
<br/>
<small>
You are looking at the HTML representation of the XML format.<br/>
HTML is good for debugging, but probably is not suitable for your application.<br/>
See <a href='http://www.mediawiki.org/wiki/API'>complete documentation</a>, or
<a href='/api.php'>API help</a> for more information.
</small>
<pre>
<span style="color:blue;"><?xml version="1.0"?></span>
<span style="color:blue;"><SearchSuggestion version="2.0" xmlns="<a href="http://opensearch.org/searchsuggest2">http://opensearch.org/searchsuggest2</a>"></span>
<span style="color:blue;"><Query xml:space="preserve"></span>SIE<span style="color:blue;"></Query></span>
<span style="color:blue;"><Section></span>
<span style="color:blue;"><Item></span>
<span style="color:blue;"><Text xml:space="preserve"></span>SIE-formation<span style="color:blue;"></Text></span>
<span style="color:blue;"><Description xml:space="preserve"></span>Les formations SIE:<span style="color:blue;"></Description></span>
<span style="color:blue;"><Url xml:space="preserve"></span><a href="[WIKI_HOST]/index.php/SIE-formation">[WIKI_HOST]/index.php/SIE-formation</a><span style="color:blue;"></Url></span>
<span style="color:blue;"></Item></span>
<span style="color:blue;"><Item></span>
<span style="color:blue;"><Text xml:space="preserve"></span>SIE-home<span style="color:blue;"></Text></span>
<span style="color:blue;"><Description xml:space="preserve"></span>Accueil &gt; SIE-Home<span style="color:blue;"></Description></span>
<span style="color:blue;"><Url xml:space="preserve"></span><a href="[WIKI_HOST]/index.php/SIE-home">[WIKI_HOST]/index.php/SIE-home</a><span style="color:blue;"></Url></span>
…
</pre>
</body>
</html>
<!– Served in 0.243 secs. –>
I don't know what to think, is that the real response sent back by the wiki (meaning html format instead of xml as specified in the request)? Or does Alfresco do not understand the response?thank you by advanceBertrand