在Ksoap2(Android)中定制soap主体
我现在正试图通过KSOAP2.5调用web服务。我的问题是,是否有定制soap xml主体的方法 现在ksoap生成以下代码段:在Ksoap2(Android)中定制soap主体,android,soap,ksoap2,Android,Soap,Ksoap2,我现在正试图通过KSOAP2.5调用web服务。我的问题是,是否有定制soap xml主体的方法 现在ksoap生成以下代码段: <v:Envelope xmlns:v="http://schemas.xmlsoap.org/soap/envelope/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d="http://www.w3.org/2001/XMLSchema" xmlns:c="http://schemas
<v:Envelope xmlns:v="http://schemas.xmlsoap.org/soap/envelope/" 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/">
<v:Header/>
<v:Body>
<n0:TVerifyCode xmlns:n0="urn:AccessDBIntf-IAccessDB" id="o0" c:root="1">
<UserId i:type="d:string">bfy</UserId>
<PassWord i:type="d:string">351F42CE0189FAD45AF2EA252A1F149A</PassWord>
</n0:TVerifyCode>
</v:Body>
</v:Envelope>
web服务服务器抱怨您提供的soap消息无效
如果按以下方式更改代码段,代码将正常工作:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body xmlns:NS1="urn:AccessDBIntf-IAccessDB" xmlns:NS2="urn:CommonObj" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<NS1:Login>
<VerifyCode href="#1"/>
</NS1:Login>
<NS2:TVerifyCode id="1" xsi:type="NS2:TVerifyCode">
<UserId xsi:type="xsd:string">bfy</UserId>
<PassWord xsi:type="xsd:string">F0639A434D0A852488F45A3071E009A6</PassWord>
</NS2:TVerifyCode>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
有没有定制信封正文的想法?提前谢谢 您可以通过创建自己的soap请求来实现这一点
请参考上面的库,这个家伙创建了没有任何soap库的soap请求。这很简单。谢谢,但这不是我想要的结果