cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shailesh namjoshi (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-2457) will easyXDM work in Apache Cordova iOS for getting data from cross domain server.
Date Mon, 18 Feb 2013 11:55:12 GMT

     [ https://issues.apache.org/jira/browse/CB-2457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

shailesh namjoshi updated CB-2457:
----------------------------------

    Description: 


Hi All,

I have a javascript code which downloads a data from the third party server. I have used easyXDM
to load the data.

My Html page has a following java script code to pull the data from server ( Cross Domain
Server ).

This approach works fine when i run the html page in normal browser. When i run the same html
page through iPhone UIWebView then it fails to load the data as request are not going through
at all.

I am using Apache Cordova iOS library for my test app.

// My Sample Javascript code for making easyXDM Call
WebService.requestHandler = function(requestProp){
WebService.callback = requestProp.callBack;
// loading.....

var socket = new easyXDM.Socket({ 
    remote: "cross domain URL ",
    onMessage: function(response, origin) {
        try{
            var responseData = {};
            if(response.indexOf("jsoncallback(") !== -1) {
                response = response.replace("jsoncallback("," ");
                response = response.substring(0, response.length-1);
            }
            responseData = $.parseJSON(response);
                    }
                    break;
                }
            }
            // stop loading indicator...
            WebService.callback(responseData);
        }catch(e){}
        socket.destroy();
    }
});

};

When i run the app i am not able to see the request which is going through my app.

Is there any restriction for web view in iPhone to load easyXDM data in Apache Cordova.?

Cheers,
Shailesh


  was:
Hi All 
I have a easyXDM javascript library for making a cross domain requests to get the data from
the server.

Apparently in Cordova iOS App, the request are not at all going through.

Is there any limitation on cross domain data pulling in Apache Cordova.

    
> will easyXDM work in Apache Cordova iOS for getting data from cross domain server.
> ----------------------------------------------------------------------------------
>
>                 Key: CB-2457
>                 URL: https://issues.apache.org/jira/browse/CB-2457
>             Project: Apache Cordova
>          Issue Type: Bug
>    Affects Versions: 2.4.0
>            Reporter: shailesh namjoshi
>              Labels: CordovaWebView
>
> Hi All,
> I have a javascript code which downloads a data from the third party server. I have used
easyXDM to load the data.
> My Html page has a following java script code to pull the data from server ( Cross Domain
Server ).
> This approach works fine when i run the html page in normal browser. When i run the same
html page through iPhone UIWebView then it fails to load the data as request are not going
through at all.
> I am using Apache Cordova iOS library for my test app.
> // My Sample Javascript code for making easyXDM Call
> WebService.requestHandler = function(requestProp){
> WebService.callback = requestProp.callBack;
> // loading.....
> var socket = new easyXDM.Socket({ 
>     remote: "cross domain URL ",
>     onMessage: function(response, origin) {
>         try{
>             var responseData = {};
>             if(response.indexOf("jsoncallback(") !== -1) {
>                 response = response.replace("jsoncallback("," ");
>                 response = response.substring(0, response.length-1);
>             }
>             responseData = $.parseJSON(response);
>                     }
>                     break;
>                 }
>             }
>             // stop loading indicator...
>             WebService.callback(responseData);
>         }catch(e){}
>         socket.destroy();
>     }
> });
> };
> When i run the app i am not able to see the request which is going through my app.
> Is there any restriction for web view in iPhone to load easyXDM data in Apache Cordova.?
> Cheers,
> Shailesh

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message