[Soap-Python] How to change SOAP response headers

Mehmet Arikkan marikkan at gmail.com
Fri May 25 20:09:14 CEST 2012


Actually what I meant to ask is that whether my way to add the header is a
proper way:

def _on_method_call(ctx):
    ctx.out_header = RespHeader()
    ctx.out_header.Elem1 = 'Test1'
    ctx.out_header.Elem2 = 'Test2'

HelloWorldService.event_manager.add_listener('method_call', _on_method_call)

Is this how you would properly add a SOAP Header to your outgoing message?

On Fri, May 25, 2012 at 8:25 PM, Burak Arslan <burak.arslan at arskom.com.tr>wrote:

> On 05/25/12 19:50, Mehmet Arikkan wrote:
>
>> Sorry, it seems I was a quite hasty:
>>
>> __out_header__ = RespHeader
>>
>> This fixed the problem when added inside HelloWorldService class.
>>
>> But I am really still curious about whether or not this is the correct
>> way to go. I would appreciate your comments.
>>
>
>
> merhaba,
>
> yes, that's the way to go. that's what the warning you saw was cautioning
> you to do actually.
>
> see: https://github.com/plq/rpclib/**blob/**e669e7e9227bda499e2a77fe5261a9
> **238c232afe/src/rpclib/**decorator.py#L149<https://github.com/plq/rpclib/blob/e669e7e9227bda499e2a77fe5261a9238c232afe/src/rpclib/decorator.py#L149>
>
> best,
> burak
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/soap/attachments/20120525/cc7c93f4/attachment.html>


More information about the Soap mailing list