2016-03-22 8 views
0

Ich baue eine Android-App, die einige Daten über eine SOAP-Schnittstelle erhalten muss. Ich versuche, das KSOAP2-Modul zu verwenden (mit ksoap2-android-2.6.0-jar-with-dependencies.jar). Ich habe Probleme mit KSOAP bekommenKSOAP Namespaces und XML-Ausgabe Formatierung der Anfrage Probleme

ich dies als Anfrage wollen:

<v: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/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"> 
<v:Header /><v:Body> 
<j:validateRef1 xmlns:j="http://ws.service.tbank.co.th/" id="o0" c:root="1"> 
<arg0 i:type="d:string">1234567890</arg0> 
</j:validateRef1> 
</v:Body></v:Envelope> 

aber ksoap2 gibt mir dies:

<v: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/" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"> 
<v:Header /> 
<v:Body> 
<validateRef1 xmlns="http://ws.service.tbank.co.th/" id="o0" c:root="1"> 
<arg0 i:type="d:string">1234567890</arg0> 
</validateRef1> 
</v:Body> 
</v:Envelope> 

Der einzige Unterschied ist, dass das validateRef1 Element nicht über Das Präfix n0 auf dem Tag-Label mit "j" und auch der Namensraum enthält keinen Tag-Namen "j".

Kann jemand mir helfen, das Ergebnis als erstes zu bekommen.

Antwort

0

Ich finde die Lösung. Sie müssen

envelope.dotNet = false;