Michael Wood wrote at 2010-12-1 09:16 +0200: >I'm pretty new to SOAP and soaplib. > >Is there a way to have a list of key, value pairs where the values >could be any primitive type, or possibly a structure and return that >from a SOAP service?
A long time ago, I made something like this with ZSI (and Zope). While this has been a SOAP (based) service, it was not described by a WSDL but instead used dynamic typing (each value in the SOAP message used an "xsi:type" attribute to specify its type). I expect that you want a WSDL described service. In principle, WSDL (more precisely "XML-Schema" on which WSDL depends) supports so called "urtype"s, among others an "anyType" "urtype". This is however an advanced feature. Frameworks might have difficulties with it (I met e.g. difficulties with "PyXB", quickly fixed by its author). I do know the "soaplib" details -- and wether it can handle arbitrary types. >So something like a Dict, where I can add to the >entries in the Dict over time without the WSDL changing. I'm using >the 1.0 branch of soaplib. > >I'll need to consume this from a client written in C/C++. Then, this client, too, must be able to handle "xsi:type" attributes. Maybe, this is even a stronger restriction than on the Python side. >If this is not possible, I'll just stick with a class with predefined >fields and use the ClassSerializer, but it would be nice if I could >avoid the WSDL changing and therefore having to update the client if I >add new fields to the class/dict/whatever. Maybe, other techniques would be more adequate for you (e.g. XML-RPC, JSON-RPC, ...)? They are "by nature" dynamic, not restricted by a static description. -- Dieter _______________________________________________ Soap mailing list [email protected] http://mail.python.org/mailman/listinfo/soap
