[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
"<ent_21/><site_2148/><grp_13/><agent_100/>"

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",
".*agent_"+agentID+".*");

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:
java.lang.NullPointerException
CALL [MsgErrorHandler-/node/xmlBlaster_192_168_0_6_3412/client/bschuhma/-2]
Error handling started: Problems with 0 MsgQueueEntries  -
XmlBlasterException serverSideException=true
node=[xmlBlaster_192_168_0_6_3412]
location=[DeliveryManager-callback:/node/xmlBlaster_192_168_0_6_3412/client/
bschuhma/-2]
java.lang.NullPointerException
stackTrace=java.lang.NullPointerException 	at
org.xmlBlaster.engine.TopicHandler.invokeCallback(TopicHandler.java:1023)
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
org.xmlBlaster.engine.XmlBlasterImpl.publishArr(XmlBlasterImpl.java:205)
...
-----------------------------------------------------

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

thanks for reporting

Marcel

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