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

[xmlblaster] Unsubscribing with pyBlaster



I've been testing layer on top of the pyBlaster python interface to
xmlBlaster. A simple OID subscription is OK, but when I unsubscribe, I get
the following response.

05-07-2003 ERROR Test1 unable to subscribe to <key oid='TestTopic'
queryType='EXACT'/>.
Traceback (most recent call last):
  File
"d:\pal155\src\boeing\python\wedgetail\infra\xmlblaster\XmlBlasterInterface.
py", line 121, in unsubscribe
    XmlBlasterCallbackClient.unsubscribe(self, key, qos)
  File "c:\Python22\lib\site-packages\pyBlaster\pyBlaster.py", line 241, in
unsubscribe
    self.proxy.xmlBlaster.unsubscribe(self.sessionId, xmlKey, qos)
  File "C:\Python22\Lib\site-packages\pyBlaster\xmlrpclib.py", line 986, in
__call__
    return self.__send(self.__name, args)
  File "C:\Python22\Lib\site-packages\pyBlaster\xmlrpclib.py", line 1239, in
__request
    verbose=self.__verbose
  File "C:\Python22\Lib\site-packages\pyBlaster\xmlrpclib.py", line 1037, in
request
    return self._parse_response(h.getfile(), sock)
  File "C:\Python22\Lib\site-packages\pyBlaster\xmlrpclib.py", line 1138, in
_parse_response
    return u.close()
  File "C:\Python22\Lib\site-packages\pyBlaster\xmlrpclib.py", line 703, in
close
    raise apply(Fault, (), self._stack[0])
Fault: <Fault 0: 'java.lang.NoSuchMethodException:
org.xmlBlaster.protocol.xmlrpc.XmlBlasterImpl.unsubscribe(java.lang.String,
java.lang.String, java.lang.String)'>

I'm using xmlBlaster 0.8.46.

Any suggestions as to what's wrong here? The subscribe/unsubscribe code is:

    def subscribe(self, sub):
        """Subscribe to this interface.

        Start listening to the subscription key with ourself as a
recevier."""
        if not self.isOpen():
            raise InterfaceException, "Interface %s is not open." %
self.getId()
        if self.subscriber != None:
            raise SubscriptionException, "Interface %s is already subscribed
to.", self.getId()
        self.subscriber = sub
        try:
            key = self.getSubscribeKey()
            qos = self.getSubscribeQoS()
            XmlBlasterCallbackClient.subscribe(self, key, qos)
        except Exception:
            self.logger.error("%s unable to subscribe to %s." %
(self.getId(), key), exc_info = True)
            raise InterfaceException, "Interface %s unable to subscribe." %
self.getId()
        self.logger.debug("%s started listening." % self.getId())
        
    def unsubscribe(self, sub):
        """Unsubscribe to this interface"""
        if not self.isOpen():
            raise InterfaceException, "Interface %s is not open." %
self.getId()
        if self.subscriber != sub:
            raise SubscriptionException, "Interface %s is not subscribed
to.", self.getId()
        self.subscriber = None
        try:
            key = self.getSubscribeKey()
            qos = self.getSubscribeQoS()
            XmlBlasterCallbackClient.unsubscribe(self, key, qos)
        except Exception:
            self.logger.error("%s unable to unsubscribe to %s." %
(self.getId(), key), exc_info = True)
            raise InterfaceException, "Interface %s unable to unsubscribe."
% self.getId()
        self.logger.debug("%s stopped listening." % self.getId())