Ladon and kSoap2 SOAP request fail with "not optional" message.

Asked by Marcel van Eck

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

Question information

Language:
English Edit question
Status:
Solved
For:
ladon Edit question
Assignee:
No assignee Edit question
Solved by:
Marcel van Eck
Solved:
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
jsgaarde (jakob-simon-gaarde) said :
#2

Hi Macel.

Which soap interface are you using?

I just updated the default SOAP interface to use Document Literal. Maybe you should have a gp with version 0.9.8

Best regards Jakob

Revision history for this message
jsgaarde (jakob-simon-gaarde) said :
#3

Sorry, I ment version 0.8.9

Revision history for this message
Marcel van Eck (vaneck-marcel) said :
#4

Jakob,

I am using kSoap2 3.1.1, the serverside SOAP interface is ladon-0.8.8-py2.7
Its all working well right now with the flags on the client side, when I
get the chance I will try again with document-literal on.

-Marcel.

On Thu, Jan 9, 2014 at 2:11 AM, jsgaarde <
<email address hidden>> wrote:

> Your question #241249 on ladon changed:
> https://answers.launchpad.net/ladon/+question/241249
>
> jsgaarde posted a new comment:
> Sorry, I ment version 0.8.9
>
> --
> You received this question notification because you asked the question.
>

Revision history for this message
Marcel van Eck (vaneck-marcel) said :
#5

Since the original question provided a workaround, there is no issue for me, however, I will confirm whether kSoap2 works fine with the change in Ladon 0.8.9.