Hi,
We began trying to use the Content Server Widgets, with the intention to evaluate and determine their usefulness in integration with 3rd party applications as well as leverage them in AppWorks and we've come across some issues that we don't seem to be able to overcome.
We've used the sample , OpenText provides on https://knowledge.opentext.com/knowledge/cs.dll?func=ll&objId=57082486&objAction=browse&viewType=1 but we don't seem to be able to make it run.
<!DOCTYPE html>
<!-- 1. Include the framework code. -->
<script src="http://server/otcssupport/csui/csui.js"></script>
<!-- 2. Include the framework visual styling. -->
<link rel="stylesheet" href="http://server/otcssupport/csui/csui.css">
<style>
/* Recommended page preparation by the jQuery UI developers. */
body {
font-size: 11px;
}
</style>
<!-- 3. Perform the page initialization code. -->
<script>
// Ensure the framework initialization.
csui.onReady( function() {
// Create the server connector for the widgets.
var connector = new csui.util.Connector( {
connection: {
url: "http://server/otcs/cs/api/v1",
supportPath: "/otcssupport"
}
} ),
// Create the container browsing widget.
browser = new csui.widget.FolderBrowserWidget( {
connector: connector,
placeholder: "#folderBrowser"
} );
// Display the container browsing widget.
browser.show();
});
</script>
When we first run the code, we get a "popup" asking for the credentials for the Authentication:
**Enter your Content Server user credentials and click on "Sign in".**
After we click sign in, the POST looks like:
Remote Address:10.10.3.227:80
Request URL:http://server/External/livelink.exe/api/v1/auth
Request Method:POST
Status Code:403 Forbidden
Request Headers look like:
Accept:/
Accept-Encoding:gzip, deflate
Accept-Language:en-US,en;q=0.8,pt;q=0.6,fr;q=0.4
Connection:keep-alive
Content-Length:47
Content-Type:application/x-www-form-urlencoded
DNT:1
Host:thcsdev8es03
Origin:http://localhost:50733
Referer:http://localhost:50733/HtmlPage1.html
User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36
Response Header look like:
HTTP/1.1 403 Forbidden
Cache-Control: no-cache, no-store, must-revalidate, max-age=0
Pragma: no-cache
Content-Type: text/html
Expires: 0
Server: Microsoft-IIS/7.5
Access-Control-Allow-Origin: http://localhost:50733
Access-Control-Allow-Headers: OTCSTicket, OTDSTicket, MYSAPSSO2, Authorization, Content-Type, Content-Length
Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS
Access-Control-Expose-Headers: OTCSTicket, Content-Type
Access-Control-Max-Age: 86400
X-Powered-By: ASP.NET
Access-Control-Allow-Origin: *
Date: Wed, 20 May 2015 11:44:44 GMT
Content-Length: 1233
The first issue was around CORS and following some tips found in this forum so we added the (Access-Control-Allow-Origin *) to the response header , however we could not really make it work.
We made sure that WebDAV is only on or enabled for /livelinkDAV and we even removed it completely from the server at some point.
Right now, with the URL http://servername/External/livelink.exe/api/v1/auth, we are getting a 403 (forbidden) or "The browser refused to make the server call. Check that the server is accessible and that the CORS is enabled for this application. The console and network panels from the browser debugging tools may show more information."
We've tried to contact support and the answer we got was:
"Unfortunately this is not something we can assist with trough the standard Customer Support offering. All support for the REST API and widgets is handled through the developer site at https://developer.opentext.com. "
What are we doing wrong? Any tips?
Thanks