55
Transaction Processing CS409 Application Services Even Semester 2007

Transaction Processing CS409 Application Services Even Semester 2007

Embed Size (px)

Citation preview

Page 1: Transaction Processing CS409 Application Services Even Semester 2007

Transaction Processing

CS409 Application ServicesEven Semester 2007

Page 2: Transaction Processing CS409 Application Services Even Semester 2007

2

What is Transaction Processing?

• The ability of a software application to do state management for the features or transactions it performs.

• A state is a set of persistent data that have longer lifetime than a single request/response exchange between the information requestor and provider.

• A stateful resource is something that exists even when you're not interacting with it.

Page 3: Transaction Processing CS409 Application Services Even Semester 2007

3

• Samples of state:– An airline reservation system:

• Query the status of flights, price, seating arrangement, etc.• Maintain the status of user request until displaying the result.

– An e-store:• Maintain the current state of request for quote, creating

purchase order, generate invoice, etc.• Monitor user’s status between request for transaction and

giving out reference number.

• Sample of stateful resource:– a database, as a resource, still exist even when you're

not querying it.

Transaction Processing Examples

Page 4: Transaction Processing CS409 Application Services Even Semester 2007

4

Aspect of Stateful Resource

• How it is identified and referenced throughout a system.

• How message can be sent to it to query its values or to act upon.

• How it is created and terminated.– what is the limit?

• How can we modify the elements of it.

Page 5: Transaction Processing CS409 Application Services Even Semester 2007

5

Why Should We Care?

• Each application deal with stateful resources in different way.

• Lack of standard convention.

• Limited reusable, best-practice, tools and concept for the industry.

• Consequence: higher integration cost between systems that deal with stateful resources.

Page 6: Transaction Processing CS409 Application Services Even Semester 2007

6

What does WS-* Offer?

• WS-Resource framework.

• WS-Notification framework.

• Additional transaction management frameworks:

– WS-Coordination framework.– WS-Transactions framework.

Page 7: Transaction Processing CS409 Application Services Even Semester 2007

7

WS-* and Transaction Processing

WS-

Serv

ice

Gro

up

WS-RenewableReferences

WS-N

oti

fica

tion

Modeling Stateful Resources with Web

Services

WS-B

ase Faults

WS-ResourceProperties

WS-R

eso

urce

Lifetim

e

Page 8: Transaction Processing CS409 Application Services Even Semester 2007

8

WS-Resource

• A standard specification approach for modeling stateful resources using web services.

• Is the combination of a Web service and a stateful resource on which it acts.

• Example:– A system that manages group of satellites.– Each satellite is a stateful resource.– The system has web service that provide satellite

functions such as change orientation, change location, get information, etc.

– Satellite + Web Service = WS-Resource !

Page 9: Transaction Processing CS409 Application Services Even Semester 2007

9

WS-Resource (2)

• WS-Resource is actually a series of specifications that define standard “message patterns” = ways to request the value of properties and specify how it should be altered.

• WS-Resource consists of: WS-ResourceProperties WS-ResourceLifetime WS-ServiceGroup WS-RenewableReferences WS-BaseFaults.

Page 10: Transaction Processing CS409 Application Services Even Semester 2007

10

WS-ResourceProperties

• Outlines how elements of a WS-Resource’s state are modeled in XML and accessed through Web services.

• It specifies:– How resource properties are defined in a

WSDL file.– The form of messages that request and

receive the values of these properties.– How to change, add, and remove properties

from a WS-Resource.

Page 11: Transaction Processing CS409 Application Services Even Semester 2007

11

WS-ResourceProperties Case

• Suppose our satellite has the following properties:Describing position - latitude, longitude, altitude.

Describing orientation - pitch, yaw, roll.Describing its focus - focalLength, currentView.

Page 12: Transaction Processing CS409 Application Services Even Semester 2007

12

WS-ResourceProperties Case (2)

• The satellite has web services with WSDL:<?xml version="1.0"?><definitions name="Satellite“ targetNamespace="http://example.com/satellite.wsdl" xmlns:tns="http://example.com/satellite.wsdl" xmlns:satTypes="http://example.com/satellite.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <types> <schema targetNamespace="http://example.com/satellite.xsd" xmlns="http://www.w3.org/2000/10/XMLSchema"> <element name="SetAltitudeRequest"> <complexType> <all> <element name="altitude" type="float"/> </all> </complexType> </element> <element name="SetAltitudeResponse"> <complexType> <all> <element name="result" type="string"/> </all> </complexType> </element> </schema> </types>

