168 Copyright © 2011 Open Geospatial Consortium
Listing 43 - InvalidRequest exception example
soap12:Envelope xmlns:soap12
= http:www.w3.org200305soap-envelope
xmlns:sps =
http:www.opengis.netsps2.0 xmlns:xsi
= http:www.w3.org2001XMLSchema-instance
xmlns:ows =
http:www.opengis.netows1.1 xmlns:swes
= http:www.opengis.netswes2.0
soap12:Body soap12:Fault
soap12:Code soap12:Value
soap12:Sender soap12:Value
soap12:Subcode soap12:Value
swes:InvalidRequest soap12:Value
soap12:Subcode soap12:Code
soap12:Reason soap12:Text
xml:lang =
en The request did not conform to its XML Schema
definition. soap12:Text
soap12:Reason soap12:Detail
ows:Exception exceptionCode
= InvalidRequest
locator =
element sps:extension is not expected after element sps:GetStatussps:task
soap12:Detail soap12:Fault
soap12:Body soap12:Envelope
If the client sent a GetStatus request with a task identifier that is unknown to the service then the service returns an InvalidParameterValue exception like the following:
Listing 44 - InvalidParameterValue exception example
soap12:Envelope xmlns:soap12
= http:www.w3.org200305soap-envelope
xmlns:sps =
http:www.opengis.netsps2.0 xmlns:xsi
= http:www.w3.org2001XMLSchema-
instance xmlns:ows
= http:www.opengis.netows1.1
soap12:Body soap12:Fault
soap12:Code soap12:Value
soap12:Sender soap12:Value
soap12:Subcode soap12:Value
ows:InvalidParameterValue soap12:Value
soap12:Subcode soap12:Code
soap12:Reason soap12:Text
xml:lang =
en The request contained an invalid parameter
value. soap12:Text
soap12:Reason soap12:Detail
ows:Exception exceptionCode
= InvalidParameterValue
locator =
task ows:ExceptionText
The requested task tasking request is unknown to the service.
ows:ExceptionText ows:Exception
soap12:Detail soap12:Fault
soap12:Body soap12:Envelope
9.6.8 Notifications
As the service realizes publish subscribe functionality, the client may subscribe for notifications published by the service. The following examples are about notifications
published for the submitted task and an according subscription.
2010-08-20T11:12:05+02:00 - Right after it received the SubmitResponse telling him that the service accepted its tasking request, the client subscribes to notifications for the
Copyright © 2011 Open Geospatial Consortium 169
task that is in execution. It sends the according Subscribe request to the producer endpoint stated by the SPS in the notifications section of its Capabilities document.
Listing 45 - Subscribe request example
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:wsn-b
= http:docs.oasis-open.orgwsnb-2
soap12:Body wsn-b:Subscribe
wsn-b:ConsumerReference wsa:Address
http:my.client.comclientmyNotificationConsumer wsa:Address
wsn-b:ConsumerReference wsn-b:Filter
wsn-b:TopicExpression Dialect
= http:www.w3.orgTR1999REC-xpath-
19991116 sps:TaskEvent[wstop:topic=true]
wsn-b:TopicExpression wsn-b:MessageContent
Dialect =
http:www.w3.orgTR1999REC-xpath- 19991116
boolean[sps:task = http:www.ogc.orgprocedurecamera1tasks6] wsn-
b:MessageContent wsn-b:Filter
wsn-b:Subscribe soap12:Body
soap12:Envelope
2010-08-20T11:12:06+02:00 - The service sends a response indicating that the subscription will last until 2010-08-20T14:31:00+02:00.
This time is shortly after the requested task end time. Note, however, that in WS- Notification the choice of the actual termination time depends upon the actual service
implementation if no specific time was requested by the client. Although the way the default choice for termination time of a task as shown in this example is a useful pattern,
the SPS specification does not state requirements concerning the duration of a task or the termination time of subscriptions that may target notifications published for it. Such
requirements could be defined in an SPS extension.
Listing 46 - Subscribe response example
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:Body
wsn-b:SubscribeResponse wsn-b:SubscriptionReference
wsa:Address http:www.ogc.orgSPSProducersubscriptions792
wsa:Address wsn-b:SubscriptionReference
wsn-b:TerminationTime 2010-08-20T14:31:00+02:00
wsn-b:TerminationTime wsn-b:SubscribeResponse
soap12:Body soap12:Envelope
Following the examples given so far, the service would have published the following notifications for the task the client targeted in its subscription: a notification for a
TaskingRequestAccepted task was submitted, DataPublished and for a TaskCompleted event