login/register

Snip!t from collection of Alan Dix

see all channels for Alan Dix

Snip
summary

UUIDs (related to GUIDs) are used frequently in computin...
7673868d-231e-490d-9c4f-19288e7e668d
This is just an example value--these are usually generat ...
Although the process for generating UUIDs is well-unders ...
... WSDAPI, please use the urn:

Dan Driscoll's Blog : UUID URI schemes
http://blogs.msdn.com/dandris/archive/2008/09/19/uuid-uri-schemes.aspx

Categories

/Channels/techie

[ go to category ]

For Snip

loading snip actions ...

For Page

loading url actions ...

UUIDs (related to GUIDs) are used frequently in computing applications.  If you don't know these by name, you will probably recognize the 128-bit value in the format in which it is typically rendered:

7673868d-231e-490d-9c4f-19288e7e668d

This is just an example value--these are usually generated on demand to uniquely identify an object.  In WS-Discovery and DPWS, UUIDs are recommended as a way to uniquely identify devices, services, clients, and even individual messages.

Although the process for generating UUIDs is well-understood, there is a lot of inconsistency in how they are renedered in Web Services messages.  In most cases, these UUIDs are used as URIs, which means we have to supply a scheme (such as "urn:uuid:"--"http:" is another scheme) in addition to the URI content (the UUID).

It's common to see two URI schemes used to describe UUIDs: "uuid:" and "urn:uuid:"  So the example UUID above would be either uuid:7673868d-231e-490d-9c4f-19288e7e668d or urn:uuid:7673868d-231e-490d-9c4f-19288e7e668d, depending on which scheme is used.  Here's the difference between the two:

  • urn:uuid: is described by RFC 4122 as the correct scheme for rendering a UUID.  RFC 4122 is referenced in DPWS, and is a well-accepted way to generate UUIDs in Web Services messages.
  • uuid: is common but non-standard.  It's often used in specifications developed before RFC 4122 was available; both UPnP and WS-Discovery use uuid:, since both were published before RFC 4122.  Unfortunately, uuid: does not conform to any standard.

There are cases where uuid: is explicitly required (UPnP is one of them) but in all other cases, you should consider whether urn:uuid: is a better alternative.  In most Web Services applications, urn:uuid: is preferred--in fact, WSDAPI does additional validation on urn:uuid:-scheme URIs that it does not perform on uuid:-scheme URIs.

So if you're implementing DPWS on your own, or are generating UUIDs to pass into WSDAPI, please use the urn:uuid: form whenever possible.

HTML

<p><a href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier" mce_href="http://en.wikipedia.org/wiki/Universally_Unique_Identifier">UUIDs</a> (related to <a href="http://en.wikipedia.org/wiki/Globally_Unique_Identifier" mce_href="http://en.wikipedia.org/wiki/Globally_Unique_Identifier">GUIDs</a>) are used frequently in computing applications.&nbsp; If you don't know these by name, you will probably recognize the 128-bit value in the format in which it is typically rendered:</p> <blockquote> <p>7673868d-231e-490d-9c4f-19288e7e668d</p></blockquote> <p>This is just an example value--these are usually generated on demand to uniquely identify an object.&nbsp; In WS-Discovery and DPWS, UUIDs are recommended as a way to uniquely identify devices, services, clients, and even individual messages.</p> <p>Although the process for generating UUIDs is well-understood, there is a lot of inconsistency in how they are renedered in Web Services messages.&nbsp; In most cases, these UUIDs are used as URIs, which means we have to supply a scheme (such as "urn:uuid:"--"http:" is another scheme) in addition to the URI content (the UUID).</p> <p>It's common to see two URI schemes used to describe UUIDs: "uuid:" and "urn:uuid:"&nbsp; So the example UUID above would be either uuid:7673868d-231e-490d-9c4f-19288e7e668d or urn:uuid:7673868d-231e-490d-9c4f-19288e7e668d, depending on which scheme is used.&nbsp; Here's the difference between the two:</p> <ul> <li><strong>urn:uuid:</strong> is described by <a href="http://www.ietf.org/rfc/rfc4122.txt" mce_href="http://www.ietf.org/rfc/rfc4122.txt">RFC 4122</a> as the correct scheme for rendering a UUID.&nbsp; RFC 4122 is referenced in DPWS, and is a well-accepted way to generate UUIDs in Web Services messages.</li> <li><strong>uuid: </strong>is common but non-standard.&nbsp; It's often used in specifications developed before RFC 4122 was available; both UPnP and WS-Discovery use uuid:, since both were published before RFC 4122.&nbsp; Unfortunately, uuid: does not conform to any standard.</li></ul> <p>There are cases where uuid: is explicitly required (UPnP is one of them) but in all other cases, you should consider whether urn:uuid: is a better alternative.&nbsp; In most Web Services applications, urn:uuid: is preferred--in fact, WSDAPI does additional validation on urn:uuid:-scheme URIs that it does not perform on uuid:-scheme URIs.</p> <p>So if you're implementing DPWS on your own, or are generating UUIDs to pass into WSDAPI, please use the urn:uuid: form whenever possible.</p>