SAS 9.1.3 Integration Technologies » Developer's Guide


Publish Event Interface
CALL Routines
EVENT_BEGIN
EVENT_BODY
EVENT_PUBLISH
EVENT_END
XML Specification for Generic Events
XML Specification for SASPackage Events
Examples of Published Events
Publishing Framework

XML Specification for SASPackage Events

Implicitly generated events (SASPackage events) are published using well-formed XML documents whose details are generated as a result of the package publishing process.

In the following example, the published package contains each entry type: SAS catalog, SAS data set, external file, FDB, MDDB, HTML file, file reference, SQL view, viewer, and nested package.

   <?xml version="1.0" encoding="UTF-8">
   <sas-event:Event 
      xmlns:sas-event=
      "http://support.sas.com/xml/namespace/services.events-1.1"
      sas-event:name="SASPackage.ChannelName">
      <sas-event:Header>
         <sas-event:Version>1.0</sas-event:Version>
         <sas-event:SentAt>timestamp</sas-event:SentAt>
      </sas-event:Header>
      <sas-event:Body>
         <sas-publish:Package 
            xmlns:sas-publish=
            "http://support.sas.com/xml/namespace/services.publish-1.1"
            xmlns:userSpecPkgNamespace="userSpecPkgNamespaceValue"
            sas-publish:version="1.0" 
            sas-publish:packageUrl="URL to saved package"
            sas-publish:description="package description" 
            sas-publish:abstract="package abstract"
            sas-publish:channel="channel on which 
               the package was published" 
               userSpecName="value">
            <sas-publish:Entries>
               <sas-publish:Entry sas-publish:type="catalog" 
                  sas-publish:description="description" 
                  userSpecName="value"> 
                  <sas-publish:Catalog 
                     sas-publish:name="member name"/>
               </sas-publish:Entry>
               <sas-publish:Entry sas-publish:type="dataset" 
                  sas-publish:description="description" 
                  userSpecName="value">
                  <sas-publish:Dataset 
                     sas-publish:name="member name"/> 
               </sas-publish:Entry>
               <sas-publish:Entry sas-publish:type="fdb" 
                  sas-publish:description="description" 
                  userSpecName="value">
                  <sas-publish:FDB 
                     sas-publish:name="member name"/>
               </sas-publish:Entry>
               <sas-publish:Entry sas-publish:type="file" 
                  sas-publish:description="description" 
                  userSpecName="value">
                  <sas-publish:File 
                     sas-publish:type="text or binary" 
                     sas-publish:name="file name" 
                     sas-publish:mimetype="MIME 
                     type"/>
               </sas-publish:Entry>
               <sas-publish:Entry sas-publish:type="html" 
                  sas-publish:description="description" 
                  userSpecName="value">
                  <sas-publish:HTML 
                     sas-publish:type="body, frame, 
                        contents or page"
                     sas-publish:name="file name" 
                     sas-publish:url="URL"/>
                        <sas-publish:Companion 
                           sas-publish:name="file name" 
                           sas-publish:url="URL" 
                           sas-publish:mimetype="MIME 
                           type"/>
               </sas-publish:Entry>
               <sas-publish:Entry sas-publish:type="mddb" 
                  sas-publish:description="description" 
                  userSpecName="value">
                  <sas-publish:MDDB 
                     sas-publish:name="member name"/>
               </sas-publish:Entry>
               <sas-publish:Entry 
                  sas-publish:type="reference" 
                  sas-publish:description="description" 
                  userSpecName="value">
                  <sas-publish:Reference 
                     sas-publish:type="html or url" 
                     sas-publish:reference="reference"/>
               </sas-publish:Entry>
               <sas-publish:Entry 
                  sas-publish:type="sqlview" 
                  sas-publish:description="description" 
                  userSpecName="value">
                  <sas-publish:SQLview 
                     sas-publish:name="member name"/>
               </sas-publish:Entry>
               <sas-publish:Entry 
                  sas-publish:type="viewer" 
                  sas-publish:description="description"
                  userSpecName="value">
                  <sas-publish:Viewer 
                     sas-publish:type="text or html" 
                     sas-publish:name="file name" 
                     sas-publish:mimetype="MIME  
                     type"/>
               </sas-publish:Entry>
               <sas-publish:Entry 
                  sas-publish:type="nestedpackage" 
                  sas-publish:description="description"
                  userSpecName="value">
                  <sas-publish:Package 
                     xmlns:userSpecPackageNamespace=
                     "userSpecPackageNamespaceValue" 
                     sas-publish:description="package 
                        description" 
                     sas-publish:abstract="package 
                        abstract" 
                     userSpecName="value" >
                     <sas-publish:Entries>
                        <sas-publish:Entry 
                           sas-publish:type="entry type" 		    
                           sas-publish:description="description"  
                           userSpecName="value">
                        </sas-publish:Entry>
                           .
                           .
                        additional Entry elements for 
                           this nested package 
                           .
                           .
                     </sas-publish:Entries>
                  </sas-publish:Package>
               </sas-publish:Entry>
            </sas-publish:Entries/>
         </sas-publish:Package>
      </sas-event:Body>
   </sas-event:Event>

