[Soap-Python] Stop method processing via method_call event

Chris Austin chris at sydneysys.com
Fri Sep 30 17:52:17 CEST 2011


On 09/30/2011 10:26 AM, azurIt wrote:
> Hi,
>
> is it somehow possible to stop method processing inside method_call event ? For example, i'm doing authentication of users in method_call event and, in case user cannot be verified, i don't want to process the method and return custom object instead (for example, return {"state": "no_permission"} ). Thnx.
Why can't you just return a status and/or return code along with None 
for any objects your client is expecting?  On the client side, it would 
just then check the status prior to interrogating the rest of the 
message.  This is a pretty common pattern seen in web services.

> azur
> _______________________________________________
> Soap mailing list
> Soap at python.org
> http://mail.python.org/mailman/listinfo/soap



More information about the Soap mailing list