Smartphone and Web Service

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi All
I am developing an application for the smartPhone using .NET compact Framework
The purpose of the application is it will communicate with a Web Service and show some data
As I am a newcomer in .NET compact Framework , I have started with a very simple WebService , it has just one routine which adds 2 numbers, I am calling this WebService::routine from the smartphone App, When I am hosting the web Service in Development PC(where I am developing the SmartPhone App) it is working fine but as soon as I am hosting the web Service in another PC,and the smartphone APP tries to communicate with the Remote PC hosted web Service,it is throwing an exception ("Web Exception")

This is how I am creating an instance of WebService and calling the routine
bbgSmtWbService = new WebReference.Service1()
z = bbgSmtWbService.WebAdd(x,y);

But surprisingly it is working fine with locally hosted Webservice
2 points to mention here...
1. I have correctly configured the netowork connection in the emulator, coz I am able to access any internet web site and any LocalNetwork PC hosted web App, and also I am able to browse the Remote PC Web Service (.asmx file) from the emulator browser

2.I have written a test windows App(to test whether there is any issue in the web service) and I am accessing the Remote PC hosted Web Service successfully

Does anybody have any idea what could be the reason

Thanks in advance
Gautam
 
Is the Web service hardwired to connect to the development machine? If so
then you need to point the Web service URL to the appropriate server.

Neo said:
Hi All,
I am developing an application for the smartPhone using .NET compact Framework.
The purpose of the application is it will communicate with a Web Service and show some data.
As I am a newcomer in .NET compact Framework , I have started with a very
simple WebService , it has just one routine which adds 2 numbers, I am
calling this WebService::routine from the smartphone App, When I am hosting
the web Service in Development PC(where I am developing the SmartPhone App)
it is working fine but as soon as I am hosting the web Service in another
PC,and the smartphone APP tries to communicate with the Remote PC hosted web
Service,it is throwing an exception ("Web Exception").
This is how I am creating an instance of WebService and calling the routine.
bbgSmtWbService = new WebReference.Service1();
z = bbgSmtWbService.WebAdd(x,y);

But surprisingly it is working fine with locally hosted Webservice.
2 points to mention here....
1. I have correctly configured the netowork connection in the emulator,
coz I am able to access any internet web site and any LocalNetwork PC hosted
web App, and also I am able to browse the Remote PC Web Service (.asmx file)
from the emulator browser.
2.I have written a test windows App(to test whether there is any issue in
the web service) and I am accessing the Remote PC hosted Web Service
successfully.
 
Back
Top