Andro2015 / ksoap2-android

Automatically exported from code.google.com/p/ksoap2-android
0 stars 0 forks source link

envelope.implicitTypes = false; being ignored #66

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Trying to remove the "n0=" from the "xmlns:n0=" within the soap envelope. From 
what I understand, the implicitTypes=false should accomplish this, but it seems 
to be ignored.

CODE:
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME_SEND);
SoapSerializationEnvelope envelope = new 
SoapSerializationEnvelope(SoapEnvelope.VER10);

// build our data elements
SoapObject instructions = new SoapObject(NAMESPACE, "instructions");
instructions.addProperty("messageId", message.getId());
instructions.addProperty("recipients", recipient.getId());
instructions.addProperty("shortText", shortText);
instructions.addProperty("longText", detailText);
request.addSoapObject(instructions);

// set the envelope and make the request
envelope.encodingStyle = SoapEnvelope.ENC;
envelope.dotNet = false;
envelope.setAddAdornments(false);
envelope.implicitTypes = false;
envelope.setOutputSoapObject(request);
HttpTransportSE httpTransport = new HttpTransportSE(soapUrl, 
CONNECTION_TIMEOUT);
httpTransport.debug = true;
httpTransport.call(SOAP_ACTION, envelope, headerPropertyList);

Traffic capture:
<v:Envelope xmlns:i="http://www.w3.org/1999/XMLSchema-instance" 
xmlns:d="http://www.w3.org/1999/XMLSchema" 
xmlns:c="http://schemas.xmlsoap.org/soap/encoding/" 
xmlns:v="http://schemas.xmlsoap.org/soap/envelope/"><v:Header 
/><v:Body><n0:sendMessage 
xmlns:n0="http://informacast.singlewire.com/MessageService/v2"><n0:instructions>
<messageId i:type="d:string">191</messageId><recipients 
i:type="d:string">924</recipients><shortText 
i:type="d:string"></shortText><longText 
i:type="d:string"></longText></n0:instructions></n0:sendMessage></v:Body></v:Env
elope>

Original issue reported on code.google.com by jam.mon...@gmail.com on 6 Jul 2011 at 3:08