XML RPC Woes

Mark J Nenadov marknenadov at winningteam.com
Mon Feb 25 13:51:47 EST 2002


Brian,

>Close. What you actually want to do return/pass a xmlrpclib.Binary
>object. You would use it this way:

Yes,  that is exactly what I needed. 

However there is some odd behavior going on. 
After three or four identical calls to the XMLRPC
server,  the server does a core dump on me.

Here is a summary of what I am doing:

The client passes the mcrypt'ed string (that was
encoded with xmlrpclib.Binary()). The function 
that  is being called on the server then makes its
 own  mcrypt'ed string, encodes it with 
xmlrpclib.Binary(), and then uses == to compare 
them. I assume that the comparision will work
 because the Binary class defines a "__cmp__()" 
method.

The client (simplified version), does this:

data = mcrypt_encode( "Msg", "pass1")

try:
	print con.dosomething( Binary( data ) )

except Error, v:
	print "ERROR", v


The server (simplified version), does this:

def dosomething( data ):
         good_data = mcrypt_encode("Msg", "pass1")
         return data == Binary( good_data )

I did a quick check to confirm that
the 'data' variable and Binary( good_data)
were actually xmlrpclib.Binary instances--and
they were. Any clue why I would be getting core
 dumps on the server side?

~Mark


_____________________________________________
Free email with personality! Over 200 domains!
http://www.MyOwnEmail.com





More information about the Python-list mailing list