javascript - How can i call Java web service method in blackberry web works/HTML5 app? -


i developing blackberry web works/html5 application blackberry os 7 environment , testing ripple emulator. have developed java web service retrieves data database , returns calling client.

how can invoke web service in html5 code? , how can check whether web service call successful or not in ripple emulator?

theres pretty example on blackberry forums here: blackberry forum

you need create new xmlhttprequest, oopen it, , send request. create callback function handle result. example below:

var xmlhttp = new xmlhttprequest(); function callwebservice(){     xmlhttp.open('get', 'http://yourwebserviceurlhere', true);     xmlhttp.onreadystatechange = callbackfunction;     xmlhttp.send(); }  function callbackfunction(){     if (xmlhttp.readystate != 4)      return;  var result = xmlhttp.responsetext; alert(result);   } 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -