Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

I came across this issue in the development of the unAPI HTTP service for Fedora. Rather than hardcode a datastream location in the WSDL binding, I extended the DSInputSpec schema to include an optional pid attribute. Absent the pid attribute, the datastream input is still assumed to belong to the data object. However, if the pid is specified, the binding occurs against the specified pid's datastream.

Gliffy Diagram
sizeL
namemetadata_dissemination_2
page~eddie:Dissemination Architecture Updates
pageid7733419
alignleft
space~eddie

As shown in the diagram above, the data objects no longer include an XSL datastream. Instead, the XSL datastream is located in demo:cmodel and the DSINPUTSPEC datastream of demo:sdep references demo:cmodel.

sDep DSInputSpec
  <fbs:DSInput DSMax="1"DSMin="1"DSOrdinality="false"
               wsdlMsgPartName="XSL"pid="demo:cmodel">
  <fbs:DSInputLabel>XSL</fbs:DSInputLabel>
    <fbs:DSMIME>application/xml</fbs:DSMIME>
    <fbs:DSInputInstruction>DC to MODS XSLT</fbs:DSInputInstruction>
</fbs:DSInput>

sDep MethodMap

Code Block
<fmm:MethodMap name="MethodMap - Document Transform SDEF Methods"
               xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
  <fmm:Method operationName="transform"
              wsdlMsgName="transformRequest"
              wsdlMsgOutput="transformResponse">
    <fmm:DatastreamInputParm parmName="DC" passBy="URL_REF" required="true"/>
    <fmm:DatastreamInputParm parmName="XSL" passBy="URL_REF" required="true"/>
    <fmm:DefaultInputParm parmName="CLEAR_CACHE" passBy="VALUE" required="true"
                          defaultValue="yes" />
    <fmm:MethodReturnType wsdlMsgName="transformResponse"
                          wsdlMsgTOMIME="text/xml"/>
  </fmm:Method>
</fmm:MethodMap>

sDep DSInputSpec

Code Block

<fbs:DSInputSpec xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec"
                         label="Datastream Inputs">
  <fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false"
                       wsdlMsgPartName="DC">
    <fbs:DSInputLabel>Dublin Core</fbs:DSInputLabel>
    <fbs:DSMIME>text/xml</fbs:DSMIME>
    <fbs:DSInputInstruction>XML source to be transformed</fbs:DSInputInstruction>
  </fbs:DSInput>
  <fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false"
               wsdlMsgPartName="XSL" pid="demo:dc2mods.cmodel">
    <fbs:DSInputLabel>XSL</fbs:DSInputLabel>
    <fbs:DSMIME>application/xml</fbs:DSMIME>
    <fbs:DSInputInstruction>DC to MODS XSLT</fbs:DSInputInstruction>
  </fbs:DSInput>
</fbs:DSInputSpec>