Difference between revisions of "Metadata Versioning Implementation"

From IHE Wiki
Jump to navigation Jump to search
Line 85: Line 85:
 
         <rs:RegistryResponse xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
 
         <rs:RegistryResponse xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
 
             status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success"/>
 
             status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success"/>
 +
    </soapenv:Body>
 +
</soapenv:Envelope>
 +
</pre>
 +
 +
== Example Status Change Update ==
 +
 +
Update includes SubmissionSet and Association of type Deprecate. The Association targets (targetObject attribute) existing DocumentEntry (already in the Registry) with id of urn:uuid:554d6d95-d401-42f9-87c5-e4633d873aff. Association type 'Deprecate' triggers status change to 'Deprecated'. Note that no ObjectRefs are included.  ObjectRefs for the purpose of declaring references to objects already in the Registry are not required in ebRIM 3.0.
 +
 +
<pre>
 +
POST /axis2/services/xdsregistryb HTTP/1.1
 +
Content-Type: application/soap+xml; charset=UTF-8; action="urn:ihe:iti:2008:UpdateDocumentSet"
 +
User-Agent: Axis2
 +
Host: localhost:5000
 +
 +
<?xml version='1.0' encoding='UTF-8'?>
 +
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
 +
    xmlns:wsa="http://www.w3.org/2005/08/addressing">
 +
    <soapenv:Header>
 +
        <wsa:To>http://localhost:5000/axis2/services/xdsregistryb</wsa:To>
 +
        <wsa:MessageID>urn:uuid:A729CFE53770BA1B6E1221655966036</wsa:MessageID>
 +
        <wsa:Action>urn:ihe:iti:2008:UpdateDocumentSet</wsa:Action>
 +
    </soapenv:Header>
 +
    <soapenv:Body>
 +
        <lcm:SubmitObjectsRequest xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0">
 +
            <rim:RegistryObjectList xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">
 +
 +
                <!-- SubmissionSet anchoring Status Update -->
 +
 +
                <rim:RegistryPackage id="SubmissionSet01"
 +
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:RegistryPackage">
 +
                            <!-- metadata details removed for clarity -->
 +
                </rim:RegistryPackage>
 +
 +
                <!-- Classification labeling RegistryPackage element as SubmissionSet object  -->
 +
 +
                <rim:Classification classifiedObject="SubmissionSet01"
 +
                    classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd"
 +
                    id="ID_6704922_1"
 +
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"/>
 +
 +
                <!-- Association targeting existing document -->
 +
 +
                <rim:Association
 +
                    associationType="urn:ihe:iti:2008:AssociationType:Deprecate"
 +
                    sourceObject="SubmissionSet01" targetObject="urn:uuid:554d6d95-d401-42f9-87c5-e4633d873aff" id="ID_6704922_2"
 +
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Association">
 +
                    <rim:Slot name="SubmissionSetStatus">
 +
                        <rim:ValueList>
 +
                            <rim:Value>Original</rim:Value>
 +
                        </rim:ValueList>
 +
                    </rim:Slot>
 +
                </rim:Association>
 +
            </rim:RegistryObjectList>
 +
        </lcm:SubmitObjectsRequest>
 
     </soapenv:Body>
 
     </soapenv:Body>
 
</soapenv:Envelope>
 
</soapenv:Envelope>
 
</pre>
 
</pre>

Revision as of 09:06, 17 September 2008

Examples and support material for the Metadata Versioning White Paper.

Example Metadata Update

A Metadata Update Request is carried in a ebRS SubmitObjectsRequest with a ws:Action of urn:ihe:iti:2008:UpdateDocumentSet. Note that the top most body element is SubmitObjectsRequest and not UpdateObjectsRequest. SubmitObjectsRequest is required since both new (SubmissionSet and Association) and updated (ExtrinsicObject) content is included. This is not allowable inside of an ebRIM UpdateObjectsRequest. The use of new ws:Action, urn:ihe:iti:2008:UpdateDocumentSet, allows implementations to handle the request differently, applying different policy and security assertions as needed. Note that the UpdateDocumentSet request is always carried in a SIMPLE SOAP package as shown below. Since this transaction only carries metadata, MTOM/XOP is not necessary.

Content-Length header is not shown.

