Web Services Resource Framework resource property and lifecycle operations
The Web Services Resource Framework (WSRF) contains specifications that describe the operations that a Web Services Resource (WS-Resource) can implement to get, set, or query the state of the resource by operating on the resource properties document.
For a complete description of all the standard property and lifetime operations that are defined by the Web Services Resource Framework (WSRF), see the WS-ResourceProperties and WS-ResourceLifetime specifications. The principle WSRF operations that a Web Services Resource (WS-Resource) can support are described in the following table.
Table 1. Principle WSRF operations that are supported by WS-Resources Operation Description GetResourcePropertyDocument Returns the entire resource properties document for the WS-Resource.
- Message format
<wsrf-rp:GetResourcePropertyDocument/>- Response format
<wsrf-rp:GetResourcePropertyDocumentResponse> {any} </wsrf-rp:GetResourcePropertyDocumentResponse>where {any} is the content of the resource properties document.PutResourcePropertyDocument Replaces the entire resource properties document for the WS-Resource with the document specified.
- Message format
<wsrf-rp:PutResourcePropertyDocument> {any} </wsrf-rp:PutResourcePropertyDocument>where {any} is the content of the new resource properties document.- Response format
<wsrf-rp:PutResourcePropertyDocumentResponse> {any} ? </wsrf-rp:PutResourcePropertyDocumentResponse>where {any} is the content of the new resource properties document. If the content is the same as the requested content, then the {any} element must not be present.GetResourceProperty Returns the value or values of the specified resource property found within the resource properties document for the WS-Resource.
- Message format
<wsrf-rp:GetResourceProperty> QName </wsrf-rp:GetResourceProperty>- Response format
<wsrf-rp:GetResourcePropertyResponse> {any}* </wsrf-rp:GetResourcePropertyResponse>where {any}* is a sequence of elements that match the QName specified in the request.GetMultipleResourceProperties Returns the value or values of the specified resource properties found within the resource properties document for the WS-Resource.
- Message format
<wsrf-rp:GetMultipleResourceProperties> <wsrf-rp:ResourceProperty>QName<wsrf-rp:ResourceProperty>+ </wsrf-rp:GetMultipleResourceProperties>- Response format
<wsrf-rp:GetMultipleResourcePropertiesResponse> {any}* </wsrf-rp:GetMultipleResourcePropertiesResponse>where {any}* is a sequence of elements that match the QNames specified in the request.InsertResourceProperties Inserts the resource property elements specified into the resource properties document for the WS-Resource.
- Message format
<wsrf-rp:InsertResourceProperties> <wsrf-rp:Insert> {any}* </wsrf-rp:Insert> </wsrf-rp:InsertResourceProperties>where {any}* is a sequence of elements with the same QName.- Response format
<wsrf-rp:InsertResourcePropertiesResponse/>UpdateResourceProperties Updates the resource property elements specified into the resource properties document for the WS-Resource.
- Message format
<wsrf-rp:UpateResourceProperties> <wsrf-rp:Upate> {any}* </wsrf-rp:Upate> </wsrf-rp:UpateResourceProperties>where {any}* is a sequence of elements with the same QName.- Response format
<wsrf-rp:UpateResourcePropertiesResponse/>DeleteResourceProperties Deletes the resource property elements specified from the resource properties document for the WS-Resource.
- Message format
<wsrf-rp:DeleteResourceProperties> <wsrf-rp:Delete ResourceProperty="QName"/> </wsrf-rp:DeleteResourceProperties>where QName is the QName of the resource property to delete.- Response format
<wsrf-rp:DeleteResourcePropertiesResponse/>QueryResourceProperties Query the resource properties document using a query expression, such as XPath.
- Message format
<wsrf-rp:QueryResourceProperties> <wsrf-rp:QueryExpression Dialect="http://www.w3.org/TR/1999/REC-xpath-19991116"> xsd:any </wsrf-rp:QueryExpression> </wsrf-rp:QueryResourceProperties>where xsd:any is the XPath query expression to apply to the resource properties document.- Response format
<wsrf-rp:QueryResourcePropertiesResponse> {any} </wsrf-rp:QueryResourcePropertiesResponse>where {any} is the result of evaluating the query expression against the resource properties document.Destroy Destroys the WS-Resource.
- Message format
<wsrf-rl:Destroy/>- Response format
<wsrf-rl:DestroyResponse/>This response indicates successful destruction of the WS-Resource.SetTerminationTime WS-Resources that support scheduled termination can implement this operation to allow a requester to change the time at which the WS-Resource destroys itself.
- Message format
<wsrf-rl:SetTerminationTime> [<wsrf-rl:RequestedTerminationTime> xsd:dateTime </wsrf-rl:RequestedTerminationTime>] | [<wsrf-rl:RequestedLifetimeDuration> xsd:duration </wsrf-rl:RequestedLifetimeDuration>] </wsrf-rl:SetTerminationTime>where the termination time is either an absolute time or a relative duration.- Response format
<wsrf-rl:SetTerminationTimeResponse> <wsrf-rl:NewTerminationTime> xsd:dateTime </wsrf-rl:NewTerminationTime> <wsrf-rl:CurrentTime> xsd:dateTime </wsrf-rl:CurrentTime> <wsrf-rl:SetTerminationTimeResponse>This response contains the time, from the perspective of the WS-Resource, when the WS-Resource destroys itself. The response also contains the WS-Resource's value of the current time.A variety of ways exist in which a WS-Resource can implement scheduled destruction. For example, a WS-Resource that is implemented as an enterprise bean might use the enterprise bean container timer service by implementing the ejbTimeout callback method of the javax.ejb.TimedObject interface, and by creating a Timer object that expires at the scheduled destruction time and drives this callback method. EJB timer service Timer objects are persistent and survive server restarts, and are therefore a simple means to manage the lifecycle of WS-Resources that have a finite lifecycle and require a time-based destruction mechanism.
Related concepts
Web Services Addressing support
Web Services Resource Framework support
Related tasks
Creating stateful Web services using the Web Services Resource Framework
Reference topic