← Back to team overview

ladon-dev-team team mailing list archive

[Question #241249]: Ladon and kSoap2 SOAP request fail with "not optional" message.

 

New question #241249 on ladon:
https://answers.launchpad.net/ladon/+question/241249

I figured out that kSoap2 (Android) fails when making a SOAP call to Ladon. 
The issue was resolved on the client side with setting implicit types on the envelope.
        envelope.implicitTypes = false;		
        envelope.setAddAdornments(false);

When these are not set, kSoap2 will make a SOAP call like this:

<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:urn:hello id="o0" c:root="1" xmlns:n0="urn">
         <n0:name i:type="n0:name">
            <name i:type="d:string">Ladon</name>
         </n0:name>
      </n0:urn:hello>
   </v:Body>
</v:Envelope>

At that point, ladon no longer finds the 'name' parameter.
With the above settings the following XML is produced, which works fine with ladon.

<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:hello xmlns:n0="urn">
         <name i:type="d:string">Ladon</name>
      </n0:hello>
   </v:Body>
</v:Envelope>

Eventhough there is a work around. I am not sure that kSoap2 is doing something out of spec.

-- 
You received this question notification because you are a member of
Ladon Developer, which is an answer contact for ladon.