You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by ilyas_asg <il...@asg.com> on 2009/01/05 16:51:50 UTC
WS-Notification(wsn2005 component): MessageContent Filter is not
working
Hello,
I am looking into using wsn2005 engine and interested in using
MessageContent Filter - filtering based on Message content using Xpath
expressions.
It does not seem to work as specified in WS-Notification document.
Two observations:
(1) according to my reading of the WSN standard, both TopicExpression and
MessageContent filters are optional and not depend on each other.
But the wsn2005 implementation throws a fault if TopicExpression is not
provided in Subscribe request.
(2) when I specify both TopicExpression with Simple topic Dialect and
MessageContent filter, Subscribe request is accepted but the MessageContent
filter is ignored when Notify message is sent.
Below are the copies of SOAP messages:
<!------------------------------------------->
<env:Envelope
xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<env:Header />
<env:Body>
<wsnt:Subscribe
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:enc="http://www.enc.com">
<wsnt:ConsumerReference>
<wsa:Address>
http://localhost:8090/ENCWebService/services/ENC?http.soap=true
</wsa:Address>
</wsnt:ConsumerReference>
<wsnt:Filter>
<wsnt:TopicExpression
Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">
enc:encTopic1
</wsnt:TopicExpression>
<wsnt:MessageContent
Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116">
boolean(enc://event[@eventid="15"])
</wsnt:MessageContent>
</wsnt:Filter>
</wsnt:Subscribe>
</env:Body>
</env:Envelope>
<!------------------------------------------->
<env:Envelope
xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<env:Header />
<env:Body>
<wsnt:Notify
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:enc="http://www.enc.com">
<wsnt:NotificationMessage>
<wsnt:Topic
Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">
enc:encTopic1
</wsnt:Topic>
<wsnt:Message>
<enc:event eventid="16" />
</wsnt:Message>
</wsnt:NotificationMessage>
</wsnt:Notify>
</env:Body>
</env:Envelope>
<!------------------------------------------->
Please advise or comment.
--
View this message in context: http://www.nabble.com/WS-Notification%28wsn2005-component%29%3A-MessageContent-Filter-is-not-working-tp21293470p21293470.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.
Re: WS-Notification(wsn2005 component): MessageContent Filter is
not working
Posted by ObjectOrange <br...@softechnics.com>.
Hello,
I don't think the XPath is correct: boolean(enc://event[@eventid="15"])
Try: boolean(//enc:event[@eventid="15"])
ilyas_asg wrote:
>
> Hello,
> I am looking into using wsn2005 engine and interested in using
> MessageContent Filter - filtering based on Message content using Xpath
> expressions.
>
> It does not seem to work as specified in WS-Notification document.
>
> Two observations:
>
> (1) according to my reading of the WSN standard, both TopicExpression and
> MessageContent filters are optional and not depend on each other.
> But the wsn2005 implementation throws a fault if TopicExpression is not
> provided in Subscribe request.
>
> (2) when I specify both TopicExpression with Simple topic Dialect and
> MessageContent filter, Subscribe request is accepted but the
> MessageContent filter is ignored when Notify message is sent.
>
> Below are the copies of SOAP messages:
>
> <!------------------------------------------->
> <env:Envelope
> xmlns:env="http://www.w3.org/2003/05/soap-envelope"
> xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
> xmlns:wsa="http://www.w3.org/2005/08/addressing">
> <env:Header />
> <env:Body>
> <wsnt:Subscribe
> xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
> xmlns:wsa="http://www.w3.org/2005/08/addressing"
> xmlns:enc="http://www.enc.com">
> <wsnt:ConsumerReference>
> <wsa:Address>
> http://localhost:8090/ENCWebService/services/ENC?http.soap=true
> </wsa:Address>
> </wsnt:ConsumerReference>
> <wsnt:Filter>
> <wsnt:TopicExpression
>
> Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">
> enc:encTopic1
> </wsnt:TopicExpression>
> <wsnt:MessageContent
> Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116">
> boolean(enc://event[@eventid="15"])
> </wsnt:MessageContent>
> </wsnt:Filter>
> </wsnt:Subscribe>
> </env:Body>
> </env:Envelope>
>
> <!------------------------------------------->
> <env:Envelope
> xmlns:env="http://www.w3.org/2003/05/soap-envelope"
> xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
> xmlns:wsa="http://www.w3.org/2005/08/addressing">
> <env:Header />
> <env:Body>
> <wsnt:Notify
> xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
> xmlns:wsa="http://www.w3.org/2005/08/addressing"
> xmlns:enc="http://www.enc.com">
> <wsnt:NotificationMessage>
> <wsnt:Topic
>
> Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">
> enc:encTopic1
> </wsnt:Topic>
> <wsnt:Message>
> <enc:event eventid="16" />
> </wsnt:Message>
> </wsnt:NotificationMessage>
> </wsnt:Notify>
> </env:Body>
> </env:Envelope>
> <!------------------------------------------->
>
>
> Please advise or comment.
>
>
>
>
--
View this message in context: http://www.nabble.com/WS-Notification%28wsn2005-component%29%3A-MessageContent-Filter-is-not-working-tp21293470p23175596.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.