Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
Posts: 69
Registered: ‎06-10-2009
My Device: Not Specified

net.rim.device.cldc.io.waphttp.WAPIOException

Hi, I'm getting a WAPIOException exception when trying to open up a connection with ksoap2. Any ideas will be appreciated. Here's the relevant code:

 

 

Object result = null; SoapObject request; HttpTransport ht; SoapSerializationEnvelope envelope; request = new SoapObject("urn:namespace", "getUser"); request.addProperty("user", user); request.addProperty("password", password); envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.setOutputSoapObject(request); ht = new HttpTransport("http://myurl.com.ar/axis/test.jws;deviceside=true;WapGatewayIP=201.54.66.12;WapGatewayPort=9201;WapG..."); try{ ht.call("", envelope); result = ((Object)envelope.getResponse()); } catch(Exception e){ return "error"; } return result.toString();

 

 

 

New Developer
Posts: 69
Registered: ‎06-10-2009
My Device: Not Specified

Re: net.rim.device.cldc.io.waphttp.WAPIOException

I removed the wap gateway references, now I have

 

 

ht = new HttpTransport("http://myurl.com.ar/axis/test.jws;deviceside=true;TunnelAuthUsername=wap;TunnelAuthPassword=wap");

 

 Wich works fine on the simulator, but on a real phone I'm getting a "Open tunnel - failure" error. Any ideas?

 

New Developer
Posts: 69
Registered: ‎06-10-2009
My Device: Not Specified

Re: net.rim.device.cldc.io.waphttp.WAPIOException

The original code was failing on the simulator, but it actually works on a real device.