I use the example LDAP Login with LDAP Server to connect my app with LDAP. I can connect the app example with the server. ALso I can modify the app and connect.
The problem is when I put the example in a Cordova Project for iOS when I put mfp as plugin.
I can see the app in _MobileBrowserSimulator and can connect to server but when I execute mfp cordoba emulate the app don't connect with server.
--- UPDATE ---
I use the same example that LDAP but this runs in mobile simulator but dont work in device. This is a simple example that run in simulator but not in device.
main.js
function getSecretData(){
var request = new WLResourceRequest("/Random/getInteger",
WLResourceRequest.GET);
request.send().then(onSuccess, onFailure);
}
function onSuccess(r) {
document.getElementById('guille').innerHTML = r;
}
function onFailure(r) {
document.getElementById('guille').innerHTML = r;
}
index.js
function wlCommonInit(){
WL.App.setServerUrl("http://127.0.0.1:10080/MyMFPProject",success, fail);
WL.Client.connect();
}
function success(r){
document.getElementById('guille').innerHTML = r;
}
function fail(r){
document.getElementById('guille').innerHTML = "error: " +r;
}
function onSuccess(r) {
document.getElementById('guille').innerHTML = JSON.stringify(r);
}
function onFailure(r) {
document.getElementById('guille').innerHTML = JSON.stringify(r);
}