Problem with methods returning complex data with field 'result'

Bug #1053995 reported by Piotr Szymankiewicz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ladon
New
Undecided
Unassigned

Bug Description

I've discoverd strange behaviour of soap11.py. I have a method "Datasource" returning complex type "DataSourceResult":

class DatasourceResult(LadonType):
    status = int
    result = PORTABLE_STRING
    resultMD5 = PORTABLE_STRING

@ladonize(PORTABLE_STRING, rtype=DatasourceResult)
def Datasource(self, params):
...

SOAP response looks like:

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"...
 <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <ns:DatasourceResponse>
   <status>0</status>
   <resultMD5>3c051ad8586ec921c5cee8425784e955</resultMD5>
   <result>......</result>
  </ns:DatasourceResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

But when I change parameter name in "DatasourceResult" from "result" to "xxx" SOAP response is different (element <result> appears):

<?xml version="1.0" encoding="UTF-8" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"...
 <SOAP-ENV:Body SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
  <ns:DatasourceResponse>
   <result>
     <status>0</status>
     <resultMD5>3c051ad8586ec921c5cee8425784e955</resultMD5>
     <xxx>......</xxx>
    </result>
  </ns:DatasourceResponse>
 </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Unfortunately .../soap11/description is identical in both cases (except "xxx" of course). My client application works fine only in latter case, in former case it cannot retrive the result. I think something is wrong at the server side.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.