[spyne] defining a service without expecting namespace in every tag
daniele at elkos.it
Tue Aug 11 12:28:44 UTC 2015
On 10 August 2015 at 19:54, Daniele Bortoluzzi <daniele at elkos.it> wrote:
> On 10 August 2015 at 19:13, Burak Arslan <burak.arslan at arskom.com.tr>
>> if you got issues with namespaces, try soft validation.
> I tried soft validation and forgot about namespaces, the input is
Now I'm struggling with the response generated by Spyne: the result is
wrapped in a <NotifyResult> element.
Looking at the documentation and this post
I saw that _body_style='bare' could be the solution. But if I set that
option, the input is no more validated:
[spyne.application] Notify() takes exactly 2 arguments (3 given)
Traceback (most recent call last):
line 144, in process_request
ctx.out_object = self.call_wrapper(ctx)
File "scryba/server.py", line 66, in call_wrapper
File "/usr/local/lib/python2.7/dist-packages/spyne/service.py", line
209, in call_wrapper
return ctx.function(ctx, *ctx.in_object)
TypeError: Notify() takes exactly 2 arguments (3 given)
that's because the ComplexModel input has two attributes (mytag1,
notifications) while Spyne expects a single container.
If you look at the previous XML I posted for the namespace problem you can
see the only container being the NotifyRequest element. But this is already
used by the method convention, so Spyne expects another container inside
I don't know if I must go on adjusting the code to accept the input or do
something else to achieve the effect of _body_style='bare' for the output
Thank you in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the people