Page 13: Transaction Processing CS409 Application Services Even Semester 2007

13

WS-ResourceProperties Case (3)

• … WSDL continues: <message name="SetAltitudeInput">

<!-- Is the message sent by the client as the input to the provider -->

<part name="body" element="satTypes:SetAltitudeRequest"/>

<!-- The message contains SetAltitudeRequest element with type float -->

</message>

<message name="SetAltitudeOutput">

<!-- Is the response message sent by the provider to the client -->

<part name="body" element="satTypes:SetAltitudeResponse"/>

<!-- The message contains SetAltitudeResponse element with type string -->

</message>

Page 14: Transaction Processing CS409 Application Services Even Semester 2007

14

WS-ResourceProperties Case (4)

• … WSDL continues:

<portType name="AltitudePortType">

<!-- Defining portType to define what can be done by the service -->

<!-- The portType has only single operation -->

<operation name="SetAltitude">

<!-- The operation has one input and one output message -->

<input message="tns:SetAltitudeInput“

<!-- Specifies the final destination of the input message -->

wsa:Action="http://example.com/SetAltitude" />

<output message="tns:SetAltitudeOutput“

<!-- Specifies the originator of the output message -->

wsa:Action="http://example.com/SetAltitudeResponse" />

</operation>

</portType>

Page 15: Transaction Processing CS409 Application Services Even Semester 2007

15

WS-ResourceProperties Case (5)

• … WSDL continues: <binding name="AltitudeSoapBinding" type="tns:AltitudePortType"> <!-- Create a binding to describe how the service should be done --> <soap:binding style="document“ transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="SetAltitude"> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> </binding> <service name="SatelliteService"> <!-- Attach the binding to an actual service --> <port name="AltitudePort" binding="tns:AltitudeSoapBinding"> <soap:address location="http://example.com/satellite"/> </port> </service></definitions>

Page 16: Transaction Processing CS409 Application Services Even Semester 2007

16

WS-ResourceProperties Case (6)

• WSDL explained:– There is only one service, SatelliteService.– The service has single port, AltitudePort, which

defines that the SOAP message should be sent to http://example.com/satellite.

– How to send the SOAP message? Look at the binding of the port, the AltitudeSoapBinding.

– AltitudeSoapBinding is the implementation of AltitudePortType, which has one operation with one input and one output message using format “document/literal” style.

Page 17: Transaction Processing CS409 Application Services Even Semester 2007

17

WS-ResourceProperties Case (7)

• Possible types of WS-Resources for the satellite:– A service that sets or retrieves the altitude of

the satellite.– A service that sets or retrieves the location or

orientation of the satellite.– A service that provides access to a process

that counts the stars in the view of the satellite.

Page 18: Transaction Processing CS409 Application Services Even Semester 2007

18

WS-ResourceProperties Case (8)

• Merging the resource properties in the WSDL:

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="Satellite“ targetNamespace="http://example.com/satellite“

. . .

xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd“>

<wsdl:import namespace="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl“ location="WS-ResourceProperties.wsdl" />

<types>

. . .

<xsd:schema targetNamespace="http://example.com/satellite"

xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:import namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing„

schemaLocation="WS-Addressing.xsd" />

Page 19: Transaction Processing CS409 Application Services Even Semester 2007

19

WS-ResourceProperties Case (9)

• … WSDL continues: <xsd:element name="createSatellite">

<xsd:complexType/>

</xsd:element>

<xsd:element name="createSatelliteResponse">

<xsd:complexType>

<xsd:sequence>

<xsd:element ref="wsa:EndpointReference"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="latitude" type="xsd:float" />

<xsd:element name="longitude" type="xsd:float" />

<xsd:element name="altitude" type="xsd:float" />

<xsd:element name="pitch" type="xsd:float" />

<xsd:element name="yaw" type="xsd:float" />

<xsd:element name="roll" type="xsd:float" />

<xsd:element name="focalLength" type="xsd:float" />

<xsd:element name="currentView" type="xsd:string" />

Page 20: Transaction Processing CS409 Application Services Even Semester 2007

20

WS-ResourceProperties Case (10)

