Question

I'm currently developping an application on Worklight (HTML, JS and CSS) and i have to fetch data and files from a secure Lotus Domino Server.

  • I'm using an HTTP Adapter to log in the server and query it and it works fine. But now i'm trying to download files from the Domino Server through the adapter. I created an JAVA agent on the server which base64 encode the file's data. So i fetch the encoded data using the adapter and send it back to the application. Then the application decodes it and write the file using the Cordova File API. But some characters got altered during this process and the resulting file is different from the original one. Does anyone try this before and encounter this issue ? Or is there another way to download a file in a Worklight app, while avoiding the "cross-domain policy" issue ?
  • I'm considering configure the server to accept cross-domain requests from the app to the server directly. But in that case, the cookie from the authentification form would be store in the application itself. Does anyone knows if, once the application is deployed, the application is able to store and use cookies ?

Thank you in advance.

Was it helpful?

Solution

I finally deployed my application on iOS devices. And it seems that the application's webviewer is able to store cookies and launch cross-domain requests.So if you're in the same situation as me, you can consider developping your application using a direct dialog between your application and your server via cross-domain requests. With this, you can also download files without using an adapter and easily by using the Cordova API.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top