[spyne] Array of complex type(dict) data mismatch

Estifanos Gebrehiwot gestifanos at gmail.com
Thu Oct 1 17:56:44 UTC 2015


Hi,
  I am implementing webservice specified by third party company, They
provide example wsdl with soap data, Here is snippet  of soap envelope
<soapenv:Body>
    <KYCInfo>
        <KycName>firstName</KycName>
        <KycValue>Joe</KycValue>
   </KycInfo>
   <KycInfo>
       <KycName>lastName</KycName>
       <KycValue>Chris</KycValue>
  </KycInfo>
</soapenv:Body>

I used bottom up approach using spyne and was  able to generate wsdl with
the following soap envelope

<soapenv:Body>
         <test:KYCInfo>
            <!--Zero or more repetitions:-->
            <ph:KYCInfo>
               <ph:KYCValue>?</ph:KYCValue>
               <ph:KYCName>?</ph:KYCName>
            </ph:KYCInfo>
         </test:KYCInfo>
   </soapenv:Body>
-----



Here is the snippet of the source code I used to generate the wsdl

class KYCInfo(ComplexModel):
    KYCName = Unicode(max_length=255)
    KYCValue = Unicode(max_length=128)

    class Attributes(ComplexModel.Attributes):
        nullable=True
        min_occurs=0


class HelloWorld(ServiceBase):
    """Testing datatype."""
    @rpc(Iterable(KYCInfo), _returns=None)
    def SayHello(ctx, KYCInfo):
        pass

My question is, what I am missing? In my case List of KYCInfo has root
elemnt KYCInfo but not in their case, their's  is directly under the soap
body.

-- 
Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spyne.io/archives/people/attachments/20151001/7ec93aef/attachment.html>


More information about the people mailing list