Hello,
I am using a xml-based subscribe-notify framework called SES (OpenGIS Sensor Event Service). It has an xpath-based filtering capability to appropriately match a subscription with notifications.
Based on a subscription of:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
<soap:Header>
<wsa:To>http://localhost:8080/ses-main-1.0-SNAPSHOT/services/SesPortType</wsa:To>
<wsa:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action>
<wsa:MessageID>uuid:4e595160-185a-9b3c-3eb6-592c7c5b0c7a</wsa:MessageID>
<wsa:From>
<wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
</wsa:From>
</soap:Header>
<soap:Body>
<wsnt:Subscribe>
<wsnt:ConsumerReference>
<wsa:Address>http://localhost:8082/</wsa:Address>
</wsnt:ConsumerReference>
<wsnt:Filter>
<wsnt:MessageContent Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116">//om:procedure@xlink:href='urn:eu:fp7:genesis:procedure:aircraft_A'</wsnt:MessageContent>
</wsnt:Filter>
</wsnt:Subscribe>
</soap:Body>
</soap:Envelope>
where you see the filter (in bold: wsnt:Filter). I was thinking that xpath expression I defined would have resolved to "true" for a notification with the following structure:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
<soap:Header>
<wsa:To>http://localhost:8080/ses-main-1.0-SNAPSHOT/services/SesPortType</wsa:To>
<wsa:Action>http://docs.oasis-open.org/wsn/bw-2/NotificationConsumer/Notify</wsa:Action>
<wsa:MessageID>uuid:1b4d3025-f80a-a5b6-aa37-864c47fa1a7e</wsa:MessageID>
<wsa:From>
<wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
</wsa:From>
</soap:Header>
<soap:Body>
<wsnt:Notify>
<wsnt:NotificationMessage>
<wsnt:Topic Dialect="http://docs.oasis-open.org/wsn/t-1/TopicExpression/Simple">
IntegratedHealthIndex
</wsnt:Topic>
<wsnt:Message>
<om:Observation gml:id="o211" xmlns:om="http://www.opengis.net/om/1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sa="http://www.opengis.net/sampling/1.0" xsi:schemaLocation="http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/om.xsd http://www.opengis.net/sampling/1.0 http://schemas.opengis.net/sampling/1.0.0/sampling.xsd">
<om:samplingTime>
<gml:TimeInstant xsi:type="gml:TimeInstantType">
<gml:timePosition>2009-05-30T01:00:00+02:00</gml:timePosition>
</gml:TimeInstant>
</om:samplingTime>
<om:procedure xlink:href="urn:eu:fp7:genesis:procedure:aircraft_A"/>
<om:observedProperty xlink:href="urn:eu:fp7:genesis:property:position"/>
<om:featureOfInterest>
<sa:SamplingPoint gml:id="Pos_A_01">
<gml:name>Aircraft_B_Position</gml:name>
<sa:sampledFeature xlink:href=""/>
<sa:position>
<gml:Point>
<gml:pos srsName="urn:ogc:crs:epsg:4326">-119.853 40.817</gml:pos>
</gml:Point>
</sa:position>
</sa:SamplingPoint>
</om:featureOfInterest>
<om:result>position</om:result>
</om:Observation>
</wsnt:Message>
</wsnt:NotificationMessage>
</wsnt:Notify>
</soap:Body>
</soap:Envelope>
and forwarding the corresponding notification to the appropriate consumer.
Just as a sanity check, I can indeed get the notification forwarded appropriately when I make the filter wide-open using:
Code:
<wsnt:Filter>
<wsnt:MessageContent Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116">*</wsnt:MessageContent>
</wsnt:Filter>
however, my slightly-more-constrained filter is generating no forwarded notifications. I am hoping someone might see something obviously wrong with my xpath expression, or else be able to give me some tips. Any reply is appreciated. Thank you!