Skip to main content
Jump to: navigation, search

OHF Using XDS.b

Revision as of 19:19, 24 October 2007 by (Talk | contribs) (XDS.b and OHF)

About XDS.b

XDS.b is a profile proposed and accepted for trial implementation in the 2007-2008 IHE profile cycle. The primary purpose of the profile is to take the existing XDS specification and make it more consistent with existing and emerging Web service standards.

To read the trial implementation of the XDS.b profile, please see the IHE XDS.b Supplement

The previous XDS profile has been renamed to XDS.a.

XDS.b and OHF

The version of OHF for use at the 2007-2008 IHE Connectathon supports the XDS.b Document Consumer and the XDS.b Document Source in addition to the existing support for XDS.a Document Consumer and Source.

XDS.b Document Consumer

The OHF XDS.b Document Consumer implements two transactions: Registry Stored Query and Retrieve Document Set. The Stored Query transaction is semantically identical to the XDS.a Registry Stored Query transaction. The Retrieve Document Set transaction is new.

The XDS.b Document Consumer API is controlled by the class org.eclipse.ohf.ihe.xds.consumer.B_Consumer.

Sample Code

// URI for the XDS Registry registryURI = new"");

// Set the mapping of repositoryUniqueId => Repository Web service endpoint
Map repositoryUriMap = new HashMap();
repositoryUriMap.put("10.1.2", new""));
repositoryUriMap.put("10.1.3", new""));

// Optional:  URI for the XCA Initiating Gateway initiatingGatewayUrl = new"");

B_Consumer consumer = new B_Consumer(registryURI, initiatingGatewayUrl, repositoryUriMap);

// Optional:  Set a default repository URI.	
consumer .setDefaultRepositoryURI(new"http://localhost:8080/axis2/services/XDSRepositoryFacade"));

Registry Stored Query

Retrieve Document Set

Due to the nature of the XDS.b profile, a new transaction Retrieve Document Set has been created. The API is as follows:

XDSResponseType org.eclipse.ohf.ihe.xds.consumer.B_Consumer.retrieveDocumentSet(RetrieveDocumentSetRequestType,List);
  • Parameter 1: RetrieveDocumentSetRequestType

The RetrieveDocumentSetRequestType is an EMF-generated structure that represents a request for a document set in XDS.b. It contains a list of requests with each request containing minimally a repositoryUniqueId and a documentUniqueId.

Optionally, each request can contain a homeCommunityId - the identifier for use with cross-community requests (XCA). Per the XDS specification any XDS query result that contains a homeCommunityId, all subsequent queries or requests related to the result must contain the homeCommunityId. Please see the section about using XCA for more information.

  • Parameter 2: List

The second parameter, a List, is a pre-instantiated list that will contain the documents in response. These results will be of type org.eclipse.ohf.ihe.xds.document.Document and contains a byte array, MIME type, documentUniqueId, repositoryUniqueId, and (optionally) homeCommunityId.

Sample Code

RetrieveDocumentSetRequestType retrieveDocumentSetRequest = org.eclipse.ohf.ihe.xds.consumer.retrieve.RetrieveFactory.eINSTANCE.createRetrieveDocumentSetRequestType();
DocumentRequestType documentRequest;

// Create Document Request 1
documentRequest = org.eclipse.ohf.ihe.xds.consumer.retrieve.RetrieveFactory.eINSTANCE.createDocumentRequestType();



// Create Document Request 2
documentRequest = org.eclipse.ohf.ihe.xds.consumer.retrieve.RetrieveFactory.eINSTANCE.createDocumentRequestType();
// Optionally set a homeCommunityId


// Create container for response documents
List documents = new ArrayList();

// Retrieve Documents
XDSResponseType response = consumer.retrieveDocumentSet(retrieveDocumentSetRequest, documents);

Copyright © Eclipse Foundation, Inc. All Rights Reserved.