Header Elements

The header elements are standard event elements. The event name is specified as:

   "SASPackage.ChannelName"

Explanations of the header elements follow:

Element Description
Version Version of the event message.
SentAt A timestamp that specifies when the event was sent.

Explanations of the body elements follow:

Element Description
Package Begins the package definition. The following attributes are supported for this element:
version
the version of SASPackage.
packageUrl
URL to saved package.
description
the package description.
abstract
the package abstract.
channel
the channel that the package was published to.
packageUrl
a URL to the saved package. Packages saved to an archive or to a WebDAV server.
one or more user-specified name/value pairs.

The sas-publish namespace is defined in this element. Additionally, other user-specified namespaces can be declared in this element via the xmlns: prefix. These will be included if the user specified the NAMESPACES property when creating the package.

Entries Define the entries contained within the package.
Entry Defines an individual package entry. This element will contain the required attribute, type. This attribute identifies the type of entry. Valid types include catalog, dataset, fdb, file, html, mddb, reference, sqlview, viewer, and nestedpackage.

If the entry description was specified at publish time, the description attribute will be included. If a name/value was specified for the entry, one or more user-specified name/value attributes will be included in the element. The name portion of the name/value specification will be provided as the attribute, and the value portion will be provided as the attribute value.

Catalog Defines an individual catalog entry. The required name attribute provides the catalog member name.
Dataset Defines an individual data set entry. The required name attribute provides the data set member name.
FDB Defines an individual FDB entry. The required name attribute provides the FDB member name.
File Defines an individual file entry. The name and type attributes are required. They provide the filename and the file type. Valid file types include text or binary. Optionally, the user-specified MIME type of the file entry will be provided in the mimetype attribute.
HTML Defines an individual HTML entry. The required type and name attributes identify the type of HTML file and its file name. Valid types include body, frame, contents, and page. Optionally, the url attribute identifies the URL.
Companion Defines an individual companion file in an HTML entry. The required name attribute identifies name of the file. Optionally, the url and mimetype attributes can be provided. They identify the URL and the MIME type of the file, respectively.
MDDB Defines an individual MDDB entry. The required name attribute provides the MDDB member name.
Reference Defines an individual reference entry. The required type attribute identifies the type of reference, either html or url. The actual reference inserted into the package is provided in the reference attribute.
SQLview Defines an individual SQL view. The required name attribute provides the SQL view member name.
Viewer Defines an individual viewer entry. The viewer type is provided in the type attribute. Valid types include text or html. The name attribute identifies the name of the viewer file. Optionally, the user-specified MIME type for the viewer entry will be provided in the mimetype attribute.