[英]Android how I can parse and consume webservices?
How I can parse this type of webservices in android? 如何在android中解析此类Web服务? Kindly see the below images.
请看下面的图片。 I created this webservices in .net, now I want to parse and consume that Login webservice in Android.
我在.net中创建了该Web服务,现在我想在Android中解析和使用该Login Web服务。 Kindly anyone help it would be highly appreciated.
敬请任何人帮助,我们将不胜感激。 Thanks
谢谢
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>
It's "KSOAP webService", they have lot of tutorial. 这是“ KSOAP webService”,他们有很多教程。
http://karanbalkar.com/2014/03/tutorial-78-using-ksoap2-in-android/ http://karanbalkar.com/2014/03/tutorial-78-using-ksoap2-in-android/
Exemple for login webservice https://github.com/thira/blog-demos/tree/master/android-kSOAP2-example 登录Web服务的示例https://github.com/thira/blog-demos/tree/master/android-kSOAP2-example
http://programmerguru.com/android-tutorial/how-to-call-java-web-service-in-android/ http://programmerguru.com/android-tutorial/how-to-call-java-web-service-in-android/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.