Re: Re[2]: [Zope3-dev] how-to fool XML-RPC publisher

2005-09-11 Thread Stephan Richter
On Wednesday 31 August 2005 09:23, Groszer Adam wrote:
 Sorry, I'm a newbie regarding that. As I checked there is a
 zope.publisher.xmlrpc.premarshal_dispatch_table dict, but this is for
 the response. The request is handled 'directly' by xmlrpclib
 self._args, function = xmlrpclib.loads(self._body_instream.read())
 Can you please give a hint where to look?

I don't know much about all of this either. You definitely want to register 
this hook with xmlrpclib, so the best place to start would be the Python 
docs. If they don't do what you want, you want to write a proposal to make 
Zope 3 more flexible.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] how-to fool XML-RPC publisher

2005-08-31 Thread Stephan Richter
On Tuesday 30 August 2005 11:55, Adam Groszer wrote:
 Is there any way to fool the Z3 XML-RPC publisher to unmarshall
 strings *always* as unicode? I think the problem is that xmlrpclib
 tries to convert all strings to str, but in Z3, all strings should be
 stored as unicode. Even better that zope.schema enforces unicode also.
 So my exposed methods would start with converting all necessary
 parameters to unicode.

If this is not done, I would consider it even to be a Zope 3 bug.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] how-to fool XML-RPC publisher

2005-08-31 Thread Stephan Richter
On Tuesday 30 August 2005 11:55, Adam Groszer wrote:
 Is there any way to fool the Z3 XML-RPC publisher to unmarshall
 strings *always* as unicode? I think the problem is that xmlrpclib
 tries to convert all strings to str, but in Z3, all strings should be
 stored as unicode. Even better that zope.schema enforces unicode also.
 So my exposed methods would start with converting all necessary
 parameters to unicode.

Darn, I pressed send to fast. I think you can register custom objects to 
unmarshall the data. This custom object could handle the unicode issue for 
you (I have not tried this yet though).

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re[2]: [Zope3-dev] how-to fool XML-RPC publisher

2005-08-31 Thread Adam Groszer
Hello Stephan,

Sorry, I'm a newbie regarding that. As I checked there is a
zope.publisher.xmlrpc.premarshal_dispatch_table dict, but this is for
the response. The request is handled 'directly' by xmlrpclib
self._args, function = xmlrpclib.loads(self._body_instream.read())
Can you please give a hint where to look?

Wednesday, August 31, 2005, 12:24:53 PM, you wrote:

SR On Tuesday 30 August 2005 11:55, Adam Groszer wrote:
 Is there any way to fool the Z3 XML-RPC publisher to unmarshall
 strings *always* as unicode? I think the problem is that xmlrpclib
 tries to convert all strings to str, but in Z3, all strings should be
 stored as unicode. Even better that zope.schema enforces unicode also.
 So my exposed methods would start with converting all necessary
 parameters to unicode.

SR Darn, I pressed send to fast. I think you can register custom objects to
SR unmarshall the data. This custom object could handle the unicode issue for
SR you (I have not tried this yet though).

SR Regards,
SR Stephan
SR --
SR Stephan Richter
SR CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
SR Web2k - Web Software Design, Development and Training


-- 
Best regards,
 Groszer Adam
--
Quote of the day:
If passion drives you, let reason hold the reigns. 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] how-to fool XML-RPC publisher

2005-08-30 Thread Adam Groszer
Dear All,

Is there any way to fool the Z3 XML-RPC publisher to unmarshall
strings *always* as unicode? I think the problem is that xmlrpclib
tries to convert all strings to str, but in Z3, all strings should be
stored as unicode. Even better that zope.schema enforces unicode also.
So my exposed methods would start with converting all necessary
parameters to unicode.


-- 
Best regards,
 Adam  mailto:[EMAIL PROTECTED]
--
Quote of the day:
Nothing is permanent except change.

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com