Using WS-Addressing SPS Examples Scenario
Copyright © 2011 Open Geospatial Consortium 173
The meaning of the header fields is as follows: • wsa:To – address of the intended receiver of this message
• wsa:Action – uniquely identifies the semantics implied by this message; in this example it tells the service that the SPS GetCapabilities operation is invoked
• wsa:ReplyTo – the address of the endpoint where the response is expected to be sent to; in this example the response shall be sent asynchronously
• wsa:MessageID – a unique identifier for the message which is also used in the response sent by the service later on so that the client knows to which request an
incoming – asynchronously sent – response refers to The according reply would look like shown in the following listing.
Listing 51 – Capabilities example using WS-Addressing header information
soap12:Envelope xmlns:soap12
= http:www.w3.org200305soap-envelope
xsi:schemaLocation =
http:www.w3.org200305soap-envelope http:www.w3.org200305soap-envelopesoap-envelope.xsd
http:www.opengis.netsps2.0 http:schemas.opengis.netsps2.0sps.xsd http:www.w3.org200508addressing http:www.w3.org200508addressingws-addr.xsd
xmlns:sps =
http:www.opengis.netsps2.0 xmlns:xlink
= http:www.w3.org1999xlink
xmlns:wsa =
http:www.w3.org200508addressing xmlns:xsi
= http:www.w3.org2001XMLSchema-instance
xmlns:ows =
http:www.opengis.netows1.1 xmlns:gml
= http:www.opengis.netgml3.2
xmlns:swes =
http:www.opengis.netswes2.0 xmlns:wstop
= http:docs.oasis-
open.orgwsnt-1 soap12:Header
wsa:To http:my.client.comclientmyReceiver
wsa:To wsa:Action
http:www.opengis.netsps2.0GetCapabilitiesResponse wsa:Action
wsa:RelatesTo http:my.client.comuidmsg-0010
wsa:RelatesTo soap12:Header
soap12:Body -- like shown in Listing 11--
soap12:Body soap12:Envelope
As we can see, the wsa:To has the value of the wsa:ReplyTo header field from the request shown in Listing 50 – same for the wsa:RelatesTo element which has the value of
the wsa:MessageID from the request. The wsa:Action is now used to convey the information that the SOAP message contains the response to an SPS GetCapabilities
invocation.
The Subscribe request as shown in Listing 45 can also be augmented with WS- Addressing header information.
174 Copyright © 2011 Open Geospatial Consortium
Listing 52 – Subscribe example using WS-Addressing header information
soap12:Envelope xmlns:soap12
= http:www.w3.org200305soap-envelope
xmlns:sps =
http:www.opengis.netsps2.0 xmlns:wsa
= http:www.w3.org200508addressing
xmlns:xsi =
http:www.w3.org2001XMLSchema-instance xmlns:ows
= http:www.opengis.netows1.1
xmlns:wsn-b =
http:docs.oasis-open.orgwsnb- 2
soap12:Header wsa:To
http:www.ogc.orgSPSProducer wsa:To
wsa:Action http:docs.oasis-open.orgwsnbw-
2NotificationProducerSubscribeRequest wsa:Action
wsa:ReplyTo wsa:Address
http:my.client.comclientmyReceiver wsa:Address
wsa:ReplyTo wsa:MessageID
http:my.client.comuidmsg-Sub1 wsa:MessageID
soap12:Header soap12:Body
wsn-b:Subscribe wsn-b:ConsumerReference
wsa:Address http:my.client.comclientmyNotificationConsumer
wsa:Address wsn-b:ConsumerReference
wsn-b:Filter -- omitted for brevity --
wsn-b:Filter wsn-b:Subscribe
soap12:Body soap12:Envelope
Note that the wsa:ReplyTo in the header only defines where the response to the Subscribe request is to be sent to. The value of the wsn-b:ConsumerReferencewsa:Address element
in the soap12:Body defines where the notifications of events matching the subscription are to be sent to. The following listing shows an example response for this request.
Listing 53 – SubscribeResponse example using WS-Addressing header information
soap12:Envelope xmlns:soap12
= http:www.w3.org200305soap-envelope
xmlns:wsa =
http:www.w3.org200508addressing xmlns:xsi
= http:www.w3.org2001XMLSchema-instance
xmlns:wsn-b =
http:docs.oasis- open.orgwsnb-2
soap12:Header wsa:To
http:my.client.comclientmyReceiver wsa:To
wsa:Action http:docs.oasis-open.orgwsnbw-
2NotificationProducerSubscribeResponse wsa:Action
wsa:RelatesTo http:my.client.comuidmsg-Sub1
wsa:RelatesTo soap12:Header
soap12:Body -- as shown in Listing 46--
soap12:Body soap12:Envelope
The exceptions shown in Listing 42 to Listing 44 would be modified as shown in Listing 54 to Listing 56. Note that the wsa:Action is different in the following listings as the
exceptions shown are defined by OWS Common, the SWE Service Model and the this standard.
Copyright © 2011 Open Geospatial Consortium 175
Listing 54 – StatusInformationExpired exception with WS-Addressing header information
soap12:Envelope xmlns:soap12
= http:www.w3.org200305soap-envelope
xmlns:sps =
http:www.opengis.netsps2.0 xmlns:wsa
= http:www.w3.org200508addressing
xmlns:xsi =
http:www.w3.org2001XMLSchema-instance xmlns:ows
= http:www.opengis.netows1.1
soap12:Header wsa:To
http:my.client.comclientmyReceiver wsa:To
wsa:Action http:www.opengis.netsps2.0Exception
wsa:Action wsa:RelatesTo
http:my.client.comuidmsg-0040 wsa:RelatesTo
soap12:Header soap12:Body
soap12:Fault soap12:Code
soap12:Value soap12:Receiver
soap12:Value soap12:Subcode
soap12:Value sps:StatusInformationExpired
soap12:Value soap12:Subcode
soap12:Code -- rest as shown in Listing 42--
soap12:Fault soap12:Body
soap12:Envelope
Listing 55 – InvalidRequest exception with WS-Addressing header information
soap12:Envelope xmlns:soap12
= http:www.w3.org200305soap-envelope
xmlns:sps =
http:www.opengis.netsps2.0 xmlns:wsa
= http:www.w3.org200508addressing
xmlns:xsi =
http:www.w3.org2001XMLSchema-instance xmlns:ows
= http:www.opengis.netows1.1
xmlns:swes =
http:www.opengis.netswes2.0 soap12:Header
wsa:To http:my.client.comclientmyReceiver
wsa:To wsa:Action
http:www.opengis.netswes2.0Exception wsa:Action
wsa:RelatesTo http:my.client.comuidmsg-0030
wsa:RelatesTo soap12:Header
soap12:Body soap12:Fault
soap12:Code soap12:Value
soap12:Sender soap12:Value
soap12:Subcode soap12:Value
swes:InvalidRequest soap12:Value
soap12:Subcode soap12:Code
-- rest as shown in Listing 43-- soap12:Body
soap12:Envelope
176 Copyright © 2011 Open Geospatial Consortium
Listing 56 – InvalidParameterValue exception with WS-Addressing header information
soap12:Envelope xmlns:soap12
= http:www.w3.org200305soap-envelope
xmlns:sps =
http:www.opengis.netsps2.0 xmlns:wsa
= http:www.w3.org200508addressing
xmlns:xsi =
http:www.w3.org2001XMLSchema-instance xmlns:ows
= http:www.opengis.netows1.1
soap12:Header wsa:To
http:my.client.comclientmyReceiver wsa:To
wsa:Action http:www.opengis.netows1.1Exception
wsa:Action wsa:RelatesTo
http:my.client.comuidmsg-0020 wsa:RelatesTo
soap12:Header soap12:Body
soap12:Fault soap12:Code
soap12:Value soap12:Sender
soap12:Value soap12:Subcode
soap12:Value ows:InvalidParameterValue
soap12:Value soap12:Subcode
soap12:Code -- rest as shown in Listing 44--
soap12:Body soap12:Envelope
Copyright © 2011 Open Geospatial Consortium 177
10 SPS TaskTasking Request State Machine Documentation
Requirement http:www.opengis.netspecSPS2.0reqBehaviour
REQ 115. Any SPS shall implement a behavior for handling tasks and
tasking requests as defined by the state machines described in
this clause 10. Each state machine is documented with diagrams representing the state machine,
followed by a documentation of the states that are part of the state machine. For each state, the incoming and outgoing connections are documented.
Finally, all triggers and the event that causes the activation of a trigger are documented. A trigger may have a specific effect, which in the case of SPS is to notify interested
clients about the event Notify. A service that implements according notification functionality – for SPS per default via a publishsubscribe interface – can inform clients
about these events; see clause 8 for further details.