我可以在Android模拟器上使用非托管的Web服务吗?如果是的话怎么样? [英] can I consume un hosted web service on android emulator? if yes then how?
本文介绍了我可以在Android模拟器上使用非托管的Web服务吗?如果是的话怎么样?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在visual studio上创建了一个简单的web服务,它添加了两个数字,现在我想在我的android模拟器上使用它(使用android studio)所以我可以这样做,还是我需要先托管服务。如果有可能请告诉我如何...一步一步的教程会有所帮助。
I have created a simple webservice on visual studio that adds two numbers and now I want to consume it on my android emulator (using android studio) so can I do that or do I need to host the service first.? If it is possible plz tell me how... step by step tutorial would be helpful.
推荐答案
要在任何Web服务中调用方法(使用),您必须满足两个前提条件:
1.必须有一个Web服务器,您的Web服务在其中定义为站点
2.您必须具有该Web服务的网络连接
因此,如果您想在任何Android设备上使用网络服务,您肯定必须使用可公开访问的网络服务,但是如果它是用于测试目的,则将您的Android设备链接到同一设备就足够了网络作为网络服务......
To call methods (consume) in ANY web service you have to fulfill two preconditions:
1. Must have a web server that your web services defined inside it as a site
2. You must have a network connection to that web service
So if you want to use the web service form any Android device, you definitely must host in on a publicly accessible web service, however if it is for test purposes it is enough to link your Android device to the same network as the web service...
这篇关于我可以在Android模拟器上使用非托管的Web服务吗?如果是的话怎么样?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文