From: Joshua B. <JRB...@lb...> - 2006-10-26 18:02:25
|
The Binding is correct, that's not the problem. But the dispatching doesn't match the Binding usage. You should look at the updated docs, I go over how to do the dispatching correctly. I added a couple Appendices where I go over these examples in detail. So the thinking is you are using Binding as a SoapEncoded rpc client. The messages it passes to dispatch or whoever needs to be interpreted as "rpc" style. So dispatch needs to be configured as "rpc", and the callback methods need to return lists or dicts. I didn't want to automatically wrap stuff because that complicates expected behavior. -josh On Oct 26, 2006, at 5:43 AM, Alberto Labarga wrote: > Hi, > > I tried to create a simple server using mod_python, I use several > examples from documentation and other web pages, > > my server looks like this > > from ZSI import dispatch > from mod_python import apache > > import SimpleCal > mod = __import__('encodings.utf_8', globals(), locals(), '*') > mod = __import__('encodings.utf_16_be', globals(), locals(), '*') > > def handler(req): > dispatch.AsHandler(modules=(SimpleCal,), request=req) > return apache.OK > > > and SimpleCal.py is > > def hello(): > return "Hello" > > def helloYou(me): > return "Hello " + me > > def sum(*args): > sum = 0 > for i in args: > sum += i > return sum > > > so I create a client > > from ZSI.client import Binding > > u = '/python/cal.py' > n = 'cal' > > b = Binding(url=u, ns=n, host='localhost', port=80, tracefile= > sys.stdout) > > print b.hello() > print b.helloYou('alberto') > print b.sum(*range(1,10)) > > and I got this Exception > > <ZSI:string>ZSI:EvaluateException > Serializing dictionaries not implemented when > processContents="strict".Try as a > list or use processContents="lax".</ZSI:string> > > <ZSI:trace> > d:\server\xampp\python\lib\site-packages\ZSI\dispatch.py:82:_Dispatch > d:\server\xampp\python\lib\site-packages\ZSI\dispatch.py: > 163:_ModPythonSendFault > .... > > how/where can I set processContents="lax"? > > thanks > > ALberto |