• … WSDL continues: <xsd:element name="GenericSatelliteProperties"> <xsd:complexType> <xsd:sequence> <xsd:element ref="latitude" minOccurs="1“ maxOccurs="1"/> <xsd:element ref="longitude" minOccurs="1“ maxOccurs="1"/> <xsd:element ref="altitude" minOccurs="1“ maxOccurs="1"/> <xsd:element ref="pitch" minOccurs="1“ maxOccurs="1"/> <xsd:element ref="yaw" minOccurs="1“ maxOccurs="1"/> <xsd:element ref="roll" minOccurs="1“ maxOccurs="1"/> <xsd:element ref="focalLength" minOccurs="1“ maxOccurs="1"/> <xsd:element ref="currentView" minOccurs="1“ maxOccurs="1"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </types> <message name="CreateSatelliteRequest"> <part name="request" element="tns:createSatellite"/> </message> <message name="CreateSatelliteResponse"> <part name="response" element="tns:createSatelliteResponse"/> </message>

Page 21: Transaction Processing CS409 Application Services Even Semester 2007

21

WS-ResourceProperties Case (11)

• … WSDL continues: <portType name=“SatellitePortType“ wsrp:ResourceProperties="tns:GenericSatelliteProperties"> <!-- Defining portType to define what can be done by the service --> <!-- any operations are performed on a particular type of stateful resource, as defined by a GenericSatelliteProperties element.--> </portType> <binding name="SatelliteSoapBinding“ type="tns:SatellitePortType"> <soap:binding style="document“ transport="http://schemas.xmlsoap.org/soap/http"/> <!-- Create a binding to describe how the service should be done --> </binding> <service name="SatelliteService"> <!-- Attach the binding to an actual service --> . . . <port name="SatellitePort“ binding="tns:SatelliteSoapBinding"> <soap:address location="http://example.com/satellite"/> </port> </service></definitions>

Page 22: Transaction Processing CS409 Application Services Even Semester 2007

22

WS-ResourceProperties Case (12)

• Creating a WS-Resource instance:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft-01.xsd">

<SOAP-ENV:Header>...</SOAP-ENV:Header>

<SOAP-ENV:Body>

<createSatellite xmlns="http://example.com/satellite"/>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 23: Transaction Processing CS409 Application Services Even Semester 2007

23

WS-ResourceProperties Case (13)

• Response from creating a WS-Resource instance:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft-

01.xsd“ xmlns:wsa="http://www.w3.org/2005/02/addressing"> <SOAP-ENV:Header>...</SOAP-ENV:Header> <SOAP-ENV:Body> <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/02/addressing" xmlns:sat="http://example.org/satelliteSystem"> <wsa:Address>http://example.com/satellite</wsa:Address> <wsa:ReferenceProperties> <sat:SatelliteId>SAT9928</sat:SatelliteId> </wsa:ReferenceProperties> </wsa:EndpointReference> </SOAP-ENV:Body></SOAP-ENV:Envelope>

Page 24: Transaction Processing CS409 Application Services Even Semester 2007

24

WS-ResourceProperties Case (14)

• Requesting a resource property:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft-01.xsd">

<SOAP-ENV:Header>...</SOAP-ENV:Header>

<SOAP-ENV:Body>

<wsrp:GetResourceProperty xmlns:satProp="http://example.com/satellite">

satProp:altitude

</wsrp:GetResourceProperty>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 25: Transaction Processing CS409 Application Services Even Semester 2007

25

WS-ResourceProperties Case (12)

• Receiving a resource property:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft-01.xsd">

<SOAP-ENV:Header>...</SOAP-ENV:Header>

<SOAP-ENV:Body>

<wsrp:GetResourcePropertyResponse xmlns:satProp="http://example.com/satellite">

<satProp:altitude>47700</satProp:altitude>

</wsrp:GetResourcePropertyResponse>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 26: Transaction Processing CS409 Application Services Even Semester 2007

26

WS-ResourceProperties Case (13)

• Adding a resource property:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft-01.xsd">

<SOAP-ENV:Header>...</SOAP-ENV:Header>

<SOAP-ENV:Body>

<wsrp:SetResourceProperties xmlns:satProp="http://example.com/satellite">

<wsrp:Insert>

<satProp:targetCoords>36n11, 115w08</satProp:targetCoords>

</wsrp:Insert>

</wsrp:SetResourceProperties>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 27: Transaction Processing CS409 Application Services Even Semester 2007

27

WS-ResourceProperties Case (14)

• Deleting a resource property:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft-01.xsd">

<SOAP-ENV:Header>...</SOAP-ENV:Header>

<SOAP-ENV:Body>

<wsrp:SetResourceProperties xmlns:satProp="http://example.com/satellite">

