[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xmlblaster-devel] Python/xmlrpc publishArr and publishOneway doesn't work



I want to use publishOneway from a Python program via pyBlaster. 

I note that the signature for this method is wrong in the distributed pyBlaster.py file.

It is:

    def publishOneway(self, xmlKey, content, qos):

But should be:

    def publishOneway(self, msgUnitArr):


I've change the signature and it's corresponding xml-rpc call to:

    def publishOneway(self, msgUnitArr):
        return self.proxy.xmlBlaster.publishOneway(self.sessionId, msgUnitArr)


And I call it like this:

print client.publishOneway([[key.xml, '', qos.xml]])

But that doesn't work, I get an error from xmlBlaster:

xmlrpclib.Fault: <Fault 0: 'java.lang.Exception: errorCode=legacy message=Class Cast 
Exception'>


(well ok, I cheated, I actually call publishArr so that I can get the excption, but the method 
signatures are the same)

So, msgUnitArr is a vector of vectors, where the inner vectors have (key, content, qos)

But it doesn't work. Does anyone have any idea why it doesn't work or how I can better 
debug this?

This is what is sent on the wire (captured by ethereal)

<?xml version='1.0'?>
<methodCall>
<methodName>xmlBlaster.publishArr</methodName>
<params>
<param>
<value><string>sessionId:192.168.1.9-null-1092317053578-38852993-22</string></value>
</param>
<param>
<value><array><data>
<value><array><data>
<value><string>&lt;key contentMime="text/xml"&gt;&lt;sfi type="instance"&gt;&lt;messageprocessor type="instance"&gt;&lt;preferenceid type="long"&gt;8&lt;/preferenceid&gt;&lt;schedule&gt;Sent&lt;/schedule&gt;&lt;/messageprocessor&gt;&lt;/sfi&gt;&lt;/key&gt;</string></value>
<value><string></string></value>
<value><string>&lt;qos&gt;
&lt;expiration lifeTime="0"  /&gt;
&lt;priority&gt;5&lt;/priority&gt;
&lt;/qos&gt;</string></value>
</data></array></value>
</data></array></value>
</param>
</params>
</methodCall>

-- 
Brad Clements,                bkc at murkworks.com   (315)268-1000
http://www.murkworks.com                          (315)268-9812 Fax
http://www.wecanstopspam.org/                   AOL-IM: BKClements