java - Integrating Post Web Services in Blackberry app -


i new blackberry app development , facing big problem in integrating web services in blackberry app. have use post web services in application , don't find single tutorial explains how integrate web services in blackberry. please 1 in regard. executed example give @ link. internet avaialble when try open link browser not connecting web services through app.

try -

try {         httpurl="http://google.co.in/";          if ((wlaninfo.getwlanstate() == wlaninfo.wlan_state_connected)                 && radioinfo                         .arewafssupported(radioinfo.waf_wlan)) {             httpurl += ";interface=wifi";         }else  if (transportinfo.istransporttypeavailable(transportinfo.transport_bis_b) && transportinfo.hassufficientcoverage(transportinfo.transport_bis_b)) {             system.out.println("bis connection-------------------");             // holder.connectioninterface=";deviceside=false;connectiontype=mds-public";             httpurl += ";deviceside=false;connectiontype=mds-public";         }          //dialog.alert(httpurl);         httpconnection httpconn;         httpconn = (httpconnection) connector.open(httpurl);         httpconn.setrequestmethod(httpconnection.post);         dataoutputstream _outstream = new dataoutputstream(httpconn.opendataoutputstream());         byte[] request_body = httpurl.getbytes();         (int = 0; < request_body.length; i++) {             _outstream.writebyte(request_body[i]);         }         datainputstream _inputstream = new datainputstream(         httpconn.openinputstream());         stringbuffer _responsemessage = new stringbuffer();         int ch;         while ((ch = _inputstream.read()) != -1) {             _responsemessage.append((char) ch);         }         string res = (_responsemessage.tostring());         responce = res.trim();          //dialog.alert(responce);          httpconn.close();       }catch (exception e) {         dialog.alert("error -"+e.tostring());     } 

Comments