<wsrp:Delete resourceProperty="targetCoords"/>

</wsrp:SetResourceProperties>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 28: Transaction Processing CS409 Application Services Even Semester 2007

28

WS-ResourceProperties Case (15)

• Changing a property value:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WSResourceProperties-1.2-draft-01.xsd">

<SOAP-ENV:Header>...</SOAP-ENV:Header>

<SOAP-ENV:Body>

<wsrp:SetResourceProperties xmlns:satProp="http://example.com/satellite">

<wsrp:Update>

<satProp:latitude>36.11</satProp:latitude>

</wsrp:Update>

<wsrp:Update>

<satProp:longitude>158.08</satProp:latitude>

</wsrp:Update>

</wsrp:SetResourceProperties>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 29: Transaction Processing CS409 Application Services Even Semester 2007

29

WS-ResourceLifetime

• Specifies the situation in which a WS-Resource needs to expire or be explicitly destroyed when it is no longer needed.

• To limit a resource for only existed in a specified period of time, no matter if any processes still connected to the system.

• Destruction can be done immediately or scheduled.

Page 30: Transaction Processing CS409 Application Services Even Semester 2007

30

WS-ResourceLifetime Case

• Destroying a WS-Resource instance:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd“

xmlns:wsa="http://www.w3.org/2005/02/addressing">

<SOAP-ENV:Header>

<wsa:Action>

http://docs.oasis-open.org/wsrf/2004/06/WS-ResourceLifetime/Destroy

</wsa:Action>

<wsa:To SOAP-ENV:mustUnderstand="1">

http://example.com/satellite

</wsa:To>

<sat:SatelliteId>SAT9928</sat:SatelliteId>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<wsrl:Destroy />

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 31: Transaction Processing CS409 Application Services Even Semester 2007

31

WS-ResourceLifetime Case (2)

• Acknowledgement of destroying a WS-Resource instance:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-

01.xsd“ xmlns:wsa="http://www.w3.org/2005/02/addressing"> <SOAP-ENV:Header> <wsa:Action> http://docs.oasis-open.org/wsrf/2004/06/WS-ResourceLifetime/DestroyResponse </wsa:Action> <wsa:To SOAP-ENV:mustUnderstand="1"> http://example.com/myClient </wsa:To> </SOAP-ENV:Header> <SOAP-ENV:Body> <wsrl:DestroyResponse /> </SOAP-ENV:Body></SOAP-ENV:Envelope>

Page 32: Transaction Processing CS409 Application Services Even Semester 2007

32

WS-ResourceLifetime Case (3)• Set termination time of an instance:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-

01.xsd“ xmlns:wsa="http://www.w3.org/2005/02/addressing"> <SOAP-ENV:Header> <wsa:Action> http://docs.oasis-open.org/wsrf/2004/06/WS-ResourceLifetime/SetTerminationTime </wsa:Action> <wsa:To SOAP-ENV:mustUnderstand="1"> http://example.com/satellite </wsa:To> <sat:SatelliteId>SAT9928</sat:SatelliteId> </SOAP-ENV:Header> <SOAP-ENV:Body> <wsrl:SetTerminationTime> <wsrl:RequestedTerminationTime> 2005-2-15T07:24:00 </wsrl:RequestedTerminationTime> </wsrl:SetTerminationTime> </SOAP-ENV:Body></SOAP-ENV:Envelope>

Page 33: Transaction Processing CS409 Application Services Even Semester 2007

33

WS-ResourceLifetime Case (4)

• Response for set termination time:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsrl="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd“ xmlns:wsa="http://www.w3.org/2005/02/addressing"> <SOAP-ENV:Header> <wsa:Action> http://docs.oasis-open.org/wsrf/2004/06/WS-ResourceLifetime/SetTerminationTimeResponse </wsa:Action> <wsa:To SOAP-ENV:mustUnderstand="1"> http://example.com/myClient </wsa:To> </SOAP-ENV:Header> <SOAP-ENV:Body> <wsrl:SetTerminationTimeResponse> <wsrl:NewTerminationTime> 2005-2-15T07:24:00 </wsrl:NewTerminationTime> <wsrl:CurrentTime> 2005-2-15T03:25:08 </wsrl:CurrentTime> </wsrl:SetTerminationTimeResponse> </SOAP-ENV:Body></SOAP-ENV:Envelope>

Page 34: Transaction Processing CS409 Application Services Even Semester 2007

34

WS-ServiceGroup

• Defines a way to create a collection of Web services, such as a registry of available services.

