-
Notifications
You must be signed in to change notification settings - Fork 17
xdi2 xri2xdi
peacekeeper edited this page Jun 13, 2012
·
5 revisions
An XDI discovery proxy service that resolves XRIs at the global registry and "maps" them to XDI discovery information.
This component is deployed at http://xri2xdi.net/ for public use, but can also be deployed privately.
Send an XDI message like the following to an instance of this component.
=somename$($msg)$(!1234)$do/$get/=markus
()/()/(())
(())/$is/()
()/()/(=!91F2.8153.F600.AE24)
(=!91F2.8153.F600.AE24)/()/$!($uri)
(=!91F2.8153.F600.AE24)$!($uri)/!/(data:,https://xdi.fullxri.com/=!91F2.8153.F600.AE24/)
()/()/(=markus)
(=markus)/$is/(=!91F2.8153.F600.AE24)
()/()/=!91F2.8153.F600.AE24
()/()/=markus
=markus/$is/=!91F2.8153.F600.AE24
The xdi2-client component has a class called XdiResolver to facilitate talking to an instance of this XDI discovery proxy service.
XdiResolver resolver = new XdiResolver();
resolver.setXdiProxy("http://xri2xdi.net/"); // this is the default
XdiResolutionResult result = resolver.resolve("=markus");
System.out.println("I-Number: " + result.getInumber()); // =!91F2.8153.F600.AE24
System.out.println("URI: " + result.getUri()); // https://xdi.fullxri.com/=!91F2.8153.F600.AE24/
This work is licensed under a Creative Commons Attribution 4.0 International License.