我想用一個空的身體像這樣送一個信封:Android ksoap2發送信封與空身?
<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>
</v:Body>
</v:Envelope>
是否可能,如何?我試過這個:
HttpsTransportSE transport = new HttpsTransportSE(HOST, PORT, ENDPOINT, TIMEOUT);
SoapObject request = new SoapObject(null, null);
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
transport.call(SOAP_ACTION, envelope);
我似乎無法弄清楚如何做到這一點,任何人都可以請幫忙嗎?
這是否適用於KSOAP 3.2?我試過使用它,但仍然在body標籤內發送空標籤。 Like: \t < /> –