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

Re: FW: [xmlblaster] C++ Client SQL92 filter



Hi Nelson,

it was a bug and is fixed now, thanks for reporting.

This works now fine:

java org.xmlBlaster.Main
SubscribeDemo -filter.type Sql92Filter -filter.query "canal='teste2'"
PublishDemo -clientProperty.key canal -clientProperty.value teste2 -clientProperty.type String -numPublish 10


regards,
Marcel


inevo wrote:

Well,

I managed to get this working by removing type='String' from the Client property... What's up with this? Should i be using another operator for comparing strings ?

Regards,

  Nelson Silva


-----Original Message----- From: inevo Sent: Tue 7/26/2005 11:27 AM To: xmlblaster at server.xmlBlaster.org Cc: Subject: Re: [xmlblaster] C++ Client SQL92 filter Hi,

I'm using the C++ API. For the subscription my code is :

void XmlBlasterClient::subscribe(char * key,I_Callback* callback, char * filter)
{
 SubscribeKey subKey(global_);
 subKey.setOid(key);
  SubscribeQos subQos(global_);

   if(filter!=NULL)
       {    AccessFilterQos af(global_, "Sql92Filter","1.0", filter);
           subQos.addAccessFilter(af);
       }

subQos.setWantLocal(false);
SubscribeReturnQos subRetQos = con.subscribe(subKey, subQos,callback);
}


then i call it with -> Subscribe("SimpleChat",new ChatCallback(),"canal='teste2'");

For publishing i have this: (MsgHeaderProperties simply contains QosData::ClientPropertyMap clientPropertyMap;

void XmlBlasterClient::Publish(const char * key,const char * content,MsgHeaderProperties * props)
{
PublishQos publishQos(global_);
PublishKey publishKey(global_);
publishKey.setOid(key);
// Let's add the properties
if(props!=NULL)
{
publishQos.setClientProperties(props->getProperties());
}
MessageUnit msgUnit(publishKey, string(content), publishQos);
PublishReturnQos pubRetQos = con.publish(msgUnit);
}


Then in my app i having this :
props->add("canal","teste2");
Publish("SimpleChat",msg.c_str(),props);

The subscription message looks like :

<key oid='SimpleChat' contentMime='text/plain'></key> and qos:
<qos>
 <erase forceDestroy='false'/>
 <local>false</local>
 <filter type='Sql92Filter'>
  <![CDATA[canal='teste2']]>
 </filter>
</qos>

And the publish :

<MessageUnit>
 <key oid='SimpleChat'/>
 <content>hello</content>
 <qos>
  <state id='OK'/>
  <sender>client/nfgs</sender>
  <route>
  </route>
  <clientProperty name='canal' type='String'>teste2</clientProperty>
 </qos>
</MessageUnit>


At first glance i think this should work right ? So any help regarding this subject is welcome ..

Regards,

   Nelson Silva






Marcel Ruff wrote:



Nelson Silva wrote:



Hi,

I've been cracking my head over this for a while but to no avail... :

[25/Jul/2005 20:42:17 WARN  XmlBlaster.SOCKET.tcpListener-nfgs RequestBroker-/node/xmlBlaster_127_0_0_1_3412] Generating dead message 'callback:/node/xmlBlaster_127_0_0_1_3412/client/nfgs/-3/NORM/1122320537735000000/SimpleChat' from publisher=/node/xmlBlaster_127_0_0_1_3412/client/nfgs/-2 because delivery with queue 'null' failed:

Mime access filter 'Sql92Filter' for message 'SimpleChat/2005-07-25 20:42:17.707' from sender '/node/xmlBlaster_127_0_0_1_3412/client/nfgs/-2' to subscriber '/node/xmlBlaster_127_0_0_1_3412/client/nfgs/-3' threw an exception, we don't deliver the message to the subscriber: errorCode=user.illegalArgument message=#exported You have invoked a server method with illegal arguments. -> http://www.xmlblaster.org/xmlBlaster/doc/requirements/admin.errorcodes.listing.html#user.illegalArgument

What's happening here ? I have the same thing working in JAVA without problems. I even compiled the C++ client library with SQLite support thinking it might solve it...



Hi Silva,

could you please send me the published message and the
sql query of the subscriber?
Which version do you use, on which OS?

thanks
Marcel