How do I query LDAP in GWT? - gwt

I am fairly new to GWT and have built an application to manage working times. So far it was convenient to register/create the users in the datastore manually, which made testing a little easier. Now, to verify a login and automatically create the users, I want to retrieve the usernames and the passwords by querying an LDAP server.
My problem is that I was not able to find any examples, tutorials or forum entries that helped me completing this task. My so far only hope of success was an example using the javax.naming package which turned out not to be supported by GWT.
My question now is: is a database connection using LDAP supported by GWT at all? And if it is: how do I retrieve the data I need?
Thank you in advance!

You will need to construct a remote service that the GWT client talks to that communicates with your backends. There are several frameworks to choose from, depending on your needs. See the Communications DevGuide and the RequestFactory DevGuide for introductory material.
GWT client <-- XHR request --> Remote Service-+--> LDAP
|--> Other Database(s)

Related

How to integrate Oracle APEX and Alfresco via CMIS

A question regarding the integration of the document management system Alfresco into Oracle Application Express (APEX) based on CMIs-repository:
The aim is to use APEX as the portal-page and Alfresco showing it's results (document lists) based on search parameters coming form APEX.
A search result from a CMIS-query should be displayed in an APEX page-region.
Unfortunately I have no experience in this sector (REST, CMIS) - so any advice would be welcome!
A related question regarding user authentication and authorization via CMIS does also arise.
Has anyone out there implemented something like this or used these components together, yet?
The first thing that pops into my mind is making the choice where you want your communication with the repository to take place: client side or server side?
Alfresco supports Web Scripts, so I would be possible to create a javascript-heavy thick client which connects to your repository, get information about your files and redirect to their download links.
The alternative would be to design some way to connect to the repository from the database server. Again there are many ways to do this. You can connect to the repository during your page load and use PL/SQL regions to fire scripts that connect to your repository, get the data you want, and render your region with that information.
Another way would be to periodically check the repository for changes, and maintain a 'shadow copy' of the repository within your oracle database tables.
Of course all of these solutions have their own drawbacks.

Using Local storage and REST adapter at the same time?

I'm pretty new with an Ember so for the start I have a noob question - is it possible to use Local Storage and REST adapter at the same time?
For example, if I want to do a login via API, if login is success the server will return an API key which is used for later communication with a service. Is it possible to store that information locally on the client and to retrieve it when necessary but also, for other models, to use REST adapter?
If this is not a good way to handle such case, which one would you propose and is there any kind of example which would me lead me in the right direction?
Thanks to the people from #emberjs, I found out that there is a wonderful ember-auth authentication framework for the Ember.js which does what I need.

Openfire vs ejabberd for customer service chat evolving to full chat solution

I need to setup chat as a solution for customer service on a website. Openfire and some of it's plugins (fastpath and webchat) were very simple to setup locally and offer all of the customer service experience options I'd need, and will integrate properly into our CRM.
We have a clustered ejabberd instance running for something else. Before I looked into openfire, this was the obvious choice, since it's already been made secure and tailored to our environment. Having to duplicate all of the customer service functionality in an ejabberd module when it comes out of the box with openfire seems like a bad investment of resources.
Eventually, we would like to enable user to user chat as well, and perhaps turn it into a full scale messaging system.
Is it possible and/or recommended, using s2s or some other technique, to share the same database instance between the two different servers ? Does anyone else have any experience running both servers ? I'm sure there will be lots of gotchas if we go down this route, anything obvious ?
In my case, i was obliged to move to openfire for compatibility reasons.
I have a user list in a sql-server database and the external authentification is really hard and not supported for updated versions of ejabberd.
For me openfire is more open to different database and easy to integrate in existing plateforms

Implement a web service or use scripts for iPhone App interaction?

I'm in the middle of working on my first native application with networking and I have a question regarding the best way for interacting with remote storage. In a perfect world I'd like to do the following.
Prompt the user for login information from the iPhone.
Verify the users credentials and connect to a MYSQL database hosted by myself.
Parse MYSQL data into a table view.
Allow the user to add or update information in the database.
I've read some similar questions posted, maybe something's lost in translation, but the two most common means I've come across are.
Create a web service for handling these requests using SOAP/REST/JSON (no experience doing this, but would like to learn if it's a better implementation)
Write PHP scripts (enough experience to get by) that will grab data username/password/requests securely from my NSURLRequest and echo the NSData as XML and parse it with an NSXMLParser.
Are there other options? Is one a better implementation over the other? (web services come up more in searches)
Thank you in advance for taking the time to read my question and possibly clearing up any confusion.
Whoa! Web Services! Oh wait, calling a PHP script that returns JSON is actually also a web service. Well, that makes things simpler :-)
Yeah, so I would go for this:
Write a PHP script that returns JSON data (many tutorials available)
Protect the PHP script by setting up 'Basic access authentication' (Apache documentation)
Tell Apache to take the user database from your mysql database
Run your service on secure (HTTPS) web server (important because basic auth is not secure)
This way you can use almost all standard components on the iPhone side. NSURLConnection will talk HTTP(S) and there are excellent open source JSON parsers for Objective-C.

How to connect to a Remote Database from native Iphone app

I want to connect to a remote database(MySQL or SQL Server or Oracle) via internet from my native iphone app. I can't find any API or Framework in System to add. does any one know how to connect to a remote Database? pleased help me. Thank you very much
I'm not an iPhone programmer, but I would suspect you want some abstraction going on.
Instead of trying to make a native database connection work, consider writing some service layer that talks to the database on the back-end, and speaks HTTP to your client application.
Plenty of very good reasons for this. Security concerns chief among them.
One way to do it would be to setup an HTTPS server that wraps your requests. Submit your queries via HTTPS POST. The server setup would be pretty basic and it gives you the chance to do any post-processing before sending it over the wire.
The best alternative is to use webservices to access the information stored remotely.
Bye.
Disclaimer : Shamelessly plugging my own product :)
We've built an online system called Kumulos that allows iOS and OSX developers to build and host online databases in the cloud, while easily creating custom API methods for accessing it. It even builds all the Objective-C bindings for you.
Its really really easy to use and its free while in Beta. We'd love some honest developer feedback :)
Check it out here