Bric::SOAP - The Bricolage SOAP interface
$Revision: 1.44 $
$Date: 2004/03/16 21:43:57 $
use Bric::SOAP;
This module serves as a root class for the Bric::SOAP classes. It also contains the functional and technical specifications for the Bricolage SOAP interface.
The Bricolage SOAP interface expose key Bricolage systems to automation. This section describes intended functionality -- implementation details are described below in the Technical Specification section.
The Bricolage SOAP interface supports the following features:
The functionality described above exposes a great deal power. Here are some potential use cases:
list()
method in Bricolage classes.
This section describes the implementation of the Bricolage SOAP functional specification described above.
The following modules support the SOAP interface. See the documentation for each module for interface details, including XML Schemas and SOAP client examples.
login()
function and get an HTTP cookie to use with
calls to the other SOAP interfaces.
All of the Bricolage SOAP modules described above share a common SOAP serialization strategy described here.
http://bricolage.sourceforge.net
To specify a module within that namespace, append the pieces as path components. For example, to call methods in Bric::SOAP::Story use the namespace:
http://bricolage.sourceforge.net/Bric/SOAP/Story
For the SOAP::Lite users in the audience, this is the ``uri'' setting.
Bric::SOAP::Story->list_ids({ title => '%foo%', publish_status => 1 });
Is called through SOAP as:
<SOAP-ENV:Body> <namesp2:list_ids xmlns:namesp2="http://bricolage.sourceforge.net/Bric/SOAP/Story"> <title xsi:type="xsd:string">%foo%</title> <publish_status xsi:type="xsd:int">1</publish_status> </namesp2:list_ids> </SOAP-ENV:Body>
SOAP::Lite clients can generate this call using SOAP::Data::name()
to name
the parameters:
import SOAP::Data 'name'; my $result = $soap->list_ids(name(title => '%foo%'), name(publish_status => 1) );
In most cases, Perl doesn't distinguish between strings and numbers. When writing a SOAP client you should feel free to type your parameters in whatever way makes most sense in your implementation language.
Bric::SOAP::Story->list_ids()
returns a list of story IDs
in this structure:
<namesp2:list_idsResponse xmlns:namesp2="http://bricolage.sourceforge.net/Bric/SOAP/Story"> <story_ids SOAP-ENC:arrayType="xsd:int[4]" xsi:type="SOAP-ENC:Array"> <story_id xsi:type="xsd:int">1027</story_id> <story_id xsi:type="xsd:int">1028</story_id> <story_id xsi:type="xsd:int">1029</story_id> <story_id xsi:type="xsd:int">1030</story_id> </story_ids> </namesp2:list_idsResponse>
And an empty response returns an empty array:
<namesp1:list_idsResponse xmlns:namesp1="http://bricolage.sourceforge.net/Bric/SOAP/Story"> <story_ids SOAP-ENC:arrayType="xsd:ur-type[0]" xsi:type="SOAP-ENC:Array"/> </namesp1:list_idsResponse>
SOAP::Lite clients can access this return value as an array reference:
my $story_ids = $response->result; foreach my $id (@$story_ids) { frobnicate($id); }
create()
and export()
, for example). These
documents must be encoded in Base64 for performance reasons. See the
PERFORMANCE section of the SOAP::Lite documentation for a full
explanation of why this is necessary. This is not a limitation of SOAP::Lite
in particular but the explanation is particularly lucid.
For SOAP::Lite clients, generating Base64 parameters is very easy:
my $document = name(document => $xml)->type('base64');
And on decoding, returned base64 will be done automatically.
The XML Schema for these documents is included below.
fault()
method and access the error message with
faultstring()
:
my $response = $soap->list_ids(...); die "SOAP Error: " . $response->faultstring if $response->fault;
The XSD source:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://bricolage.sourceforge.net/assets.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://bricolage.sourceforge.net/assets.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="assets"> <xs:annotation> <xs:documentation>a set of Bricolage assets</xs:documentation> </xs:annotation> <xs:complexType mixed="0"> <xs:sequence maxOccurs="unbounded"> <xs:element name="story" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="site"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="description"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="1024"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="slug"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="primary_uri"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="128"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="priority"> <xs:simpleType> <xs:restriction base="xs:int"> <xs:minInclusive value="1"/> <xs:maxInclusive value="5"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="publish_status" type="xs:boolean"/> <xs:element name="active" type="xs:boolean"/> <xs:element name="source"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="128"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="cover_date" type="xs:dateTime"/> <xs:element name="expire_date" type="xs:dateTime" minOccurs="0"> <xs:annotation> <xs:documentation>omitted if no expire date</xs:documentation> </xs:annotation> </xs:element> <xs:element name="first_publish_date" type="xs:dateTime" minOccurs="0"> <xs:annotation> <xs:documentation>omitted if not published</xs:documentation> </xs:annotation> </xs:element> <xs:element name="publish_date" type="xs:dateTime" minOccurs="0"> <xs:annotation> <xs:documentation>omitted if not published</xs:documentation> </xs:annotation> </xs:element> <xs:element name="categories"> <xs:complexType> <xs:sequence> <xs:element name="category" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="primary" type="xs:boolean" use="optional"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="output_channels" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="output_channel" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="site" type="xs:string" use="require"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="keywords"> <xs:complexType> <xs:sequence> <xs:element name="keyword" type="xs:string" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>This is just a list of keyword names. if we ever start using the full capabilities of Bric::Biz::Keyword then this will need expansion. It would probably make sense to do a Bric::SOAP::Keyword in that case.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="contributors"> <xs:complexType> <xs:sequence> <xs:element name="contributor" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>This is incomplete... Either this element should be expanded to properly serialize all the available contributor data or it should reference a top-level contributor element serviced by Bric::SOAP::Contrib.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="fname" type="xs:string"/> <xs:element name="mname" type="xs:string"/> <xs:element name="lname" type="xs:string"/> <xs:element name="type" type="xs:string"/> <xs:element name="role" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="elements"> <xs:complexType> <xs:sequence> <xs:element name="data" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="element" type="xs:string" use="required"/> <xs:attribute name="order" type="xs:int" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element name="container" type="container_type" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="element" type="xs:string" use="required"/> <xs:attribute name="alias_id" type="xs:string" use="required"/> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element> <xs:element name="media" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="site"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="description"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="1024"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="uri"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="128"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="priority"> <xs:simpleType> <xs:restriction base="xs:int"> <xs:minInclusive value="1"/> <xs:maxInclusive value="5"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="publish_status" type="xs:boolean"/> <xs:element name="active" type="xs:boolean"/> <xs:element name="source"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="128"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="cover_date" type="xs:dateTime"/> <xs:element name="expire_date" type="xs:dateTime" minOccurs="0"> <xs:annotation> <xs:documentation>omitted if no expire date</xs:documentation> </xs:annotation> </xs:element> <xs:element name="publish_date" type="xs:dateTime" minOccurs="0"> <xs:annotation> <xs:documentation>omitted if not published</xs:documentation> </xs:annotation> </xs:element> <xs:element name="category" type="xs:string"/> <xs:element name="contributors"> <xs:complexType> <xs:sequence> <xs:element name="contributor" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>This is incomplete... Either this element should be expanded to properly serialize all the available contributor data or it should reference a top-level contributor element serviced by Bric::SOAP::Contrib.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element name="fname" type="xs:string"/> <xs:element name="mname" type="xs:string"/> <xs:element name="lname" type="xs:string"/> <xs:element name="type" type="xs:string"/> <xs:element name="role" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="elements"> <xs:complexType> <xs:sequence> <xs:element name="data" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="element" type="xs:string" use="required"/> <xs:attribute name="order" type="xs:int" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element name="container" type="container_type" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="file" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="size"> <xs:simpleType> <xs:restriction base="xs:integer"> <xs:minInclusive value="0"/> <xs:maxInclusive value="9999999999"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="data"> <xs:simpleType> <xs:restriction base="xs:base64Binary"> <xs:minLength value="0"/> <xs:maxLength value="9999999999"/> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="element" type="xs:string" use="required"/> <xs:attribute name="alias_id" type="xs:string" use="required"/> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element> <xs:element name="template" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="site"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="element"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="type"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="20"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="file_name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="description"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="1024"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="priority"> <xs:simpleType> <xs:restriction base="xs:int"> <xs:minInclusive value="1"/> <xs:maxInclusive value="5"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="deploy_status" type="xs:boolean"/> <xs:element name="active" type="xs:boolean"/> <xs:element name="category" type="xs:string"/> <xs:element name="output_channel" type="xs:string"/> <xs:element name="expire_date" type="xs:dateTime" minOccurs="0"> <xs:annotation> <xs:documentation>omitted if no expire date</xs:documentation> </xs:annotation> </xs:element> <xs:element name="deploy_date" type="xs:dateTime" minOccurs="0"> <xs:annotation> <xs:documentation>omitted if not deployed</xs:documentation> </xs:annotation> </xs:element> <xs:element name="data" type="xs:base64Binary" minOccurs="0"/> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element> <xs:element name="element" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="description"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="burner"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="type"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="active" type="xs:boolean"/> <xs:element name="top_level" type="xs:boolean"/> <xs:element name="sites" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="site" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="primary_oc" type="xs:string" /> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="output_channels" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="output_channel" maxOccurs="unbounded"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="keywords"> <xs:complexType> <xs:sequence> <xs:element name="keyword" type="xs:string" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>This is just a list of keyword names. if we ever start using the full capabilities of Bric::Biz::Keyword then this will need expansion. It would probably make sense to do a Bric::SOAP::Keyword in that case.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="subelements"> <xs:complexType> <xs:sequence> <xs:element name="subelement" minOccurs="0" maxOccurs="unbounded"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="fields"> <xs:complexType> <xs:sequence> <xs:element name="field" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="type" type="xs:string"/> <xs:element name="name" type="xs:string"/> <xs:element name="label" type="xs:string"/> <xs:element name="required" type="xs:boolean"/> <xs:element name="repeatable" type="xs:boolean"/> <xs:element name="default" type="xs:string" minOccurs="0"/> <xs:element name="options" type="xs:string" minOccurs="0"/> <xs:element name="multiple" type="xs:boolean" minOccurs="0"/> <xs:element name="size" type="xs:int" minOccurs="0"/> <xs:element name="max_size" type="xs:int" minOccurs="0"/> <xs:element name="rows" type="xs:int" minOccurs="0"/> <xs:element name="cols" type="xs:int" minOccurs="0"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="id" type="xs:integer" use="required"/> </xs:complexType> </xs:element> <xs:element name="category" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="site"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="description"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="path"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="active" type="xs:boolean"/> <xs:element name="adstring"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="adstring2"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="keywords"> <xs:complexType> <xs:sequence> <xs:element name="keyword" type="xs:string" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>This is just a list of keyword names. if we ever start using the full capabilities of Bric::Biz::Keyword then this will need expansion. It would probably make sense to do a Bric::SOAP::Keyword in that case.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element> <xs:element name="media_type" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="description"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="active" type="xs:boolean"/> <xs:element name="exts"> <xs:complexType> <xs:sequence> <xs:element name="ext" type="xs:string" minOccurs="0" maxOccurs="unbounded"> <xs:annotation> <xs:documentation>This is just a list of extensions.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element> <xs:element name="site" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="description"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="domain_name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="active" type="xs:boolean"/> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element> <xs:element name="keyword" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"/> </xs:simpleType> </xs:element> <xs:element name="screen_name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="sort_name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="active" type="xs:boolean"/> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element> <xs:element name="desk" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="description"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="publish" type="xs:boolean"/> <xs:element name="active" type="xs:boolean"/> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element> <xs:element name="user" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="prefix"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="32"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="fname"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="mname"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="lname"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="suffix"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="32"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="login"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="128"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="password"> <xs:simpleType> <xs:annotation> <xs:documentation>password isn't implemented yet</xs:documentation> </xs:annotation> <xs:restriction base="xs:string"> <xs:maxLength value="32"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="active" type="xs:boolean"/> <xs:element name="contacts"> <xs:complexType> <xs:sequence> <xs:element name="contact" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="type" type="xs:string" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element>
<xs:element name="workflow" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:sequence> <xs:element name="name"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="description"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="256"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="site"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:maxLength value="64"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="type"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="Story"/> <xs:enumeration value="Media"/> <xs:enumeration value="Template"/> </xs:restriction> </xs:simpleType> </xs:element> <xs:element name="active" type="xs:boolean"/> <xs:element name="desks"> <xs:complexType> <xs:sequence> <xs:element name="desk" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="start" type="xs:boolean" use="optional"/> <xs:attribute name="publish" type="xs:boolean" use="optional"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="id" type="xs:int" use="required"/> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="container_type" mixed="0"> <xs:annotation> <xs:documentation>An element data container - a recursive type.</xs:documentation> </xs:annotation> <xs:sequence> <xs:element name="data" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:simpleContent> <xs:extension base="xs:string"> <xs:attribute name="element" type="xs:string" use="required"/> <xs:attribute name="order" type="xs:int" use="required"/> </xs:extension> </xs:simpleContent> </xs:complexType> </xs:element> <xs:element name="container" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:complexContent> <xs:extension base="container_type"/> </xs:complexContent> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute name="element" type="xs:string" use="required"/> <xs:attribute name="order" type="xs:int" use="required"/> <xs:attribute name="related_story_id" type="xs:int" use="optional"/> <xs:attribute name="related_media_id" type="xs:int" use="optional"/> <xs:attribute name="relative" type="xs:boolean" use="optional"/> </xs:complexType> </xs:schema>
Here's a simple story with some keywords and no contributors:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assets xmlns="http://bricolage.sourceforge.net/assets.xsd"> <story id="1024" element="Book Review"> <site>Default Site</site> <name>Story One</name> <description>a description of story one</description> <slug>one</slug> <primary_uri>/2004/02/22/one</primary_uri> <priority>3</priority> <publish_status>0</publish_status> <active>1</active> <source>Internal</source> <cover_date>2004-02-22T22:18:00Z</cover_date> <categories> <category primary="1">/</category> </categories> <output_channels> <output_channel primary="1">Web</output_channel> </output_channels> <keywords> <keyword>key one</keyword> <keyword>key two</keyword> </keywords> <contributors></contributors> <elements> <data order="2" element="deck">deck one</data> <container order="3" element="page"> <data order="0" element="paragraph">para one</data> <data order="1" element="paragraph">para two</data> <container order="2" element="inset"> <data order="0" element="copy">inset copy</data> </container> </container> </elements> </story> </assets>
bric_soap
manual by running:
bric_soap --man
or, if Bricolage's bin directory isn't in your path:
/usr/local/bricolage/bin/bric_soap --man
See bric_republish in bin/ for an implementation that republishes already published stories. More general automated publishing can be performed through bric_soap.
See bric_dev_sync in bin/ for a complete implementation.
bric_soap
bric_dev_sync
bric_republish
Sam Tregar <stregar@about-inc.com>