Android的 - 创建RESTful Web服务 - 它的主机在移动 [英] Android - Create RESTful WebService - Host it on mobile

查看:276
本文介绍了Android的 - 创建RESTful Web服务 - 它的主机在移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是如何建立在Android设备与功放一个Web服务;承载它在移动。请不要错误理解,我不想访问部署在服务器上已创建的web服务,我想创建一个web服务,返回的JSON / XML和放大器;承载它在移动。我完全新的Andr​​oid开发,但我有编程经验。

My question is How to create a Web-service on android device & host it on the mobile. Please don't mis-understood it, I don't want to access the already created webservice deployed on the server, I want to create a webservice that returns json/xml & host it on mobile. I'm totally new to android development but I have programming experience.

请检查此链接:<一href="http://stackoverflow.com/questions/5452670/restful-web-services-implementations-in-mobile-devices">RESTful在移动设备的Web服务实现

它说,它是可行的基于Java的手机,所以我认为它可以为Android也要做。

It says its doable for java based mobile so I think it can be done for android too.

感谢。

推荐答案

有一个问题,你的设置和移动设备:移动网络(WiFi和3G)大多使用的 NAT ,其中prevents入站连接。这使得从互联网(入站)无法访问移动设备,而他们仍然可以启动出站连接。为此,移动设备几乎不主机服务器。

There is one problem with your setup and mobile devices: mobile networks (wifi and 3g) mostly use NAT, which prevents inbound connections. This makes mobile devices inaccessible from the internet (inbound) while they can still initiate outbound connections. For this reason mobile devices mostly do not host servers.

这篇关于Android的 - 创建RESTful Web服务 - 它的主机在移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