【发布时间】:2012-08-27 15:40:18
【问题描述】:
我为 android 客户端应用程序使用 asmx Web 服务。对于下面编写的示例 SOAP 1.1 请求,我需要 soap_action、method_name、命名空间和 url。如何为任何 Web 服务请求提供这些参数?我想了解这些参数的来源。 (例如:method_name="GetKullaniciBilgileri" 它来自body标签之后)
POST /WebSite1/WebService.asmx HTTP/1.1
Host: localhost
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://kodmerkezi.net/HelloThere"
<?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>
<HelloThere xmlns="http://kodmerkezi.net">
<name>string</name>
</HelloThere>
</soap:Body>
</soap:Envelope>
我以
身份运行这些服务http://localhost:56053/WebSite1/WebService.asmx?op=HelloThere
【问题讨论】:
-
@Peter 你是什么意思?我的英语不完美。
-
RESTful 服务类似于 SOAP(web-services too),但它们被简化为更简单的函数,如 POST、GET、REQUEST,以便它们可以在需要 http vogella.com/articles/REST/article.html 的服务中轻松实现跨度>
-
@Peter 谢谢你的建议,但我必须使用肥皂网络服务。
标签: android web-services ksoap2