• A ServiceGroup is a WS-Resource that groups together pointers to other WS-Resources and to plain Web services.

• Application can perform the same operations on a ServiceGroup that can be performed on any other WS-Resource, such as creating, destroying, or accessing its properties.

Page 35: Transaction Processing CS409 Application Services Even Semester 2007

35

WS-ServiceGroup Case

• Creating a service group:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

<SOAP-ENV:Header>...</SOAP-ENV:Header>

<SOAP-ENV:Body>

<createSatGroup xmlns="http://example.com/satellite"/>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 36: Transaction Processing CS409 Application Services Even Semester 2007

36

WS-ServiceGroup Case (2)• Response of creating a service group:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"

<SOAP-ENV:Header>...</SOAP-ENV:Header>

<SOAP-ENV:Body>

<createSatGroupResponse xmlns="http://example.com/satellite">

<wsa:EndpointReference

xmlns:wsa="http://www.w3.org/2005/02/addressing"

xmlns:sat="http://example.org/satelliteSystem">

<wsa:Address>http://example.com/satellite</wsa:Address>

<wsa:ReferenceProperties>

<sat:SatGroupId>

SATGRP3

</sat:SatGroupId>

</wsa:ReferenceProperties>

</wsa:EndpointReference>

</createSatGroupResponse>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 37: Transaction Processing CS409 Application Services Even Semester 2007

37

WS-ServiceGroup Case (3)• Adding membership content rule:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/“

xmlns:wsrp="http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-

draft-01.xsd"

<SOAP-ENV:Header>...</SOAP-ENV:Header>

<SOAP-ENV:Body>

<wsrp:SetResourceProperties

xmlns:satProp="http://example.com/satellite">

<wsrp:Insert>

<wssg:MembershipContentRule MemberInterface="sat:AuditedSatellitePortType"/>

</wsrp:Insert>

<wsrp:Insert>

<wssg:MembershipContentRule MemberInterface="sat:CounterPortType"

ContentElements="sat:audited" />

</wsrp:Insert>

<wsrp:Insert>

<wssg:MembershipContentRule ContentElements="sat:approvedBy" />

</wsrp:Insert>

</wsrp:SetResourceProperties>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 38: Transaction Processing CS409 Application Services Even Semester 2007

38

WS-ServiceGroup Case (4)• Adding a new entry into group:<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/“

xmlns:wssg=""http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ServiceGroup-1.2-draft-01.xsd">

<SOAP-ENV:Header>

<sat:SatGroupId>SATGRP3</sat:SatGroupId>

</SOAP-ENV:Header>

<SOAP-ENV:Body>

<wssg:Add>

<wssg:MemberEPR>

<wsa:Address>http://example.com/satellite</wsa:Address>

<wsa:ReferenceProperties>

<sat:SatelliteId>SAT8557</sat:SatelliteId>

</wsa:ReferenceProperties>

</wssg:MemberEPR>

<wssg:Content>

<sat:approvedBy>My Boss</sat:approvedBy>

</wssg:Content>

</wssg:Add>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

Page 39: Transaction Processing CS409 Application Services Even Semester 2007

39

WS-BaseFaults

• Defines a standard way of indicating errors in a WS-Resource based application.

• Defines a basic format for standard errors, then provides a way to extend that basic format for more specific purposes without losing the original structure.

Page 40: Transaction Processing CS409 Application Services Even Semester 2007

40

WS-BaseFaults (2)

• Examples of errors:– Clients are requesting WS-Resources that do

not exist.– Clients are adding them to ServiceGroups for

which they do not qualify.– Clients are creating XPath expressions for

multiple queries that aren't really XPath expressions.

Page 41: Transaction Processing CS409 Application Services Even Semester 2007

41

WS-BaseFaults (3)

• Types of faults for WS-ResourceProperties:– ResourceUnknownFault: This fault applies to all of the

various operations and indicates that the message refers to an endpoint reference the Web service doesn't recognize.

– InvalidResourcePropertyName: When requesting a property or properties, this fault indicates that the client is trying to get or set a ResourceProperty that doesn't exist on the WS-Resource in question.

– InvalidSetResourcePropertiesRequestContent: The data that was sent in the SetResourcePropertyRequest doesn't conform to the schema for the appropriate resource property document.

Page 42: Transaction Processing CS409 Application Services Even Semester 2007

42

WS-BaseFaults (4)

• Types of faults for WS-ResourceProperties:– UnableToModifyResourceProperty: The resource property