POST /axis2/services/xdsregistryb HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="urn:ihe:iti:2008:UpdateDocumentSet"
User-Agent: Axis2
Host: localhost:5000

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
    xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <soapenv:Header>
        <wsa:To>http://localhost:5000/axis2/services/xdsregistryb</wsa:To>
        <wsa:MessageID>urn:uuid:A729CFE53770BA1B6E1221655966036</wsa:MessageID>
        <wsa:Action>urn:ihe:iti:2008:UpdateDocumentSet</wsa:Action>
    </soapenv:Header>
    <soapenv:Body>
        <lcm:SubmitObjectsRequest xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0">
            <rim:RegistryObjectList xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">

                <!-- Updated DocumentEntry object. Note that id != lid -->

                <rim:ExtrinsicObject id="Document01" lid="urn:uuid:0edca82f-0102-785d-a032-9b2a5b5186cf" 
                    mimeType="text/plain"
                    objectType="urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1">
                            <!-- metadata details removed for clarity --> 
                </rim:ExtrinsicObject>

                <!-- SubmissionSet 'wrapping' DocumentEntry -->

                <rim:RegistryPackage id="SubmissionSet01"
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:RegistryPackage"> 
                            <!-- metadata details removed for clarity --> 
                </rim:RegistryPackage>

                <!-- Classification labeling RegistryPackage element as SubmissionSet object  -->

                <rim:Classification classifiedObject="SubmissionSet01"
                    classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd"
                    id="ID_6704922_1"
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"/>

                <!-- Association placing DocumentEntry in SubmissionSet -->

                <rim:Association
                    associationType="urn:oasis:names:tc:ebxml-regrep:AssociationType:HasMember"
                    sourceObject="SubmissionSet01" targetObject="Document01" id="ID_6704922_2"
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Association">
                    <rim:Slot name="SubmissionSetStatus">
                        <rim:ValueList>
                            <rim:Value>Original</rim:Value>
                        </rim:ValueList>
                    </rim:Slot>
                </rim:Association>
            </rim:RegistryObjectList>
        </lcm:SubmitObjectsRequest>
    </soapenv:Body>
</soapenv:Envelope>

An example UpdateDocumentSetResponse is shown below.

Content-Length header is not shown.

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: application/soap+xml; action="urn:ihe:iti:2008:UpdateDocumentSetResponse";charset=UTF-8
Date: Wed, 17 Sep 2008 12:52:46 GMT

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
    xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <soapenv:Header>
        <wsa:Action>urn:ihe:iti:2008:UpdateDocumentSetResponse</wsa:Action>
        <wsa:RelatesTo>urn:uuid:A729CFE53770BA1B6E1221655966036</wsa:RelatesTo>
    </soapenv:Header>
    <soapenv:Body>
        <rs:RegistryResponse xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"
            status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success"/>
    </soapenv:Body>
</soapenv:Envelope>

Example Status Change Update

Update includes SubmissionSet and Association of type Deprecate. The Association targets (targetObject attribute) existing DocumentEntry (already in the Registry) with id of urn:uuid:554d6d95-d401-42f9-87c5-e4633d873aff. Association type 'Deprecate' triggers status change to 'Deprecated'. Note that no ObjectRefs are included. ObjectRefs for the purpose of declaring references to objects already in the Registry are not required in ebRIM 3.0.

POST /axis2/services/xdsregistryb HTTP/1.1
Content-Type: application/soap+xml; charset=UTF-8; action="urn:ihe:iti:2008:UpdateDocumentSet"
User-Agent: Axis2
Host: localhost:5000

<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
    xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <soapenv:Header>
        <wsa:To>http://localhost:5000/axis2/services/xdsregistryb</wsa:To>
        <wsa:MessageID>urn:uuid:A729CFE53770BA1B6E1221655966036</wsa:MessageID>
        <wsa:Action>urn:ihe:iti:2008:UpdateDocumentSet</wsa:Action>
    </soapenv:Header>
    <soapenv:Body>
        <lcm:SubmitObjectsRequest xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0">
            <rim:RegistryObjectList xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0">

                <!-- SubmissionSet anchoring Status Update -->

                <rim:RegistryPackage id="SubmissionSet01"
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:RegistryPackage"> 
                            <!-- metadata details removed for clarity --> 
                </rim:RegistryPackage>

                <!-- Classification labeling RegistryPackage element as SubmissionSet object  -->

                <rim:Classification classifiedObject="SubmissionSet01"
                    classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd"
                    id="ID_6704922_1"
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Classification"/>

                <!-- Association targeting existing document -->

                <rim:Association
                    associationType="urn:ihe:iti:2008:AssociationType:Deprecate"
                    sourceObject="SubmissionSet01" targetObject="urn:uuid:554d6d95-d401-42f9-87c5-e4633d873aff" id="ID_6704922_2"
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:Association">
                    <rim:Slot name="SubmissionSetStatus">
                        <rim:ValueList>
                            <rim:Value>Original</rim:Value>
                        </rim:ValueList>
                    </rim:Slot>
                </rim:Association>
            </rim:RegistryObjectList>
        </lcm:SubmitObjectsRequest>
    </soapenv:Body>
</soapenv:Envelope>