An example of a web-based client that provides a front end to the Fedora
Access SOAP service. This servlet is designed to provide a "browser centric"
view of the Fedora Access interface. Return types from the Fedora Access SOAP
service are translated into a form suitable for viewing with a web browser;
in other words MIME-typed streams. Applications that can readily handle SOAP
requests and responses would most likely communicate directly with the Fedora
Access SOAP service rather than use a java servlet as an intermediary. This
servlet serves as an example of how to construct a client that uses the
Fedora Access API via SOAP.
Input parameters for the servlet include:
- action_ name of Fedora service which must be one of the following:
- GetDissemination - Gets a dissemination result
- GetDatastreamDissemination - Gets the contents of a datastream in an
object.
- GetObjectProfile - Gets object profile.
- DescribeRepository - Gets information about the repository server.
- GetObjectHistory - Gets the change history of an object.
- ListMethods - Gets a list of all methods of an object.
- ListDatastreams - Gets a list of all datastreams of an object.
- PID_ - persistent identifier of the digital object
- sDefPID_ - persistent identifier of the Service Definiton object
- dsID_ - identifier of the datastream
- methodName_ - name of the method
- asOfDateTime_ - versioning datetime stamp
- xml_ - boolean switch used in conjunction with ListDatastreams,
ListMethods, GetObjectProfile, and DescribeRepository that determines whether
output is formatted as XML or as HTML; value of "true" indicates XML format;
value of false or omission indicates HTML format.
- userParms - methods may require or provide optional parameters that may
be input as arguments to the method; these method parameters are entered as
name/value pairs like the other serlvet parameters.Used in conjunction with
GetDissemination. (optional)
Note that all servlet parameter names that are implementation specific end
with the underscore character ("_"). This is done to avoid possible name
clashes with user-supplied method parameter names. As a general rule,
user-supplied parameters should never contain names that end with the
underscore character to prevent possible name conflicts.
Example URLs
- GetDissemination URL syntax:
protocol://hostname:port/soapclient/apia?action_=GetDissemination&PID_=pid&
sDefPID_=sdefpid&methodName_=methodname[&asOfDateTime_=dateTime][?parmArray]
This syntax requests a dissemination of the specified object using the
specified method of the associated service definition object. The result is
returned as a MIME-typed stream.
- protocol - either http or https.
- hostname - required hostname of the Fedora server.
- port - required port number on which the Fedora server is running.
- soapclient - required name of the sample soap client.
- apia - required name of the sample soap client
- GetDissemination - required action name for getting a dissemination
request.
- pid - required persistent idenitifer of the digital object.
- sdefpid - required persistent identifier of the service definition object
to which the digital object subscribes.
- methodname - required name of the method to be executed.
- dateTime - optional dateTime value indicating dissemination of a version
of the digital object at the specified point in time.
- parmArray - optional array of method parameters consisting of name/value
pairs in the form parm1=value1&parm2=value2...
- GetDatastreamDissemination URL syntax:
protocol://hostname:port/soapclient/apia?action=GetDatastreamDissemination&
PID_=pid&dsID_=dsid[&asOfDateTime_=dateTime]
This syntax requests a datastream dissemination for the specified digital
object. It is used to return the contents of a datastream.
- protocol - either http or https.
- hostname - required hostname of the Fedora server.
- port - required port number on which the Fedora server is running.
- soapclient - required name of the sample soap client.
- apia - required name of the sample soap client
- GetDatastreamDissemination - required action name for getting a
datastream dissemination request.
- pid - required persistent identifier of the digital object.
- dsid - required datastream identifier for the datastream.
- dateTime - optional dateTime value indicating dissemination of a version
of the digital object at the specified point in time.
- GetObjectProfile URL syntax:
protocol://hostname:port/soapclient/apia?action_=GetObjectProfile&PID_=pid[&
asOfDateTime_=dateTime][&xml=boolean]
This syntax requests an object profile for the specified digital object.
- protocol - either http or https.
- hostname - required hostname of the Fedora server.
- port - required port number on which the Fedora server is running.
- soapclient - required name of the sample soap client.
- apia - required name of the sample soap client
- GetObjectProfile - required action name for getting an Object Profile
request.
- pid - required persistent identifier of the digital object.
- dateTime - optional dateTime value indicating dissemination of a version
of the digital object at the specified point in time.
- GetObjectHistory URL syntax:
protocol://hostname:port/soapclient/apia?action_=GetObjectHistory&PID_=pid[&
xml_=boolean]
This syntax requests an object history for the specified digital object.
- protocol - either http or https.
- hostname - required hostname of the Fedora server.
- port - required port number on which the Fedora server is running.
- soapclient - required name of the sample soap client.
- apia - required name of the sample soap client
- GetObjectHistory - required action name for getting an object history
request.
- pid - required persistent identifier of the digital object.
- boolean - an optional parameter indicating the requested output format. A
value of "true" indicates a return type of text/xml; the absence of the xml
parameter or a value of "false" indicates format is to be text/html.
- DescribeRepository URL syntax:
protocol://hostname:port/soapclient/apia?action_=DescribeRepository[&xml_=
boolean]
This syntax requests an object profile for the specified digital object.
- protocol - either http or https.
- hostname - required hostname of the Fedora server.
- port - required port number on which the Fedora server is running.
- soapclient - required name of the sample soap client.
- apia - required name of the sample soap client
- DescribeRepository - required action name for getting an describe
repository request.
- boolean - an optional parameter indicating the requested output format. A
value of "true" indicates a return type of text/xml; the absence of the xml
parameter or a value of "false" indicates format is to be text/html.
- ListDatastreams URL syntax:
protocol://hostname:port/soapclient/apia?action_=ListDatastreams&PID_=pid[&
asOfDateTime_=dateTime][&xml_=boolean]
This syntax requests a list of datastreams for the specified digital object.
- protocol - either http or https.
- hostname - required hostname of the Fedora server.
- port - required port number on which the Fedora server is running.
- soapclient - required name of the sample soap client.
- apia - required name of the sample soap client
- ListDatastreams - required action name for getting a list datastreams
request.
- pid - required persistent identifier of the digital object.
- dateTime - optional dateTime value indicating dissemination of a version
of the digital object at the specified point in time.
- boolean - an optional parameter indicating the requested output format. A
value of "true" indicates a return type of text/xml; the absence of the xml
parameter or a value of "false" indicates format is to be text/html.
- ListMethods URL syntax:
protocol://hostname:port/soapclient/apia?action_=ListMethods&PID_=pid[&
asOfDateTime_=ateTime][xml_=boolean]
This syntax requests a list of methods for the specified digital object.
- protocol - either http or https.
- hostname - required hostname of the Fedora server.
- port - required port number on which the Fedora server is running.
- soapclient - required name of the sample soap client.
- apia - required name of the sample soap client
- ListMethods - required action name for getting a list methods request.
- pid - required persistent identifier of the digital object.
- dateTime - optional dateTime value indicating dissemination of a version
of the digital object at the specified point in time.
- boolean - an optional parameter indicating the requested output format. A
value of "true" indicates a return type of text/xml; the absence of the xml
parameter or a value of "false" indicates format is to be text/html.