[2024]Digital Global Overview Report 2024 Meltwater.pdf
WS-Addressing
1. Web Services (NSWI145)
Lecture 08: WS Addressing, WS Notification
Martin Nečaský, Ph.D.
Faculty of Mathematics and Physics
Charles University in Prague, Czech Republic
Summer 2013
2. WS-*
family of complementary Web service
technologies
in this lecture
W3C Web Services Addressing Working Group:
• WS-Addressing
Summer 2013
3. WS-Addressing
W3C Web Services Addressing Working Group
completed and closed on 5 Sep 2007
http://www.w3.org/2002/ws/addr/
motivation
standard way to include information about
message sender and receiver, how to return
message response in message itself
Summer 2013
4. WS-Addressing
consists of three W3C recommendations
WS Addressing 1.0 – Core
• endpoint references and message addressing properties
• namespace URI
http://www.w3.org/2005/08/addressing (usual
prefix wsa)
WS Addressing 1.0 – SOAP Binding
WS Addressing 1.0 – Metadata
• binding endpoint references to WSDL metadata
• how message addressing properties are described using WSDL
• how WS-Policy can be used to indicate support for WS-Addressing
• namespace URI
http://www.w3.org/2007/05/addressing/metadata
(usual prefix wsam)
Summer 2013
5. Endpoint References
informally
endpoint is a referable entity, process or resource to
which messages can be addressed
endpoint reference provides information needed to
address endpoint
can be part of service interface description or created
dynamically (e.g. in SOAP messages, BPEL scripts, ...)
formally
endpoint is a collection of abstract properties
WS-Addressing defines a core set of properties which
can be extended by other specifications
Summer 2013
6. Endpoint References
Summer 2013
element wsa:EndpointReference
defines endpoint reference
can be used by any other WS standard
• WS-Addressing Core does not specify where element
can be used
• used, e.g., in BPEL 2.0
<wsa:EndpointReference
xmlns:wsa="http://www.w3.org/2005/08/addressing">
</wsa:EndpointReference>
7. Endpoint References
Summer 2013
complex type
wsa:EndpointReferenceType
type of wsa:EndpointReference
can be used by any other WS standard
• used, e.g., in SOAP headers
sequence of elements
• wsa:Address
• wsa:ReferenceParameters
• wsa:Metadata
8. Endpoint References
Summer 2013
element wsa:Address
required
absolute IRI representing endpoint address
two predefined values
• wsa:anonymous : for endpoints without address
• wsa:none : for endpoints which discard messages
<wsa:EndpointReference>
<wsa:Address>
http://gd/TripleStore/services/TripleStoreWS
</wsa:Address>
</wsa:EndpointReference>
9. Endpoint References
Summer 2013
element wsa:ReferenceParameters
optional
list of individual parameters associated with endpoint
required to properly interact with endpoint
• they are not ordered
• in case of SOAP as transfer protocol, they determine headers
required by endpoint
<wsa:EndpointReference>
<wsa:ReferenceParameters>
...
</wsa:ReferenceParameters>
</wsa:EndpointReference>
10. Endpoint References
Summer 2013
element wsa:Metadata
optional
list of meta-properties which describe endpoint
behavior, policies and capabilities
not necessarily full list of all endpoint metadata
<wsa:EndpointReference>
<wsa:Metadata>
...
</wsa:Metadata>
</wsa:EndpointReference>
11. Endpoint References
WS Addressing Metadata introduces specific
meta-properties which specify binding to WSDL
element wsam:InterfaceName
• WSDL2.0 interface name or WSDL1.1 port type name
element wsam:ServiceName
• WSDL2.0 service name or WSDL1.1 service name
• attribute EndpointName
– WSDL2.0 endpoint name or WSDL1.1 port name
it is possible to use WSDL2.0 attribute
wsdlLocation of wsa:Metadata element
• from http://www.w3.org/ns/wsdl-instance namespace
• URI where WSDL description is located
Summer 2013
14. Message Addressing Properties
element wsa:To
optional
value is xs:anyURI
absolute URI representing address of intended message receiver
element wsa:From
optional
value wsa:EndpointReferenceType
endpoint from which message originated
element wsa:ReplyTo
optional
value wsa:EndpointReferenceType
endpoint for intended receiver of replies to this message
element wsa:FaultTo
optional
value wsa:EndpointReferenceType
endpoint for intended receiver of faults related to this message
Summer 2013
17. Message Addressing Properties
element wsa:Action
mandatory
value is xs:anyURI
absolute URI uniquely identifying semantics implied by
message
URI should identify input, output or fault message within
WSDL 1.1 port type or WSDL 2.0 interface
• identification assigned to message with
wsaw:Action attribute of wsdl:input,
wsdl:output or wsdl:fault elements
• wsaw:Action introduced in WS Addressing 1.0
Metadata
Summer 2013
19. Message Addressing Properties
element wsa:MessageID
optional
value is xs:anyURI
absolute IRI uniquely identifying message
uniqueness is responsibility of sender, receiver’s behavior in
case of duplicated IDs is not specified
element wsa:RelatesTo
optional
value is xs:anyURI
ID of a message related to this message
relationship type specified by attribute RelationshipType
• default value
http://www.w3.org/2005/08/addressing/reply
Summer 2013
21. More on Extending WSDL
WSDL 2.0 endpoint or WSDL 1.1 port may be
extended with WS addressing endpoint reference
<wsdl:port name="PublicContractWS" binding="srv:PublicContractSOAPBinding">
<soap:address
location="http://gd/EntityServices/services/PublicContractWS" />
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>
http://gd/EntityServices/services/PublicContractWS
</wsa:Address>
</wsa:EndpointReference>
</wsdl:port>
Summer 2013
22. More on Extending WSDL
wsdl11:port
soap:address
wsa:EndpointReference
wsa:Address
wsa:ReferenceParameters
soap:Header
wsa:To
ns1:param1
ns2:param2
ns1:param1
ns2:param2
Summer 2013
23. More on Extending WSDL
wsa:Action in incoming message associated with
input, output or fault within WSDL description
two association mechanisms
explicit association
• action is defined explicitly for input, output or fault messages with
wsaw:Action attribute (we have already seen sample SOAP
message and WSDL description on previous slides)
• if wsaw:Action attribute is missing
– if soap:operation/@soapAction attribute with a non-empty values is
present then its value is action for input message
– if soap:operation/@soapAction attribute is missing or empty value
then action for input message is assigned implicitly
implicit association is defined for WSDL 1.1 and WSDL 2.0
Summer 2013
24. wsdl11:binding
More on Extending WSDL
wsdl11:portType
wsdl11:operation
soap:Header
wsa:Action
wsdl11:input
wsaw:Action
1
2
wsdl11:operation
soap:operation
@soapAction
Summer 2013
25. More on Extending WSDL
implicit association for WSDL 1.1
so called Default Action Pattern for WSDL 1.1
pattern for input and output messages
[target namespace][delimiter][port type name]
[delimiter][input|output name]
pattern for fault messages
[target namespace][delimiter][port type name]
[delimiter][operation name][delimiter]Fault
[delimiter][fault name]
[delimiter]is : (for URN target namespace) or /
Summer 2013