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

RE: [xmlblaster] Does XPATH filter apply to ClientTags?

Hi Bret,

Thanks, Marcel - I understand better now.  I basically cannot use the
clientTags for embedding the recipient of the message to be extracted by
xpath, because once the topic is set up the entire key never changes, even
though I can obviously change the meta-information.

OK, so I bagged that idea and decided to use an XPATH filter on the contents
of the message.  If I set my filter to:
sq.addAccessFilter( new AccessFilterQos (glob,"XPathFilter",
"1.0","//*[contains(name(),'agent_" + agentID +"')]"));

(assume agent == 100)

And publish a message with : -content "<agent_100/>", the user gets it.
BUT, if I further extend my scenario to include the entire scope (i.e.
enterprise, site, group and agent), like this: -content

This is illegal XML markup! XML tells us to have exactly one root tag but you have four.

I get a NULL POINTER execption.

Interestingly enough, though, I can use a regex filter using the same input
and it works fine:
AccessFilterQos filter = new AccessFilterQos(glob, "GnuRegexFilter", "1.0",

Here's the xmlBlaster GUI output (and a dump below that):


TRACE [TopicHandler-/node/xmlBlaster_192_168_0_6_3412/topic/INFO] Mime
access filter 'XPathFilter threw an exception: errorCode=legacy
message=Could not parse xml: Illegal character at end of document, &#x3c;.
at line=1 column=-1 in systemIDnull

Here your illegal XML markup is noted.

TRACE [TopicHandler-/node/xmlBlaster_192_168_0_6_3412/topic/INFO] Sending of
message from /node/xmlBlaster_192_168_0_6_3412/client/bschuhma/-3 to
/node/xmlBlaster_192_168_0_6_3412/client/bschuhma/-2 failed:
CALL [MsgErrorHandler-/node/xmlBlaster_192_168_0_6_3412/client/bschuhma/-2]
Error handling started: Problems with 0 MsgQueueEntries  -
XmlBlasterException serverSideException=true
stackTrace=java.lang.NullPointerException 	at
at org.xmlBlaster.engine.TopicHandler.invokeCallback(TopicHandler.java:946)
at org.xmlBlaster.engine.TopicHandler.publish(TopicHandler.java:576) 	at
org.xmlBlaster.engine.RequestBroker.publish(RequestBroker.java:1542) 	at
org.xmlBlaster.engine.RequestBroker.publish(RequestBroker.java:1372) 	at
org.xmlBlaster.engine.RequestBroker.publish(RequestBroker.java:1366) 	at

The NPE happening on AccessPlugin exception is not a nice behaviour, i'll look at it.

thanks for reporting


PS: Note: You messages got bounced by our mail server as the
length exceeded 40000 chars