that client is attempting to set is read-only.– SetResourcePropertyRequestFailed: This is a general

error indicating that the server was unable to add or change the resource property.

– UnknownQueryExpressionDialect: When querying resource properties, this fault indicates that the client is attempting to evaluate a query in a dialect the service doesn't recognize.

Page 43: Transaction Processing CS409 Application Services Even Semester 2007

43

WS-BaseFaults (5)

• Types of faults for WS-ResourceProperties:– InvalidQueryExpression: The query doesn't conform

to the specified dialect.– QueryEvaluationError: This is a general error

indicating something went wrong while processing the query.

Page 44: Transaction Processing CS409 Application Services Even Semester 2007

44

WS-BaseFaults (6)• Types of faults for WS-ResourceLifetime:

– InvalidQueryExpression: The query doesn't conform to the specified dialect.

– ResourceNotDestroyedFault: This fault indicates that the WS-Resource wasn't destroyed.

– UnableToSetTerminationTimeFault: General fault indicating the service couldn't make the requested change.

– TerminationTimeChangeRejectedFault: The client is attempting to make a change that doesn't conform with the internal rules of the WS-Resource.

Page 45: Transaction Processing CS409 Application Services Even Semester 2007

45

WS-BaseFaults (7)

• Types of faults for WS-ServiceGroups:– UnsupportedMemberInterfaceFault: The service the client

is attempting to add doesn't implement any of the required portTypes.

– ContentCreationFailedFault: The request to add a Web service doesn't have the appropriate Content element as defined in the MembershipContentRules for the ServiceGroup.

– AddRefusedFault: Indicating that the resource couldn't be added.

Page 46: Transaction Processing CS409 Application Services Even Semester 2007

46

WS-RenewableReferences

• Defines a mechanisms that can be used to renew an endpoint reference that has become invalid.

• When endpoint location or policy changes, it may become necessary to renew a client copy of associated information regarding that resource.

Page 47: Transaction Processing CS409 Application Services Even Semester 2007

47

WS-Notification

• A standard specification for asynchronous message delivery notification, built on top of WS-Resource.

• Explains how to enable an application to provide publish-subscribe capabilities for various application events.

Page 48: Transaction Processing CS409 Application Services Even Semester 2007

48

WS-Notification (2)

• Three specifications for WS-Notification:

– WS-Topics– WS-BaseNotifications.– WS-BrokeredNotifications.

Page 49: Transaction Processing CS409 Application Services Even Semester 2007

49

WS-Topics

• A set of "items of interest for subscription".

• A service can publish a set of topics that clients can subscribe to, and receive a notification whenever the topic changes.

Page 50: Transaction Processing CS409 Application Services Even Semester 2007

50

WS-BaseNotifications

• Defines the standard interfaces of notification consumers and producers.

• Notification producers have to expose a subscribe operation that notification consumers can use to request a subscription.

• Consumers, have to expose a notify operation that producers can use to deliver the notification.

• The client actually requesting the subscription need not necessarily be the consumer of those notifications, clients can perform subscriptions "on behalf of other notification consumers".

Page 51: Transaction Processing CS409 Application Services Even Semester 2007

51

WS-BaseNotifications (2)1. Notification consumer

subscribes himself to the SystemLoadHigh topic.

2. Next, at some point in time, something happens in the notification producer that must trigger a notification from the SystemLoadHigh topic. The notification filter for example is send out a notification every time the system load has passed "more than 75%“.

3. Notification producer delivers the notification to the consumer by invoking the notify operation in the consumer.Fig 1. WS-Notification Interaction

Page 52: Transaction Processing CS409 Application Services Even Semester 2007

52

WS-BaseNotifications (3)

Fig 2. WS-Notification Interaction where subscriber and consumer are different entities.

Page 53: Transaction Processing CS409 Application Services Even Semester 2007

53

WS-BrokeredNotifications

• Defines the standard interfaces for the notification broker.

• Notifications are delivered from the producer to the consumer through an intermediate entity called the broker.

Page 54: Transaction Processing CS409 Application Services Even Semester 2007

54

WS-BrokeredNotifications (2)

1. The producer must register with the broker and publish its topics there.

2. The subscriber (separate from the consumer in this case), must also subscribe through the broker.

3. When a notification is produced, it is delivered to the consumer through the broker. Fig 3. Brokered WS-Notification Interaction

Page 55: Transaction Processing CS409 Application Services Even Semester 2007

Thank You

Doddy [email protected]

[email protected]