我是Android新手。 我正在使用soap的webservice,我試圖匹配來自請求的數據,並希望得到迴應。我在android中實現了soap演示,但沒有通過標籤獲取數據。 我在這裏粘貼肥皂的方法。如何發送請求並從android中獲得響應soap
POST /InflAirBook.asmx HTTP/1.1
Host: airwebservice.ezeeibe.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "InFLAirBookService/InflAirGDSLCCAvail"
<?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>
<InflAirGDSLCCAvail xmlns="InFLAirBookService">
<AccountID>string</AccountID>
<AccountPassword>string</AccountPassword>
</InflAirGDSLCCAvail>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK Content-Type:text/xml;字符集= UTF-8 的Content-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>
<InflAirGDSLCCAvailResponse xmlns="InFLAirBookService">
<InflAirGDSLCCAvailResult>string</InflAirGDSLCCAvailResult>
</InflAirGDSLCCAvailResponse>
</soap:Body>
</soap:Envelope>
我的問題是如何解析它的Android?
請幫助我如何發送請求並從中獲得響應。
在此先感謝
感謝響應,但是你能告訴我我如何訪問這段代碼的soap body,請提供一些方法,其實我已經實現了soap demo,但沒有通過標籤獲取數據。 – Ash