Daisy documentation
 PreviousHomeNext 
4.12.3 ConceptsBook Index4.12.5 About the instruction reference

4.12.4 Testing a publisher request

The Publisher can be easily called using the  HTTP interface. Just create an XML file containing the publisher request, and submit it using a tool like wget, which is available on many Unix systems (there's a Windows version too).

For example, create a file called pubreq.xml containing something like this:

<?xml version="1.0"?>
<p:publisherRequest
  xmlns:p="http://outerx.org/daisy/1.0#publisher"
  locale="en-US">

  <p:document id="1-DSY">
    <p:aclInfo/>
    <p:availableVariants/>
    <p:annotatedDocument/>
    <p:annotatedVersionList/>
  </p:document>

</p:publisherRequest>

The above example assumes a document with id 1-DSY exists. If not, just change the document id.

Now we can execute the publisher request:

wget --post-file=pubreq.xml --http-user=testuser@1
     --http-passwd=testuser http://localhost:9263/publisher/request

See the HTTP API documentation for more examples on using wget.

wget will save the response in a file, typically called request. You can open it in any text or XML editor, but to view it easily readable you can use:

xmllint --format request | less
 PreviousHomeNext 
4.12.3 Concepts4.12.5 About the instruction reference