How to call a web service from Windows Phone 6.5?

I have the following problem: I try to call a web service from a Windows 6.5 phone when it is connected to active synchronization with my desktop computer in a debugging development environment.

So, I donโ€™t have a phone connected by phone, maybe this is a problem?

But when it is connected to my desktop PC via USB (Windows Mobile Device Center), can I browse the web and can I use metadata? wsdl on phone - for web service. The web service runs on my computer as a Windows service.

I use a simple web link to my local web service:

private void button2_Click(object sender, EventArgs e) { var method = new MobileCashier.TestReference.YvesTransfer(); method.Timeout = 30000; bool bResult, bResultSpec; method.TestConnection(out bResult,out bResultSpec); MessageBox.Show(bResult.ToString()); MessageBox.Show(bResultSpec.ToString()); method.Dispose(); } 

But when I run it over the phone in debug mode (or not debug), I get this error:

 "No connection could be made because the target machine actively refused it" 

If I run the exe windows application on my desktop computer (the same as I deploy on the phone), or from another desktop computer, then there is no problem.

Maybe I need wlan to accept calls?

Can someone help me?

+4
source share
1 answer

Yes, you need the WLAN to be activated in your cell to access the local web service, you must essentially be on the same network on your desktop computer.

I would prefer to use any other machine connected to the wlan to test my web service on another machine and be sure of this, maybe write a small testing application to check the web service.

you can also open the page of your wsdl web service on your phone and see if it opens well, now your code should be able to call your web service from the website located on your desktop.

+2
source

Source: https://habr.com/ru/post/1498631/


All Articles