Difference between revisions of "Metadata Versioning Implementation"

From IHE Wiki
Jump to navigation Jump to search
Line 3: Line 3:
 
== Example Metadata Update ==
 
== Example Metadata Update ==
  
A Metadata Update Request is carried in a ebRS SubmitObjectsRequest with a ws:Action of urn:ihe:iti:2008:UpdateDocumentSet.  SubmitObjectsRequest is required since both new (SubmissionSet and Association) and updated (ExtrinsicObject) content is included. The use of new ws:Action allows implementations to handle the request differently and apply 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.
+
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.
 
Content-Length header is not shown.

Revision as of 08:52, 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">
                <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>
                <rim:RegistryPackage id="SubmissionSet01"
                    objectType="urn:oasis:names:tc:ebxml-regrep:ObjectType:RegistryObject:RegistryPackage"> 

                   <!-- metadata details removed for clarity --> 

                </rim:RegistryPackage>
                <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"/>
                <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>