I am developing BlackBerry application that connects to the web service.
When I developed on simulator, I used BlackBerry MDS for simulator and everything just went fine. My application (running on simulator) can connect with my web service perfectly. Please note that the simulator and the web service are on different PCs.
Now, my project is done. I tried deploying my app to the real device (BB 8520). When I used the app on the device, I found it can't connect to the web service. I did a research on the Internet and I am sure it must be due to MDS issue. It seems like I have to do something with MDS on the computer where my web service resides, but I still can't find the obvious answer.
Anyone please help me...
PS. My web service is published on IIS and is developed in Visual Studio 2010. The BlackBerry application is developed in Eclipse and connects to web service via ksoap2. Firewall on the computer where web service resides is closed. The connection used is WIFI.
Thank you all. I managed to solve this problem by adding ;interface=wifi;deviceside=false to the URL. :D
if your device using wifi concat
";interface=wifi"
Sring to URL.I have the same problem and i solved this with using Networkutils to get the connection string and append this connection string with BaseUrl and my problem get solved .I think this will Solve your problem too. And the NetworkUtils class is as follows...
You have to add all connection parameter into your URL using
HTTPConnetion
. Create one Custom class to check connetion parameter .. USE the belowCustom Class
.After integrating above class u have to make one package with name
impl.javame.com.twitterapime.io
and add below class.`package impl.javame.com.twitterapime.io; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import javax.microedition.io.Connector; import com.twitterapime.io.HttpConnection;
public class HttpConnectionImpl implements HttpConnection { private javax.microedition.io.HttpConnection httpConn;
}`
Now you have to integrate another two class
com.twitterapime.io
package.`package com.twitterapime.io; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; public interface HttpConnection { public static final String GET = "GET";
`package com.twitterapime.io;
import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException;
public final class HttpResponse { private int code;
}`
Use the below mathod to check your connetion parameter. This method automatically check your device connetion availability and add connetion parameter based on your connection.
The above
HttpConnection
method return URL with connetion parameter .. than u can use this connetion in youtInputStream
and open any url as well as webservice.i hope this will help you...