从Web服务SOAP 1.1获取数据

时间:2013-10-25 17:55:07

标签: java android xml web-services soap

鉴于以下网址http://abc.server.com的网络服务,如何从Android中的网络服务获取数据


ListAlbums

SOAP 1.1 以下是SOAP 1.1请求和响应示例。显示的占位符需要更换 与实际值。

POST /webservices/RemoteDevice.asmx HTTP/1.1
Host: marketing-genius.finantech.biz
Content-Type: text/xml; charset=utf-8
Content-Length: **length**
SOAPAction: "http://abc.server.com/ListAlbums"

<?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>
        <ListAlbums xmlns="http://abc.server.com/">
            <AppID>**string**</AppID>
        </ListAlbums>
    </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>
        <ListAlbumsResponse xmlns="http://abc.server.com/">
             <ListAlbumsResult>**string**</ListAlbumsResult>
        </ListAlbumsResponse>
    </soap:Body>
</soap:Envelope>

0 个答案:

没有答案