[Soap-Python] Spyne: ability to change default results name from FooResult to WhateverXyz ?

Patricio Stegmann Gmail kpoman at gmail.com
Tue Apr 14 20:08:40 CEST 2015


Hello,
I am looking at a way to change the default behaviour on output 
generation with soap.
Basically spyne creates the typedefs but responds with its autogenerated 
names:
/
//<senv:Envelope xmlns:tns="tns" xmlns:s0="datamodel" 
xmlns:senv="http://schemas.xmlsoap.org/soap/envelope/">//
//   <senv:Body>//
//*      <tns:helloResponse>*//*
*//*         <tns:helloResult>*//
//            <s0:param2>myval</s0:param2>//
//            <s0:param1>1</s0:param1>//
//*         </tns:helloResult>*//*
*//*      </tns:helloResponse>*//
//   </senv:Body>//
//</senv:Envelope>/

I need to change the default name of helloResult. I could already manage 
it for helloResponse, by using on the srpc decorator the parameter 
_in_message_name etc... However, I dont know how to change the name for 
helloResult. I tried, on the return type, to do something like this:

classMyThing(ComplexModel):
     param1 = Integer
     param2 = String
     __type_name__ ='MySpecificResultThing'

but still got helloResult. Any idea ?

Thank you !






-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/soap/attachments/20150414/0f7e2235/attachment.html>


More information about the Soap mailing list