如何发布值的android到web服务 [英] How to post values to webservice in android

查看:75
本文介绍了如何发布值的android到web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想获得张贴值到web服务的一些端倪......

I want to get some clues about posting the values to the webservice...

当我张贴的价值观,我得到的已经被解析的XML响应。张贴值web服务的任何教程将有很大的帮助......

When i post the values, i get the response in xml that has to be parsed. Any tutorials of posting the values to webservice will be of great help...

推荐答案

下面是一个REST服务交互的实用教程:的http://luken$c$c.com/2010/04/27/calling-web-services-in-android-using-httpclient/.如果该服务是一个SOAP服务,然后看看堆栈溢出问题如何调用Web服务与Android

Here is a useful tutorial on interacting with a REST service: http://lukencode.com/2010/04/27/calling-web-services-in-android-using-httpclient/. If the service is a SOAP service, then take a look at the Stack Overflow question How to call web service with Android.

至于XML解析,我写了一个Android应用程序,对此我也需要解析XML。对于我的目的,我发现 XmlPullParser API是最方便的:的如何使用XmlPullParser在Android的

As far as XML parsing, I wrote an Android app for which I also needed to parse XML. For my purpose I found that the XmlPullParser API was the most convenient: How to use XmlPullParser in Android

有一点需要注意的是,在Android 3.x和早期实施 XmlPullParser (来自Apache Harmony项目)不支持的 获取preFIX() 或<一href="http://developer.android.com/reference/org/xmlpull/v1/XmlPullParser.html#getAttribute$p$pfix%28int%29"相对=nofollow> 的getAttribute preFIX(INT指数) 。与Android 4.0开始, XmlPullParser 执行切换到 kXML2 。我不知道kXML2是否支持获取preFIX()的getAttribute preFIX(INT)的方法。

One thing to note is that the Android 3.x and earlier implementation of XmlPullParser (from the Apache Harmony project) does not support getPrefix() or getAttributePrefix(int index). Beginning with Android 4.0, the XmlPullParser implementation switched to kXML2. I am not sure whether kXML2 supports the getPrefix() and getAttributePrefix(int) methods.

这篇关于如何发布值的android到web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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