开发者

Ksoap2 - sending a body with no nested tags

开发者 https://www.devze.com 2023-03-08 23:46 出处:网络
I need to send a soap-request that looks like this: <v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\">

I need to send a soap-request that looks like this:

<v:Envelope xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:v="http://schemas.xmlsoap.org/soap/envelope/">
  <v:Header/>
  <v:Body>  
  </v:Body>
</v:Envelope>

Right now there there are nested tags withing "body" that look like this:

<v:Body> 
 <d:string></d:string>  
</v:Body>

How can I remove them?

I am using following code to create and send the request:

SoapObject Request = new SoapObject(NAMESPACE, "");
SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
soapEnvelope.setOutputSoapObject(R开发者_Python百科equest);

HttpTransportSECustom aht = new HttpTransportSECustom(HOST_NoSSL);

soapEnvelope.setAddAdornments(false);
soapEnvelope.bodyOut = "";

aht.call(SOAP_ACTION_getStatus, soapEnvelope, headers);


I found an answer to my question here: http://supportforums.blackberry.com/t5/Java-Development/Output-parameters-with-ksoap2/td-p/398618/page/2

0

精彩评论

暂无评论...
验证码 换一张
取 消