Error Message: Unable to connect to the remote server

I

Idelso Quintero

Hi everyone:
I just finished writting a CF app, which consumes synchronously a web
service. The web service application is hosted in a separate machine,
part of our LAN.
When I add the web reference to my CF project in Visual Studio, I can
find the WS app and generate the disco, wsdl, map and proxy class, all
with the correct path information. But when I run the CF app, I get an
error message saying that the system is unable to connect to the
remote server.
Does anyone have any idea? Is this a CF bug, that does not allow CF
apps to connect to WS?

FinancialService.AnnuityService Engine = new
FinancialService.AnnuityService();
outputXML = Engine.RunService(inputXML);


Thanks a lot

Idelso Quintero
 
D

Derek Anderson

Try looking at the Reference.Map file in your CF project under your Web
Reference to that service. Look at the URL attribute and make sure it is
pointed to the correct place of your web service. Also, if it is pointed to
a named server or localhost, try replacing all occurances of the server name
in that project with the actually IP of the server where your WS resides. In
my case, I was getting this error because my URL had http://localhost in it.
The device does not know what localhost is so it needed the IP. This code is
auto-generated by .NET when you add the web reference. Like several of the
auto-generation features in VS, it actually generates a bug for you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top