【发布时间】:2015-01-24 21:01:03
【问题描述】:
如何在 android 中解析这种类型的 web 服务?请看下面的图片。我在 .net 中创建了这个 Web 服务,现在我想在 Android 中解析和使用该登录 Web 服务。请任何人帮助它,将不胜感激。谢谢
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /Service.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://tempuri.org/Login"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Login xmlns="http://tempuri.org/">
<username>string</username>
<password>string</password>
<apptypecode>string</apptypecode>
</Login>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<LoginResponse xmlns="http://tempuri.org/">
<LoginResult>string</LoginResult>
</LoginResponse>
</soap:Body>
</soap:Envelope>
【问题讨论】:
-
请删除图片。只需发布几个带有文本的代码块。使用 cpy/paste。
-
@greenapps 好的,等一下 :)
-
@greenapps 我更新了我的问题..
标签: android web-services soap xml-parsing android-ksoap2