Laksahan / ksoap2-android

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

Unable to remove 'n0' prefix from header element #214

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Prepare a soap envelope 'envelope' with some soap header and body
2. set:
       envelope.dotNet = true;
       envelope.implicitTypes = true;
       envelope.setAddAdornments(false);
3. When checking the requestdump with httpTransportSE.debug  = true, 'n0' is 
prefixed with header element while removed from body.

<v:Envelope 
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:d="http://www.w3.org/2001/XMLSchema" 
    xmlns:c="http://www.w3.org/2003/05/soap-encoding" 
    xmlns:v="http://www.w3.org/2003/05/soap-envelope">
    <v:Header>
        <n0:soapLoginHeader xmlns:n0="http://tempuri.org/">
            <soapUser>xxx</soapUser>
            <soapPass>xxx</soapPass>
        </n0:soapLoginHeader>
    </v:Header>
    <v:Body>
        <getSomething xmlns="http://tempuri.org/">
            <ID>xxxx</ID>
            <name>xxxx</name>
        </getSomething>
    </v:Body>
</v:Envelope>

What is the expected output? What do you see instead?
'n0' should not be prefixed in body as well header.

<v:Envelope 
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:d="http://www.w3.org/2001/XMLSchema" 
    xmlns:c="http://www.w3.org/2003/05/soap-encoding" 
    xmlns:v="http://www.w3.org/2003/05/soap-envelope">
    <v:Header>
        <soapLoginHeader xmlns="http://tempuri.org/">
            <soapUser>xxx</soapUser>
            <soapPass>xxx</soapPass>
        </soapLoginHeader>
    </v:Header>
    <v:Body>
        <getHistoryTrackDtl xmlns="http://tempuri.org/">
            <ID>xxxx</ID>
            <name>xxxx</name>
        </getHistoryTrackDtl>
    </v:Body>
</v:Envelope>

What version of the product are you using? On what operating system?
Working in android and using 
ksoap2-android-assembly-3.4.0-jar-with-dependencies.jar

Please provide any additional information below.
 The code is : 

Original issue reported on code.google.com by abcdef74...@gmail.com on 29 Apr 2015 at 7:06