如何在Android中使用如下的Soap Web服务?

时间:2014-11-21 10:26:12

标签: android web-services soap ksoap2 soap-client

我是Android的初学者。我如何在Android中使用以下Web服务?

  POST /Service.asmx HTTP/1.1
  Host: localhost
  Content-Type: text/xml; charset=utf-8
  Content-Length: length
  SOAPAction: "http://tempuri.org/RegisterUser"

    <?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>
 <RegisterUser xmlns="http://tempuri.org/">
  <userid>string</userid>
  <password>string</password>
  <cnic>string</cnic>
  <email>string</email>
 </RegisterUser>
</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>
 <RegisterUserResponse xmlns="http://tempuri.org/">
    <RegisterUserResult>string</RegisterUserResult>
 </RegisterUserResponse>
 </soap:Body>
 </soap:Envelope>

0 个答案:

没有答案