TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
alex vanalex
NA
7
0
pda connection with web service
Dec 19 2007 5:35 AM
Hello everybody!
I have been developing for a while a pda application in visual studio 2005 using a web service. The error i'm facing is that when i try to invoke the service i'm getting a message that says "Network connection cannot be established" (i guess with the web service). That sound weird to me because the server and the connection is virtual so ...what could go wrong?? Do i have to do anything else except for adding the service to my project just as a web reference? The code i'm using is :
try
{
// this is the service that is a web reference in my project
PDAApp.MyService.Service serve =new PDAApp.MyService.Service();
// i invoke the getTitle(int id) method from the service. This is the //spot that i get the WebException "Connection cannot be established"
String title = serve.getTitle(int.Parse(textBox1.Text));
textBox2.Text = title;
MessageBox.Show("Service completed");
}
//Exceptions
catch (WebException ex)
{
if (ex.Status == WebExceptionStatus.ProtocolError)
{
Console.WriteLine("Status Code : {0}", ((HttpWebResponse)ex.Response).StatusCode);
Console.WriteLine("Status Description : {0}", ((HttpWebResponse)ex.Response).StatusDescription);
}
//this is the line that is activated when the exception rises
MessageBox.Show(ex.Message);
}
catch (FileNotFoundException exc)
{
MessageBox.Show(exc.Message);
}
catch (System.Net.Sockets.SocketException se)
{
MessageBox.Show(se.Message);
}
catch (System.Web.Services.Protocols.SoapException soape)
{
MessageBox.Show(soape.Message);
}
Any help would be appreciated...Thank you in advance for reading my post..
vanalex
Reply
Answers (
0
)
problem with references in visual studio
access the on-screen keyboard from windows accessebility tools from within VB.NET