2
如何使用ksoap向肥皂添加前缀标记? 我想补充领域:xmlns:CNX = “http://db.hutt.com”向soap请求添加xml前缀
<v:Envelope xmlns:cnx="http://db.hutt.com" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
<v:Header>
<authentication xmlns:n0="http://db.hutt.com">
<userName>tutt</userName>
<password>[email protected]</password>
</authentication>
</v:Header>
<v:Body>
<cnx:get_tt xmlns="">
<ttid>1</ttid>
</cnx:get_tt>
</v:Body>
</v:Envelope>
编辑完您的请求后,它似乎是等同的。你想改变什么? – KarelHusa
ttid元素可能不属于名称空间http://sdm.hott.com。您可以使用以下方法添加ttid元素:public SoapObject addProperty(String namespace,String name,Object value)并将该名称空间设置为空字符串。 – KarelHusa
@KarelHusa我编辑了这个问题。我可以看到标题不应该有一些标签,而身体请求应该有标签。 – kinkajou