OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [xdi] How to get from =markus/+email to the actual data


Markus,

I just got back from Washington DC and saw this. Very nice! We can always use more really great illustrations of how the basics of XDI work, and how XDI builds on XRI.

I'm looking forward to doing full "XDI resolution" too, i.e., for the first step below to be the following query to the XDI endpoint of the = GRS registry authority:

$
   $get
      /
         =drummond
            $xdi
               /
                  $
                     $uri

The return would be:

=drummond
   $xdi
      /
         $
            $uri
               "http://somexdiservice.com/drummonds/xdi/endpoint"

Or it could be a collection of several URIs, or a reference to the XDI document of the XDI service provider for =drummond (all options available under XRD 1.0 too).

=Drummond

On Thu, Oct 1, 2009 at 1:38 PM, Markus Sabadello <markus.sabadello@xdi.org> wrote:
Hello XDI TC,

Someone asked me a question about the XDI4j library in Higgins and about how XDI endpoints relate to XRI resolution. So I put together some commented sample code which uses OpenXRI and XDI4j:
http://wiki.eclipse.org/XDI4j_Tutorial_6

The task is, given an XRI such as =markus/+email and nothing else, how do you actually find and read the value (the e-mail address)?

Step by step, the code does the following:
1. It resolves the authority part of the XRI (=markus) using standard XRI resolution with an XDI service type, i.e. it looks for an XDI endpoint in the i-name's XRD.
2. After discovering that endpoint, it prepares and sends an XDI message which looks like this:
$
   $get
      /
         =markus
            +email
3. The XDI endpoint answers with the statement that matches the $get query:
=markus
   +email
      "markus.sabadello@gmail.com"
4. In the end, the code prints out the literal from that statement.

In total, a few simple lines of actually working code that should demonstrate how XRI and XDI work together.

Markus




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]