zsw104 / ksoap2-android

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

how to remove request id="0" and c:root="1" attributes from SOAP #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
The request should be 
<?xml version="1.0" encoding="UTF-8"?><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>
<n0:statusInquiryRequest  
xmlns:n0="http://AVRSLibrary/com/tes/Service"><memberId 
i:type="d:string"></memberId><providerId 
i:type="d:string"></providerId></n0:statusInquiryRequest>
</v:Body>
</v:Envelope>
But creating as follows 
<?xml version="1.0" encoding="UTF-8"?><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>
<n0:statusInquiryRequest id="o0" c:root="1"  
xmlns:n0="http://AVRSLibrary/com/tes/Service"><memberId 
i:type="d:string"></memberId><providerId 
i:type="d:string"></providerId></n0:statusInquiryRequest>
</v:Body>
</v:Envelope>

How to remove id="0" and c:root="1" in the SOAP Request. Is there any way we 
can setup dont create these attributes

What version of the product are you using? On what operating system?
ksoap2-android-assembly-2.4-jar-with-dependencies and Window XP, android 
simulation 5554 with Android SDK API 8 with SDK Android plaform 2.2

Please provide any additional information below.

Original issue reported on code.google.com by balamura...@gmail.com on 17 Aug 2010 at 9:56

GoogleCodeExporter commented 9 years ago
I encounter the same problem!

Original comment by bob20...@gmail.com on 18 Oct 2010 at 3:39

GoogleCodeExporter commented 9 years ago
Can you try with the 2.5.1 release as well as clarify what the problem actually 
is. These tags should not present a problem for parsing.

Original comment by mosa...@gmail.com on 18 Oct 2010 at 4:30

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi, I get the following error when using AndroidHttpTransport in 2.4. The 
problem exists in 2.5.2 as well. What is the purpose of these tags and how can 
I remove them?

<env:Envelope 
xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><
env:Body><env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>
<faultcode>env:Server</faultcode>
<faultstring>Inbound schema validation fault: cvc-complex-type.3.2.2: Attribute 
'c:root' is not allowed to appear in element 'n0:<SOAP_element_name>'.

Original comment by henrik.l...@gmail.com on 8 Nov 2010 at 10:01

GoogleCodeExporter commented 9 years ago
Attributes are removed by

envelope.setAddAdornments(false);

Original comment by henrik.l...@gmail.com on 8 Nov 2010 at 10:21

GoogleCodeExporter commented 9 years ago
So does this actually fix this issue then? If so I can close it right?

Original comment by mosa...@gmail.com on 8 Nov 2010 at 10:33

GoogleCodeExporter commented 9 years ago
API already supports this as documented above. Therefore not an issue.

Original comment by mosa...@gmail.com on 15 Nov 2010 at 8:56