[Soap-Python] How to change SOAP response headers

Burak Arslan burak.arslan at arskom.com.tr
Wed May 23 23:31:39 CEST 2012


On 05/23/12 18:58, Wolfgang Sourdeau wrote:
> Le 12-05-23 11:56, Mehmet Arikkan a écrit :
>> Hi,
>>
>> I see a "FIXME" in the trunk as such (in soap11.py):
>>
>> # FIXME: There's no way to alter soap response headers for the user.
>>

yes, but look at it in its context:

         if ctx.out_error is not None:
             # FIXME: There's no way to alter soap response headers for 
the user.


so that's true only in case the use code throws an exception...

>> Is there no way to alter SOAP Header (i.. add elements) or if there 
>> is, how can we do it easily?
>>
>>
>
>
> From my experience, it is possible to modify the response headers by 
> using the rpc decorator rather than srpc and then modifying the 
> ctx.out_header attribute.
> That is, if we are talking stricly about the SOPE layer, and not the 
> HTTP layer...
>

that's correct. in http you have ctx.transport.resp_headers dict but no 
ctx.out_header support yet.

burak



More information about the Soap mailing list