11-20-2009 06:26 AM
hi
i am using web server to authenticate my login details, my application is running fine in simulator but not accessing the website , when deployed on device,
I just want to know , is this possible that if your not not connected with you BES and just using the Wireless lan to access the web , then blackberry stops you access web sites from your application.
Because, i can open the same same web server site from my device but it is not opening when i access it from my application.
It doesn't sound logical but better to consult with experts.
11-20-2009 06:53 AM
What are the arguments you pass into Connector.open() in your app? I suspect you aren't appending ";interface=wifi" to the URL...
11-20-2009 06:54 AM - last edited on 11-20-2009 06:55 AM
Which connection mechanism you are using to connect to the web from your application?
Is it throwing any exception? can you write back the exception?
11-20-2009 07:06 AM
As suggested by klyubin, one option is to put ";interface=wifi" on your connection String and force the use of WiFi.
A word of caution, based on my understanding of how this works though.
In a BES Environment, it will automatically use WiFi if it can, in other words, if it can find your BES via WiFi it will route the requests that way. However to do this, it must first authenticate via wireless (non WiFi) and prove to its own satisfaction that it can get to your BES via WiFi. If it has done this authentication, you can drop the wireless connection and it will continue to work via WiFi. If you restart the device and only have WiFi, then the device will not authenticate and you can't get on with a BES/MDS connection.
However, if you have (previously) connected using BES/MDS, then your application is 'inside the firewall'. I believe, but have not tested, that if you then connect via ";interface=wifi", you are now outside the firewall, and your application will have split-pipe problem.
11-23-2009 01:30 AM - last edited on 11-23-2009 08:07 AM
Actually , this a .NET web service and a BB application using KSoap.
I found another link on this forum but didn't get any solution yet.
I have seen that network video and other KB article as well.
Can anyone tell me , which approach in followed in KSOAP, Which i am using to connect with web.
1) BES/MDS
2) BIS-B
3) Direct TCP
4) WAP 2
5) WAP-1
So that i can change the setting of my device , by the way i am using 8320.
I think, it is BES/MDS because, it is working fine in simulator where we need to rum MDS simulator first , correct me if i am wrong?
11-23-2009 08:52 AM
kSoap using the same 'connection suffix' processing as an other http or socket connection uses when deciding how to route the transmission. By default on the Simulator this is BES/MDS. The default on a real device depends on how the device is configured. This is not chosen by kSoap, it is chosen you when you set the connection suffix. If you have set nothing, it will use the default, the default will depend, as noted, on the type of device, how it is provisioned, and on the carrier. So we can't tell you what will happen to your device.
I suggest you review the following Thread, for more information:
8320 does have the capability to run WiFi, so you could check WiFi is working and then add "interface=wifi" if it is. But that will only work on WiFi enabled devices.
11-24-2009 12:27 AM - last edited on 11-24-2009 12:56 AM
Thanks Pete_Strange,
I put this "interface=wifi" in HttpTransport but i have no idea where should i put this in my ksoap code.
HttpTransport ht = new HttpTransport(serviceUrl+"interface=wifi");
other objects in ksoap code are;
SoapObject rpc = new SoapObject(serviceNamespace, methodName);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
any idea, i didn't find any connector object in ksoap.
As you said :
"8320 does have the capability to run WiFi, so you could check WiFi is working and then add "interface=wifi" if it is. But that will only work on WiFi enabled devices".
Wifi is working fine on my device and i can open the website which i am accessing from my application but my application is not able to get that.
11-24-2009 04:27 AM
kSoap is not my area, but where you have put this does seem correct. However you have missed a very important semi-colon, the connection suffix is ";interface=wifi". The semi-colon seems to be used by connection code on the device to separate the connection string and its parameters from the actual URL.
So give ";interface=wifi" a go.
11-24-2009 06:38 AM
After doing that ";interface=wifi" , i am not able to call the webservice and i am getting the following exception.
general error in syncData(): java.io.IOException: Tunnel failed
11-24-2009 06:56 AM
What device, OS Level and Carrier are you using?