- From: Asir Vedamuthu <asirveda@microsoft.com>
- Date: Thu, 29 Oct 2009 02:06:43 +0000
- To: "antoine.mensch@odonata.fr" <antoine.mensch@odonata.fr>
- CC: "public-ws-resource-access@w3.org" <public-ws-resource-access@w3.org>
Hello Antoine,
> A simpler solution could be to have, by specifying that
> the EPR defines a default policy scope, and thus avoiding
> the external policy attachment construct
Yes, the WS-Addressing W3C Recommendation defines that:
"[metadata] : xs:any (0..unbounded)
A reference may contain metadata that describes the behavior, policies and capabilities of the endpoint." [1]
The following usage is valid and supported by a general-purpose, existing feature [2] in the current WS-MetadataExchange draft:
<wsa:EndpointReference>
<wsa:Address>http://services.example.org/stockquote</wsa:Address>
<wsa:Metadata>
<mex:Metadata>
<mex:MetadataSection>
Dialect='http://www.w3.org/ns/ws-policy'>
<wsp:Policy> ... </wsp:Policy>
</mex:MetadataSection>
</mex:Metadata>
</wsa:Metadata>
</wsa:EndpointReference>
[1] http://www.w3.org/TR/2006/REC-ws-addr-core-20060509/#eprinfomodel
[2] http://www.w3.org/TR/2009/WD-ws-metadata-exchange-20090924/#Metadata-in-Endpoint-References
We hope this helps.
Regards,
Asir S Vedamuthu
Microsoft Corporation
-----Original Message-----
From: public-ws-resource-access-request@w3.org [mailto:public-ws-resource-access-request@w3.org] On Behalf Of Antoine Mensch
Sent: Tuesday, October 13, 2009 2:00 PM
To: public-ws-resource-access@w3.org
Subject: Comments on the preview of the WS-MetadataExchange Working Draft
Dear colleagues,
Please find below some comments on the preview of the
WS-MetadataExchange Working Draft
(http://www.w3.org/TR/2009/WD-ws-metadata-exchange-20090924).
I. Section 7
This section provides a way to attach metadata to an EPR. However, the
spec does not clearly state whether this feature is only intended for
carrying general metadata about the service exposed through the endpoint
(as the examples seem to indicate), or whether it could also be used for
carrying endpoint-specific metadata, such as the endpoint effective
policy (as defined in WS-PolicyAttachment).
Ideally, there should be an easy way to directly attach an endpoint
effective policy to the EPR, in order to bypass the usual complex
algorithm that the client must implement to compute the endpoint
effective policy, which is not practical for some embedded clients:
1) Download the WSDL
2) Retrieve the service port corresponding to the EPR (matching the
address, and hoping that the WSDL is complete, i.e. is dynamically
generated by the service to contain an up-to-date address, which is
often numerical in cases of devices).
3) Build the endpoint effective policy by merging info extracted from
the WSDL and possibly an external policy document.
The closest way I can see in the current version of the spec would be to
use an external policy attachment as metadata section, using the EPR as
policy scope. So for instance, to express that an EPR supports the DPWS
requirements for hosted services (as a basic example of policy
assertion), one could have:
<wsa:EndpointReference
xmlns:wsa='http://www.w3.org/2005/08/addressing'>
<wsa:Address>http://192.168.0.34/myHostedService</wsa:Address>
<wsa:Metadata>
<mex:Metadata xmlns:mex='http://www.w3.org/2009/09/ws-mex'>
<mex:MetadataSection xmlns:wsp='http://www.w3.org/ns/ws-policy'>
Dialect='http://www.w3.org/TR/ws-policy-attach'>
<wsp:PolicyAttachment>
<wsp:AppliesTo>
<wsa:EndpointReference>
<wsa:Address>http://192.168.0.34/myHostedService</wsa:Address>
</wsa:EndpointReference>
</wsp:AppliesTo>
<wsp:Policy>
<dpws:Profile
xmlns:dpws='http://docs.oasis-open.org/ws-dd/ns/dpws/2009/01'/>
</wsp:Policy>
</wsp:PolicyAttachment>
</mex:MetadataSection>
</mex:Metadata>
</wsa:Metadata>
</wsa:EndpointReference>
Is the above a valid use of the EPR embedded metadata feature?
If so, although much simpler than having to parse a full WSDL, it
remains a relatively heavy solution for embedded clients. A simpler
solution could be to have, by specifying that the EPR defines a default
policy scope, and thus avoiding the external policy attachment construct:
<wsa:EndpointReference
xmlns:wsa='http://www.w3.org/2005/08/addressing'>
<wsa:Address>http://192.168.0.34/myHostedService</wsa:Address>
<wsa:Metadata>
<mex:Metadata xmlns:mex='http://www.w3.org/2009/09/ws-mex'>
<mex:MetadataSection xmlns:wsp='http://www.w3.org/ns/ws-policy'>
Dialect='http://www.w3.org/TR/ws-policy'>
<wsp:Policy>
<dpws:Profile
xmlns:dpws='http://docs.oasis-open.org/ws-dd/ns/dpws/2009/01'/>
</wsp:Policy>
</mex:MetadataSection>
</mex:Metadata>
</wsa:Metadata>
</wsa:EndpointReference>
or even better (allowing any predefined WS-Mex dialect to appear in the
WS-Addressing metadata, as in a Get response)
<wsa:EndpointReference
xmlns:wsa='http://www.w3.org/2005/08/addressing'>
<wsa:Address>http://192.168.0.34/myHostedService</wsa:Address>
<wsa:Metadata>
<wsp:Policy>
<dpws:Profile
xmlns:dpws='http://docs.oasis-open.org/ws-dd/ns/dpws/2009/01'/>
</wsp:Policy>
</wsa:Metadata>
</wsa:EndpointReference>
II. Editorial comments:
It seems that the namespace used in schema import elements in several
examples should be http://services.example.org/stockquote/schemas
instead of http://services.example.org/stockquote
Best regards,
Antoine Mensch
Received on Thursday, 29 October 2009 02:07:22 UTC