Quark QuarkXPress Server - 8.5 User Manual

QXP Server 8.5 Web Integration Guide

CONTENTS

Contents
Overview...........................................................................................8
Supported interfaces..............................................................................................8
The Dynamic Publishing Process (DPP)...................................................................8
The WIG and the XTensions Developer Kit (XDK)..................................................9
Changes in this version...................................................................10
Getting started...............................................................................11
Getting started: HTTP...........................................................................................11
Dissecting a QXP Server URL........................................................................................11
Interpreting the QXP Server Manager response...........................................................12
HTTP GET and POST Requests.....................................................................................12
Getting started: Web services..............................................................................16
QRequestContext..........................................................................................................17
QManagerSDKSvc.........................................................................................................18
QRequest......................................................................................................................22
RequestParameters.......................................................................................................22
QContentData...............................................................................................................23
QException...................................................................................................................24
QManagerScriptingSvc.................................................................................................24
QXP Server Manager............................................................................................26
Integrating with other Web servers...............................................................................26
Embedding QXP Server Manager.................................................................................27
Writing special request handlers...................................................................................27
Implementing a custom load balancer..........................................................................28
Generating a custom client SDK class...........................................................................29
Understanding ManagerSDK.xml..................................................................................30
Scripting support...........................................................................................................32
Keep document open (sessions)...................................................................................32
Using the Web interface.................................................................34
Understanding rendering......................................................................................34
Understanding render types.................................................................................35
eps.................................................................................................................................36
ii | QXP SERVER 8.5 WEB INTEGRATION GUIDE
CONTENTS
jpeg...............................................................................................................................38
literal..............................................................................................................................40
pdf.................................................................................................................................40
png................................................................................................................................45
ppml..............................................................................................................................48
qcddoc..........................................................................................................................50
qxpdoc..........................................................................................................................51
screenpdf.......................................................................................................................53
swf.................................................................................................................................56
Understanding render modifiers...........................................................................58
Box................................................................................................................................59
Boxes.............................................................................................................................59
Compositionzone..........................................................................................................60
Layer..............................................................................................................................61
Layout............................................................................................................................63
Movepages....................................................................................................................63
Page..............................................................................................................................65
Pages.............................................................................................................................66
Scale..............................................................................................................................66
Spreads.........................................................................................................................67
Using content modifiers........................................................................................68
Inserting text.................................................................................................................68
Applying a font at import..............................................................................................69
Inserting a picture.........................................................................................................70
Importing XML with placeholders.................................................................................72
Using XML modify................................................................................................74
Modifying box properties and content.........................................................................75
Creating boxes..............................................................................................................78
Deleting boxes..............................................................................................................80
Grouping and ungrouping items...................................................................................81
Creating tables..............................................................................................................82
Modifying text attributes...............................................................................................83
Modifying picture properties.........................................................................................87
Importing data...............................................................................................................90
Exporting Job Jackets files during deconstruction.......................................................93
Using XML deconstruct and construct..................................................................93
Deconstructing a project...............................................................................................94
Constructing a project...................................................................................................97
Working with pages and spreads................................................................................100
Working with layers.....................................................................................................101
QXP SERVER 8.5 WEB INTEGRATION GUIDE | iii
CONTENTS
Working with boxes.....................................................................................................101
Working with groups...................................................................................................103
Working with pictures..................................................................................................104
Working with text........................................................................................................105
Working with tables.....................................................................................................107
Working with sections.................................................................................................109
Working with Composition Zones...............................................................................109
Using XSL transformation............................................................................................110
Working with lists........................................................................................................110
Working with anchored boxes.....................................................................................111
Working with placeholders..........................................................................................112
Working with metadata...............................................................................................114
Working with hidden text............................................................................................114
Using administrative request handlers...............................................................115
Addfile.........................................................................................................................116
Cplatform....................................................................................................................120
Delete..........................................................................................................................120
Clang...........................................................................................................................121
Fileinfo.........................................................................................................................123
Flush............................................................................................................................124
Flushall........................................................................................................................125
Getdocinfo..................................................................................................................125
Getdocpoollist.............................................................................................................127
Getprocessid...............................................................................................................128
Getprojinfo..................................................................................................................129
Getserverinfo...............................................................................................................130
Preflight.......................................................................................................................131
Setprefs.......................................................................................................................132
Shutdown....................................................................................................................133
Modifier DTD (annotated).............................................................134
Entities (Modifier DTD).......................................................................................134
PROJECT (Modifier DTD)....................................................................................136
SAVEAS (Modifier DTD)......................................................................................137
LAYOUT (Modifier DTD).....................................................................................138
ID (Modifier DTD)................................................................................................139
LAYOUTPROPERTY (Modifier DTD)....................................................................140
COLUMNGUIDES (Modifier DTD).......................................................................140
ARTICLE (Modifier DTD).....................................................................................141
COMPONENT (Modifier DTD)............................................................................141
SPREAD (Modifier DTD)......................................................................................142
iv | QXP SERVER 8.5 WEB INTEGRATION GUIDE
CONTENTS
PAGE (Modifier DTD)..........................................................................................142
SECTION (Modifier DTD)....................................................................................143
BOX (Modifier DTD)............................................................................................144
METADATA (Modifier DTD)................................................................................145
VALUE (Modifier DTD)........................................................................................145
TEXT (Modifier DTD)...........................................................................................146
INSET (Modifier DTD).........................................................................................148
STORY (Modifier DTD)........................................................................................148
COPYFIT (Modifier DTD).....................................................................................149
PARAGRAPH (Modifier DTD)..............................................................................150
TEXTNODEPH (Modifier DTD)............................................................................151
TEXTPH (Modifier DTD)......................................................................................151
GROUPCHARACTERS (Modifier DTD)................................................................152
FORMAT (Modifier DTD)....................................................................................153
KEEPLINESTOGETHER (Modifier DTD)..............................................................154
DROPCAP (Modifier DTD)..................................................................................155
LOCKTOGRID (Modifier DTD).............................................................................155
TABSPEC (Modifier DTD)....................................................................................156
TAB (Modifier DTD)............................................................................................156
RULE (Modifier DTD)..........................................................................................156
HIDDEN (Modifier DTD)......................................................................................158
RICHTEXT (Modifier DTD)...................................................................................159
RUBITEXT (Modifier DTD)...................................................................................167
ANCHOREDBOXREF (Modifier DTD)..................................................................168
LINKEDBOX (Modifier DTD)...............................................................................169
OVERMATTER (Modifier DTD)............................................................................170
PICTURE (Modifier DTD).....................................................................................170
CLIPPING (Modifier DTD)...................................................................................172
SPLINESHAPE (Modifier DTD)............................................................................175
CONTOURS (Modifier DTD)................................................................................176
CONTOUR (Modifier DTD)..................................................................................176
VERTICES (Modifier DTD)...................................................................................176
VERTEX (Modifier DTD)......................................................................................177
LEFTCONTROLPOINT (Modifier DTD)................................................................177
VERTEXPOINT (Modifier DTD)...........................................................................178
RIGHTCONTROLPOINT (Modifier DTD)..............................................................178
GEOMETRY (Modifier DTD)................................................................................179
FIT (Modifier DTD)..............................................................................................181
MAX (Modifier DTD)...........................................................................................181
MIN (Modifier DTD)............................................................................................181
LOCATION (Modifier DTD).................................................................................182
SIZE (Modifier DTD)............................................................................................182
SCALETO (Modifier DTD)....................................................................................182
QXP SERVER 8.5 WEB INTEGRATION GUIDE | v
CONTENTS
RELPOSITION (Modifier DTD).............................................................................183
ORIGIN (Modifier DTD).......................................................................................183
WIDTH (Modifier DTD)........................................................................................183
HEIGHT(Modifier DTD).......................................................................................184
POSITION (Modifier DTD)...................................................................................184
MOVEUP (Modifier DTD)....................................................................................184
MOVEDOWN (Modifier DTD).............................................................................184
MOVELEFT (Modifier DTD).................................................................................184
MOVERIGHT (Modifier DTD)..............................................................................185
GROWACROSS (Modifier DTD)..........................................................................185
GROWDOWN (Modifier DTD).............................................................................185
SHRINKACROSS (Modifier DTD).........................................................................185
SHRINKDOWN (Modifier DTD)...........................................................................186
ALLOWBOXONTOPASTEBOARD (Modifier DTD)..............................................186
ALLOWBOXOFFPAGE (Modifier DTD)...............................................................186
STACKINGORDER (Modifier DTD)......................................................................187
SUPPRESSOUTPUT (Modifier DTD)....................................................................187
TOP (Modifier DTD)............................................................................................187
LEFT (Modifier DTD)...........................................................................................187
BOTTOM (Modifier DTD)....................................................................................187
RIGHT (Modifier DTD).........................................................................................188
RUNAROUND (Modifier DTD)............................................................................188
LAYER (Modifier DTD)........................................................................................191
RGBCOLOR (Modifier DTD)................................................................................192
LINESTYLE (Modifier DTD).................................................................................192
CONTENTPH (Modifier DTD)..............................................................................193
CONTENT (Modifier DTD)..................................................................................193
SHADOW (Modifier DTD)...................................................................................194
FRAME (Modifier DTD).......................................................................................196
PLACEHOLDER (Modifier DTD)..........................................................................197
TABLE (Modifier DTD).........................................................................................198
PARENTTABLE (Modifier DTD)...........................................................................199
TABLEBREAK (Modifier DTD).............................................................................200
CHILDID (Modifier DTD).....................................................................................200
ADDCELLS (Modifier DTD).................................................................................200
DELETECELLS (Modifier DTD)............................................................................201
COLSPEC (Modifier DTD)....................................................................................202
COLUMN (Modifier DTD)....................................................................................202
ROW (Modifier DTD)...........................................................................................203
HEADER (Modifier DTD).....................................................................................204
FOOTER (Modifier DTD).....................................................................................205
CELL (Modifier DTD)...........................................................................................205
GRID (Modifier DTD)...........................................................................................206
vi | QXP SERVER 8.5 WEB INTEGRATION GUIDE
CONTENTS
GRIDLINE (Modifier DTD)...................................................................................207
GROUP (Modifier DTD).......................................................................................208
BOXREF (Modifier DTD).....................................................................................208
COMPOSITIONZONE (Modifier DTD).................................................................208
LIST (Modifier DTD)............................................................................................210
RUBI (Modifier DTD)...........................................................................................210
Sample applications.......................................................................212
Sample applications: QXP Server Manager........................................................212
Sample applications legal notice.........................................................................212
Contacting Quark..........................................................................221
Legal notices.................................................................................222
QXP SERVER 8.5 WEB INTEGRATION GUIDE | vii

OVERVIEW

Overview
Welcome to the QuarkXPress® Server Web Integration Guide (WIG). The WIG describes the
QuarkXPress Server interface and includes sample applications that demonstrate how to
build a solution that integrates with QuarkXPress Server or QuarkXPress Server Manager.

Supported interfaces

The WIG describes two interfaces available in QuarkXPress Server:
HTTP: Lets you interact with the server using URLs that contain calls or point to XML
files that contain calls. You can write client applications in any language that supports
HTTP requests. For more information, see "Getting started: HTTP".
Web services: Lets you interact with the server via Web services using the
QuarkXPress Server Manager object model. You can write client applications in Java, .NET,
or any other programming language that can consume SOAP-based Web services. For more
information, see "Getting started: Web services".
To develop a custom load balancer or a custom application in Java, you must have
version 1.5 of the JDK.
To use Web Objects in ASP.NET / Visual C#, you must have the .NET 1.1/2.0 framework
and development environment (Visual Studio).

The Dynamic Publishing Process (DPP)

The Dynamic Publishing Process (DPP) has several stages. You may not need to use all of
these stages every time, but this the order in which they occur:
Pre-Processing Stage: During this stage, QuarkXPress Server performs any necessary initial
steps, such as creating style sheets, colors, and H&J rules for a new QuarkXPress project.
Content Loading Stage: During this stage, QuarkXPress Server loads dynamic content into
boxes in the project.
8 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
Layout Modification Stage: During this stage, QuarkXPress Server modifies the layout of the
project.
Post-Processing Stage: During this stage, QuarkXPress Server examines the project and
performs maintenance tasks.

The WIG and the XTensions Developer Kit (XDK)

The WIG lets Web developers build client applications that use the features available in
QuarkXPress Server. The XDK lets software developers implement features that are not
available in QuarkXPress Server, such as server-side processing and application-specific
services.
The QuarkXPress Server XDK requires knowledge of C or C++.
OVERVIEW
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 9

CHANGES IN THIS VERSION

Changes in this version
Changes in QuarkXPress Server 8.5 include the following:
The FITTEXT element type lets you control the way in which stories are fit into text boxes
on a story-by-story basis, rather than requiring you to always use the application
preferences. For more information, see "FITTEXT (Modifier DTD)." Note that the
FITTEXTTOBOX still works the same way it did in the previous version, using application
preferences.
The Clang and Cplatform administrative request handlers have been removed.
10 | QXP SERVER 8.5 WEB INTEGRATION GUIDE

Getting started

The topics below describe how to create requests for the QuarkXPress Server Web interface.
For information about the options available in such requests, see "Using the Web interface."

Getting started: HTTP

You can submit HTTP requests to QuarkXPress Server as URLs manually from a browser
or automatically from an HTTP client application. QuarkXPress Server processes such
requests and returns rendered content in the HTTP responses. Depending on the type of
request, QuarkXPress Server preferences, and the type of content returned, rendered content
may be downloaded by the end user, displayed in the end-user's browser, or saved to a file
system location accessible to QuarkXPress Server.
GETTING STARTED
You can write a QuarkXPress Server client application in almost any language that can
generate HTTP GET/POST requests. A QuarkXPress Server HTTP-based solution typically
consists of QuarkXPress Server (running on a server computer connected to a network)
plus a front-end application (usually Web-based) that provides a graphical user interface
(GUI) for end users. The front-end application translates end users' input into HTTP requests
and sends the requests to QuarkXPress Server or QuarkXPress Server Manager, which
processes the requests and returns rendered content.

Dissecting a QXP Server URL

To interact with QuarkXPress Server from a Web browser, use a URL like the following:
http://[server]:[port]/[namespace]/[directory]/[DocumentName]?[parameter]=Value
[server]: The name or IP address of the computer for QuarkXPress Server or
QuarkXPress Server Manager.
[port]: The port number on which to contact QuarkXPress Server or QuarkXPress Server
Manager. The default port is 8080 for QuarkXPress Server and 8090 for QuarkXPress Server
Manager.
[namespace]: Defines what the URL action will be and any parameters and conditions
available to that namespace.
[directory]: The path in the document pool where the project is stored, relative to the
QuarkXPress Server document pool. To access the root level, no directory path is necessary.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 11
GETTING STARTED
[DocumentName]: The name of the QuarkXPress project that you can access from the
document pool or the content provider.
[parameter]: Further defines the URL action with attributes and values allowed for the
namespace or general call. Pass parameters in the form attribute=value, with parameters
separated by the "&" character.
For QuarkXPress Server Manager, use a URL like the following:
http://[server]:[port]/quark/servlet/qxpsm/[namespace]/[directory]/[DocumentName]?[parameter]=Value
This Guide provides numerous sample URLs in QuarkXPress Server format. To convert these examples for use with QuarkXPress Server Manager, simply insert /
quark/servlet/qxpsm after [port]/ .
Versions of QuarkXPress Server Manager prior to 7.22 required absolute paths. You can
now use both absolute and relative paths when you modify a project with SDK objects or
classes. Relative paths are almost always relative to the document pool. If you use multiple
QuarkXPress Server instances, you should use a common document pool.

Interpreting the QXP Server Manager response

When QuarkXPress Server Manager successfully processes a request through the HTTP
interface, the response is the same as QuarkXPress Server's response unless the user has
supplied additional parameters to QuarkXPress Manager. For more information, see
"Working with QuarkXPress Server Manager" in A Guide to QuarkXPress Server.
If an error occurs, QuarkXPress Server Manager retries the request, either on the same
QuarkXPress server instance or a different one (depending on the error and global settings
established in the QuarkXPress Server Manager client). If QuarkXPress Server Manager
cannot process the request, it returns an XML response describing the error, plys any
header error codes returned by QuarkXPress Server. For example:
<?xml version="1.0" encoding="UTF-8" ?> <error> <httpresponsecode>404</httpresponsecode> <xpressservererrorcode>-43</xpressservererrorcode> <xpressservererrormessage>File not found.</xpressservererrormessage> <xpressserverextendedmessage> <![CDATA[ Error #-43 - File not found. ]]> </xpressserverextendedmessage> <xpressservermanagererrorcode>M8000001</xpressservermanagererrorcode> <xpressservermanagererrormessage>The server could not locate the specified file. </xpressservermanagererrormessage> </error>

HTTP GET and POST Requests

The topics below describe how you can use HTML to interact with QuarkXPress Server.
QuarkXPress Server supports both the GET and POST HTML methods. When you use the
GET method, the browser encodes form data into a URL. When you use the POST method,
form data is passed within the message body. Use the GET method only when the form
processing is idempotent. In short: GET is for retrieving data, whereas POST can involve
storing or updating data, ordering a product, or sending an e-mail.
12 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
Using HTTP GET with QXP Server
Use HTML like the following to specify a server and port where you want to send a request.
You can specify the name of the target project, the output type, and a scaling value. You
can specify the name of a box and the path of a text or picture files to import into that
box, as long as the file's path is on the server's file system. You can also use HTML like the
following to specify the page number and layout number of the project.
The form section of the HTML should begin with the following line of code:
<form id = form1 method="GET" enctype="application/x-www-form-urlencoded">
For both GET and POST, the browser constructs a form data set and encodes it according to the ENCTYPE attribute (you can use multipart/form-data for POST and
application/x-www-form-urlencoded (the default) for both POST and GET).
To create fields that let the user specify the server IP address, the port, and the project
name, use HTML like the following:
<TABLE cellSpacing=1 cellPadding=1 border=1 id=TABLE1 > <TBODY> <TR> <TD> <INPUT id=ServerTxt name=ServerTxt value="Server ID" readOnly size=13 style="WIDTH: 107px; HEIGHT: 22px"> </TD> <TD> <INPUT id=Server maxLength=50 size=16 value=localhost name=Server style="WIDTH: 170px; HEIGHT: 22px"> </TD> </TR> <TR> <TD> <INPUT id=PortTxt name=PortTxt value="Port Number" readOnly size=13 style="WIDTH: 107px; HEIGHT: 22px"> </TD> <TD> <INPUT id=Port maxLength=50 size=17 value=8080 name=Port style="WIDTH: 170px; HEIGHT: 22px"> </TD> </TR> <TR> <TBODY> </TABLE> <TR> <p></p> <TD> <INPUT id=DocTxt name=DocTxt value="Document Name" readOnly size=13 style="WIDTH: 107px; HEIGHT: 22px"> </TD> <TD> <INPUT id=Doc maxLength=50 size=18 name=Doc style= "WIDTH: 170px; HEIGHT: 22px"> </TD> </TR>
To create a drop-down menu that lets the end user specify a render format, use HTML like
the following:
<SELECT id="select1" name="returntype"> <OPTION value="jpeg">JPEG</OPTION> <OPTION value="pdf">PDF</OPTION> <OPTION value="qxpdoc">QuarkXPress document</OPTION> <OPTION value="eps">EPS Document</OPTION> <OPTION value="postscript">POSTSCRIPT</OPTION> <OPTION value="png">PNG</OPTION> </SELECT><td/>
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 13
GETTING STARTED
To create a drop-down menu that lets the end user specify a rendering scale, use HTML
like the following:
<SELECT id="select2" name="scale"> <OPTION value="1">100%</OPTION> <OPTION value="2">200%</OPTION> <OPTION value="3">300%</OPTION> <OPTION value="5">500%</OPTION> <OPTION value=".5">50%</OPTION> </SELECT><p/>
To create input fields that let the end user specify a box name and the name of a file to
be imported into that box, use HTML like the following:
<TD> <INPUT id=box1Txt value="Box Name" readOnly style="WIDTH: 181px; HEIGHT: 22px" size=16> </TD>
<TD> <INPUT id=box1 maxLength=256 size=43 style=" WIDTH: 293px; HEIGHT: 22px"></TD> </TR>
<TR> <TR> <TD> <INPUT id=box1FileTxt value="File on Server" readOnly style="WIDTH: 181px; HEIGHT: 22px" > </TD>
<TD> <INPUT id=box1File maxLength=256 size=43 style=" WIDTH: 293px; HEIGHT: 22px"> </TD> </TR>
To create fields that let the end user enter a page number a layout number, use HTML like
the following:
<TABLE cellSpacing=1 cellPadding=1 border=1 style="WIDTH: 188px; HEIGHT: 61px"> <TR> <TD> <INPUT id=PageTxt value = "Page" readOnly style="WIDTH: 50px; HEIGHT: 22px" size=3> </TD> <TD> <input id=Page size="16" maxlength="256" style="WIDTH: 147px; HEIGHT: 22px"> </TD> </TR> <TR> <TD> <INPUT id=LayoutTxt value = "Layout" readOnly style ="WIDTH: 50px; HEIGHT: 22px" size=4> </TD> <TD> <input id=Layout size="16" maxlength="256" style="WIDTH: 147px; HEIGHT: 22px"> </TD> </TR> </TABLE>
To create a button that lets the end user submit the request, use HTML like the following:
<input type="submit" value="Render document" name="Submit" LANGUAGE="javascript" onclick="return Submit_onclick()"/>
14 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
The above HTML calls a function named Submit_onclick(). You can add such a function to the <HEAD> section of the HTML. For example:
<head> <TITLE>Quark Stream</TITLE> <script ID="clientEventHandlersJS" LANGUAGE="javascript"> function Submit_onclick() { var prefix; var renderer; var file; var url; var box1Name; var dataImportStamp = "@dataimport"; prefix = "http://" + document.getElementById("Server").value + ":"; port = document.getElementById("Port").value + "/"; renderer = document.getElementById("select1").value + "/"; file = document.getElementById("Doc").value; box1Name = document.getElementById("box1").value; if (box1Name != "") { document.getElementById("box1File").name = box1Name + dataImportStamp; } else { document.getElementById("box1File").name = ""; } document.getElementById("Page").name = "Page"; document.getElementById("Layout").name = "Layout"; url = prefix + port + renderer + file; document.getElementById("form1").action = url; } </script> </head>
The Submit_onclick() function reads the values from the formand builds a request URL
using the server, port, and render type.
If the end user specifies a file name in the "File on Server" text box, he or she must add
file: to the beginning of the file path (for example, file:C:\data.txt).
The code above adds @dataimport to the end of the box name to accommodate Quark
Data Import XTensions software, which is necessary to import text and picture files.
The action of the form is defined by this line:
document.getElementById("form1").action = url;
This form's method is GET. The user agent gets the value (the URL) of the action, appends a ? to it, adds the form data set, and submits the URL.
In this scenario, form data must be in ASCII.
Using HTTP GET with QXP Server Manager
HTTP GET with QuarkXPress Server Manager works the same way as HTTP GET with
QuarkXPress Server (see "Using HTTP GET with QXP Server"), except that Quark does not
recommend using GET if you are working with non-ASCII characters. The behavior of GET
requests with characters is highly browser-dependent, and there is no standard that all
browsers follow. Instead, use POST.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 15
GETTING STARTED
Using HTTP POST with QXP Server
Use HTML like the HTML in "Using HTTP GET with QXP Server" to specify a server and port
where you want to send a request. You can specify the name of the target project, the
output type, and a scaling value. You can specify the name of a box and the path of a text
or picture files to import into that box, as long as the file's path is on the server's file system.
You can also use HTML like the HTML in "Using HTTP GET with QXP Server" to specify the
page number and layout number of the project. Differences between the GET method and
the POST method are described below.
The form section of the HTML should begin with the following line of code:
<form id = form1 method="post" enctype="multipart/form-data">
The following HTML creates a input fields that let the end user specify the name of a file
to be imported into a box:
<TD><INPUT id=box1FileTxt value="File on Client" readOnly style="WIDTH: 180px; HEIGHT: 22px" ></TD> <TD><input id=box1File type="file" size="32" maxlength="256" style="WIDTH: 293px; HEIGHT: 22px"> </TD></TR>
The action of the form is defined by this line:
document.getElementById("form1").action = url;
The form's method is POST. The user agent conducts an HTTP post transaction using the
value of the action attribute (the URL), and a message is created according to the content type specified by the enctype attribute.
Using HTTP POST with QXP Server Manager
HTTP POST with QuarkXPress Server Manager works the same way as HTTP POST with
QuarkXPress Server (see "Using HTTP POST with QXP Server"), except that with
QuarkXPress Server Manager, you must use UTF-8.

Getting started: Web services

The Web services interface is a collection of request classes. You can download the SDK
WSDL class definitions from
http://<server>:<port>/quark/services/qxpsmsdk?wsdl (replace <server> with
the QuarkXPress Server Manager computer's IP address and <port> with the
QuarkXPress Server Manager port number.
These classes can be chained together to form compound QuarkXPress Server requests.
The sample applications (see "Sample applications") show how to use these classes to invoke
a QuarkXPress Server command and manipulate the response.
For more information, see "Using the Web interface." In addition to the classes listed there,
the Web services interface includes the following:
QManagerSDKSvc processes QuarkXPress Server requests. This object's generic processRequest() method takes a QRequestContext argument and returns a
16 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
QContentData object containing the response. For more information, see the sample
applications and "Using the Web interface."
QRequestContext is the argument you pass to QManagerSDKSvc. This object contains
settings which must be set once per request. Set all chained requests inside the request
context.
QRequest is the base class for all request objects (such as PDFRenderRequest).
Consequently, all request objects share some common data members.
RequestParameters is a generic class for executing any request and for adding dynamic
properties to a request.
NameValueParam is a generic class for adding dynamic properties to a request. This class
is specifically for requests that take a box's name and/or ID as the parameter name and
the box's content as the value.
QContentData is the response returned when a request is executed. QContentData is a
hyperlink that follows the same pattern as the classes above.
QException is the exception class for QuarkXPress Server Manager. This object is returned
by the getErrorObject() method.
Description
QManagerScriptingSvc is the Web services scripting interface.
You can extend the WIG to include your own XTensions software applications by simply
modifying an XML file and redeploying the WIG Web service.
To exclude empty tags in the request HTML, set the value of the appropriate variable to
null.
For Javadocs, WSDL schemas, and JSP samples, see the Welcome page that displays when
you launch QuarkXPress Server Manager.
The following topics describe the general Web services classes.

QRequestContext

An argument passed to QManagerSDKSvc. Contains settings that must be set once per request. All chained requests must be set inside the request context.
Web service data objectType
NameMembers
documentName
DescriptionTypes
File or object name on which the command will be rendered.String
serverName
serverPort
userName
userPassword
String
Server name. Default is NULL. Load balancer searches for the host itself in this case.
Port at which the desired server is listening.Integer
Server admin username.String
Server admin password.String
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 17
GETTING STARTED
Example, object model
maxRetries
requestTimeout
useCache
responseAsURL
bypassFileInfo
context
sdk.QRequestContext rc = new sdk.QRequestContext(); rc.documentName = this.DocumentSettings1.documentName.Text; rc.responseAsURL = this.DocumentSettings1.responseAsURL.Checked; rc.useCache = this.DocumentSettings1.useCache.Checked; rc.bypassFileInfo = this.DocumentSettings1.bypassFileInfo.Checked;
Integer
Boolean
Boolean
Boolean
QRequestrequest
Max number of times to try executing the command before returning failure.
Max time out in milliseconds.Integer
Indicates whether the cache should be checked for an existing result or if the command should be executed again.
This value indicates whether the server should send the response as-is (text or binary) or store the response on the server and return its location as a URL. Because the object model works on SOAP, which can be slow when transferring large binary files, you might choose to set this value to "true" if you suspect that the response is going to be several megabytes or larger.
Indicates whether file info should be fetched before executing the command.
Context in which the command is being executed.String
QuarkXPress Server request is instances of request objects chained together.
Description
Methods
//Create the service and call it QRequestContext object QManagerSDKSvcService svc = new QManagerSDKSvcService(); sdk.QContentData qc = svc.processRequest(rc);

QManagerSDKSvc

Web service called to process the QuarkXPress Server request. QManagerSDKSvc has a generic method named processRequest() that takes QRequestContext as an argument and returns QContentData as the QuarkXPress Server response.
Web serviceType
processRequest
createSession
Processes the request context and returns the result.
DescriptionTypeParameter
QRequestContextrequestCmd
Creates a new session and returns a session ID.
timeout
Long
Argument passed to
QManagerSDKSvc. Contains settings
that must be set once per request. All chained requests are set inside the request context.
DescriptionTypeParameter
Timeout for the session in milliseconds. If no call is executed in that time, session is expired and all the open documents in that
18 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
session are closed without saving. If 0 is passed as value of timeout, default timeout is used. If a negative value is passed as timeout, the session never expires.
closeAlldocs
closeDoc
closeSession
Closes all open documents in the session without saving them. If the session does not exist, an error is returned. If an error occurs while closing the document, it is logged and the document is marked closed in the internal cache. No error is returned.
DescriptionTypeParameter
sessionId
Closes the specified document without saving it. If the session does not exist, an error is returned. If the document is not open, and error is returned. If the document is open in another session, an error is returned. If an error occurs while closing the document, it is logged and the document is marked closed in the internal cache. No error is returned.
docName
sessionId
Closes the specified session. If the session does not exist, an error is returned. If any documents are still open in the session, an error is returned.
String
String
Session whose documents are to be closed.
DescriptionTypeParameter
Document to be closed.String
Session in which document was opened.
DescriptionTypeParameter
getErrorObject
getOpenDocs
getOpenSessions
getPreferences
setPreferences
getXPressDOM
sessionId
Gets the internal error object. If you receive an exception from Web services, and that exception was caused by QuarkXPress Server or Manager (rather than a runtime exception such as a null pointer exception), you can call this method and pass a stringified form of the exception. The method returns an error object which has easy-to-use methods for getting the error code, getting the error message, and so forth.
Gets all the open documents in the session. If the session does not exist, an error is returned.
sessionId
Gets all open sessions.
Gets QuarkXPress Server preferences.
Sets QuarkXPress Server preferences.
Creates a DOM for the specified document.
String
Session to be closed.String
DescriptionTypeParameter
Session whose open documents are sought.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 19
GETTING STARTED
newDoc
Creates a new document for modification and keeps it open until further notice. The document is created with a single layout. To create a more complex document, use the processRequestEx API. If a document with the same name is already open, an error is returned. If the session does not exist, an error is returned.
DescriptionTypeParameter
docName
jobJacketName
jobTicketName
host
String
String
String
Document to be opened for modification. Provide the name only. You can proivde a relative path when you save the document.
Name of the Job Jackets file to be used. The Job Jackets file is assumed to be already available on the QuarkXPress server computer.
Name of the Job Ticket to be used.String
The QuarkXPress Server instance that should be used for this document modification. If null, this value is supplied by the load balancer. If the indicated server is not an active registered server, an error is thrown.
openDoc
port
sessionId
Opens the specified document and keeps it open until further notice. If the document is already open, an error is returned. If the session does not exist, an error is returned.
docName
host
port
sessionId
Integer
String
String
String
Integer
String
The port for the server specified in the host parameter.
Session in which the document should be opened.
DescriptionTypeParameter
Document (along with relative path if required) to be opened for modification.
QuarkXPress Server instance which should be used for this document modification. If null, this value is supplied by the load balancer. If the indicated server is not an active registered server, an error is thrown.
The port for the server specified in the host parameter.
Session in which the document should be opened.
processRequestEx
Executes the request context. If a session ID is specified, the document is kept open after the request is executed. If no session ID is specified, the request is
20 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
executed normally without keeping the document open. If the document is open in another session, an error is returned. If the document is marked dirty, an error is returned (a document is marked dirty when the server that opened the document has become inactive; in such a case, the document must be closed and opened again).
DescriptionTypeParameter
saveAllDocs
QRequestContextreqContextObj
sessionId
Saves all open documents in the session. The documents are saved one by one. If error occurs while saving a document, an error is returned immediately and the rest of the documents remain unsaved. If a document is marked dirty, an error is returned (a document is marked dirty when the server that opened the document has become inactive; in such a case, the document must be closed and opened again).
relativePath
String
String
Request to be executed.
Session in which the request should be executed. This value may be null. If a session ID is provided, the document is kept open. If no session ID is provided, the request is executed normally, as if processRequest had been called.
DescriptionTypeParameter
Relative path where open documents should be saved. If this value is provided, copies of open documents with changes made so far are saved in the new location. The open documents are not saved but have all of the changes made so far.
saveDoc
sessionId
Saves the open document. If a document is marked dirty, an error is returned (a document is marked dirty when the server that opened the document has become inactive; in such a case, the document must be closed and opened again).
docName
newName
relativePath
String
String
String
String
Session in which the document exists.
DescriptionTypeParameter
Document to be saved. Must be the same name that was used when opening or creating the document.
New name of the document. If null, the document is saved with the old name.
Relative path where the document should be saved. The relative path can also contain the new name of the document. If this is provided, a copy of the open document with
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 21
GETTING STARTED
changes made so far is saved in the new location. The open document is not saved but has all of the changes made so far.
Example, object model
Description
sessionId
getXPressDOMEx
getXMLFromXPressDOM
getXPressDOMFromXML
QRequestContext rc = new QRequestContext(); rc.documentName = "test.qxp"; rc.responseAsURL = false;
JPEGRenderRequest jpegRequest = new JPEGRenderRequest(); rc.request = jpegRequest;
QManagerSDKSvcService svc = new QManagerSDKSvcService(); QContextData response = svc.processRequest(rc);
Lets you create a DOM of a particular layout or portion of a layout.
Creates an XML string out of the DOM.
Takes a raw XML representation of a project as a string and returns an object model representing that project, with Project as the root class.
String
Session in which the document exists.

QRequest

Base class for all request objects (such as PDFRenderRequest). All request objects share some common data members, which are described below.
Web service data objectType
Additional comments
NameMembers
QRequestrequest
DescriptionTypes
QuarkXPress Server request that includes instances of request objects chained together.

RequestParameters

Generic class for executing any request and for adding dynamic properties to a request.Description
Web service data objectType
NameMembers
namespace
NameValueParam[]params
You can use this class to send any request for which a specific class does not exist. When this request exists in the chain, its namespace is concatenated with the namespaces of other requests. That means the namespace provided here can be null.
The parameters of this class can be used to parameterize a request being sent to the server.
DescriptionType
Namespace of the request (for example, jpeg).String
Parameter array for the specified request (for example, jpegquality).
22 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
Example, object model
Description
QRequestContext rc = new QRequestContext(); RequestParameters request = new RequestParameters(); request.setNamespace("jpeg"); rc.setRequest = request; NameValueParam p1 = new NameValueParam(); p1.setParamName = "jpegquality"; p1.setTextValue = "4"; request.setParams(new NameValueParam[]{p1});

NameValueParam

Generic class for adding dynamic properties to a request. This class is specifically for requests that take a box name/id as the parameter name and the box content as the parameter value.
Web service data objectType
NameMembers
paramName
textValue
streamValue
String
String
byte[]
DescriptionType
Name of the parameter. In most cases this will be the name/ID of the box.
Text value of the box. (You can set either textValue or
streamValue.)
Stream value of the box. (You can set either textValue or
streamValue.)
contentType

QContentData

A response to a Web Services call to QuarkXPress Server.Description
Web service data objectType
NameMembers
contentType
textData
responseURL
streamValue
encodingType
actualServerPortUsed
The MIME content type of the parameter.String
String
String
String
binary
String
DescriptionTypes
The type of the response. For example, "text/xml" or "text/plain."
If the response type is text, this contains the text. Otherwise, this value is null.
If the responseAsURL parameter was set to "true" in the request, this contains the URL of the response. Otherwise, this value is null.
If the response type is binary, this contains the byte array. Otherwise, this value is null.
If the response type is text, this value indicates the encoding of the text (for example, UTF-8 or ANSI).
Identifies the server port.String
actualServerUsed
Identifies the server.String
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 23
GETTING STARTED
Example, object model
Description
Type
headers
multipartResponse
QRequestContext context = new QRequestContext(); context.setDocumentName("sample.qxp"); context.setResponseAsURL(true); JPEGRenderRequest request = new JPEGRenderRequest(); request.setJPEGQuality("4"); context.setRequest(request); QManagerSDKSvcServiceLocator serviceLocator = new QManagerSDKSvcServiceLocator(); QManagerSDKSvc service = serviceLocator.getqxpsmsdk(); QContentData response = service.processRequest(context); System.out.println(response.getResponseURL());
String
String
If the response returned by the server is a set of headers, this array contains the header response.
If the response returned by the server is multipart, this array contains the multipart response parts.

QException

Exception class for QuarkXPress Manager. This class is returned by the getErrorObject method.
Exception
NameMembers
httpResponseCode
DescriptionTypes
HTTP response code.String
Example, object model
managerErrorCode
managerErrorMessage
serverErrorCode
serverErrorMessage
serverExtendedMessage
String docName = "notexisting.qxp"; try { QRequestContext ctx = getRequestContext(docName); QRequest request = getJPEGRequest(); ctx.setRequest(ctx); QContentData response = getService().processRequest(ctx); System.out.println(response.getResponseURL()); } catch (Exception ex) { //PLEASE NOTE that the following would work only if //QuarkXPress Manager threw an exception and it is not //a runtime exception. In latter cases, an empty //error object will be returned. QException error = getService().getErrorObject(ex.toString()); System.out.println(error.getServerErrorCode()); }
QuarkXPress Server Manager error code.String
QuarkXPress Server Manager localized error message.String
QuarkXPress Server error code.String
QuarkXPress Server response message.String
QuarkXPress Server extended error message.String

QManagerScriptingSvc

Scripting interface via Web service.Description
Web service data objectType
24 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
Methods
checkScriptSyntax
deleteScript
executeScript
executeScriptFunction
executeScriptFunctionWithArguments
Checks the syntax of a script.
DescriptionTypeParameter
id
Deletes a script.
id
Executes a script.
id
Executes a function of a script.
id
function
Executes a function of a script, with passed arguments.
Script ID.String
DescriptionTypeParameter
Script ID.String
DescriptionTypeParameter
Scipt ID.String
DescriptionTypeParameter
String ID.String
Function to execute.String
executeScriptWithVars
getAllScripts
getErrorObject
getScript
DescriptionTypeParameter
id
function
arguments
Executes a script with variables for the script to use.
id
Gets all scripts saved with the system.
Creates an error object from a error string.
errorString
Gets the script with the specified ID.
String[]
QScriptVar[]variables
String ID.String
Function to execute.String
Arguments to pass to function.
DescriptionTypeParameter
Script ID.String
Variables to be used by script.
DescriptionTypeParameter
Error string to use.String
getScriptExecutionDetails
id
Gets the runtime details of a script.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 25
DescriptionTypeParameter
Script ID.String
GETTING STARTED
DescriptionTypeParameter
Script ID.String
DescriptionTypeParameter
Language to check.String
DescriptionTypeParameter
Script to update or add.
getSupportedLanguages
isLanguageSupported
updateScript
scriptId
Gets the supported scripting languages.
Checks whether a particular scripting language is supported.
language
Updates a script. If the script does not exist, this function adds it.
QScriptscript

QXP Server Manager

The following topics are for people who want to enhance QuarkXPress Server Manager or
integrate it with other software.
Please refer to http://localhost:8090/qxpsmdocs/apidocs/index.html for manager
API documentation. (Note that the port number used to retrieve the API documentation
is 8090 by default, but you should use whatever port number you specified when installing
QuarkXPress Server Manager.)
QuarkXPress Server Manager was developed using interface-based programming and uses
the Spring Framework to instantiate pluggable objects. When QuarkXPress Server Manager
starts up, it reads the contents of a Spring context definition file named
"ManagerContainerConfig.xml" and instantiates all of the beans listed in the file.
QuarkXPress Server Manager then initializes by reading various configuration options
from a file named "ManagerConfig.xml."

Integrating with other Web servers

By default, QuarkXPress Server Manager is integrated with Tomcat.
QuarkXPress Server Manager needs a cache virtual directory to work. The context definition file contains a bean definition called ContainerAdapter. By default, it uses the Tomcat adapter, QTomcatContainerAdapterImpl. This adapter assumes the virtual directory to be cache and reads the location of the virtual directory from the "cache.xml" file, which is located in Tomcat's conf/Catalina/localhost folder.
If QuarkXPress Server Manager needs to be hosted in another web server, you can write your own adapter or use QDefaultContainerAdapterImpl (which is provided with
QuarkXPress Server Manager). This adapter assumes that the cache folder is located under
the Web application context folder. The name of the cache folder can be set using the Spring configuration file or the setCacheFolderRelativePath method.
26 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED

Embedding QXP Server Manager

You can embed QuarkXPress Server Manager in applications (stand-alone or otherwise).
To do so, you must first initialize QuarkXPress Server Manager, as shown below:
QConfigurationData initializationData = new QConfigurationData(); initializationData.setBeanDefinitionConfigFile("ManagerContainerConfig.xml"); QClassFactory.getInstance().init(initializationData);
You can configure other QuarkXPress Manager options using QConfigurationManager.
Next, you must register one or more QuarkXPress Server hosts, like so:
QConfigManager configManager = QClassFactory.getInstance().getExecutionEngine().getConfigManager();
String currentDirectory = System.getProperty("user.dir"); configManager.setCacheFolder( new File(new File(currentDirectory), "cache").getAbsolutePath());
configManager.setLogLevel(STANDALONE_CLIENT_LOG_LEVEL); configManager.setPingType(QPingTypeEnum.PING_SIMPLE);
QConnectionInfo connInfo = new QConnectionInfo(); connInfo.setServerName(<XPRESS_SERVER_NAME>); connInfo.setServerPort(<XPRESS_SERVER_PORT>); connInfo.setUserName(<XPRESS_SERVER_ADMIN_USER>); connInfo.setPassword(<XPRESS_SERVER_ADMIN_PASSWORD>); QHostSummary host = new QHostSummary(); host.setConnectionInfo(connInfo); configManager.registerHost(host);
Once you have done so, you can use the embedded QuarkXPress Server Manager as shown
below:
XMLRequest xmlRequest = new XMLRequest(); QRequestContext context = new QRequestContext(); context.setDocumentName(<SAMPLE_DOCUMENT>); context.setResponseAsURL(false); context.setRequest(xmlRequest); QContentData response = QRequestProcessor.getInstance().processRequest(context); System.out.println(response.getTextData());

Writing special request handlers

If you need to perform custom actions on specific flags, you need to define special flags
and write handlers for them. These flags can then be passed as GET parameters to the servlet, as additional QParam parameters in QCommand (executed using
QManagerSvc.executeCommand), or as additional NameValueParam parameters in a
derived class of QRequest using QManagerSDKSvc.processRequest. The servlet will
automatically create parameters out of these flags and set these in the command before
sending it for execution.
To handle these special flags, you can write your request handler derived from the class
QRequestHandler. You can then insert this new handler class anywhere in the chain of
responsibility pattern, starting with QDocProviderImpl and ending with
QHostRequestHandler.
Try not to change end points. In your handler implementation, handle your special flags,
then either return a response after handling or pass the control to the successor for further
handling.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 27
GETTING STARTED
getLoadBalancerAlgorithm

Implementing a custom load balancer

To implement a custom load balancer, first implement the
com.quark.manager.lb.QLoadBalancer interface. To use this interface, add a reference
to "managerengine.jar" to your project.
This interface method contains the following methods:
Signature
Description
getLoadBalancerDescription
Signature
Description
useFileInfo
Signature
Description
Returns
getAvailableHost
Signature
public String getLoadBalancerAlgorithm();
Returns the name of the algorithm that is mapped to the current load balancer while loading the server.
The algorithm name used to load-balance the list of hosts.Returns
public String getLoadBalancerDescription();
Gets the description of the load-balancing algorithm so it can be displayed in the QuarkXPress Server Manager client.
Description of the load balancer.Returns
public Boolean useFileInfo();
Gets a flag that indicates whether the load balancer uses file information to decide on which host to use.
True if the fileinfo command should be fired before rendering, otherwise false.
public QHostProxy getAvailableHost(QHostProxy[] hosts, QCommand command);
Gets an available host out of the provided list of hosts to execute the specified command.Description
Parameters
hosts: List of hosts that should be scanned for the most eligible host. command: Command for which host is being searched.
Available host. Can be used for next request.Returns
Next:
Make a jar for the load balancer.
1
Deploy the jar to the following folder: {Apache-Tomcat
2
Home}\webapps\axis\WEB-INF\lib
Configure "ManagerContainerConfig.xml" for bean mapping:
3
1
Navigate to {Apache-Tomcat Home}\webapps\axis\WEB-INF\classes .
28 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
2 Open the "ManagerContainerConfig.xml" file and look for the XML tag bean whose
id has the value ConfigurationManager.
3
Within that tag find the property name availableLoadBalancers.
4
In the <list> tag, add the following: <ref bean={your newbeanID}/>
5
Above this ConfigureManager tag, define the bean ID as your new bean ID: <bean
id={your newbeanID} class={yourLoadBalancerClass}/>
6 Restart the Tomcat server.
7 Log on with the QuarkXPress Server Manager client and choose Global Setting > Load
Balancer Method > Choose Load Balancer.
8 Locate your new load balancer method, then click Save.

Generating a custom client SDK class

To generate a custom client SDK class, add new classes and generate new stubs as described
in the topics below.
Adding new SDK classes
To add new SDK classes:
Modify "ManagerSDK.xml" (located in Server/utilities/) to reflect changes in
1
"Modifier.dtd."
Using a different folder, create backups of "managersdkro.jar," "managerdomgenerator.jar,"
2
and "managerrequestserializer.jar." All of these files are located in <Installation
Folder>/Server/apache-tomcat–5.5.16/webapps/quark/WEB-INF/lib.
Execute Server/utilities/ClientSDKRequestObjectGenerator.sh (Mac OS) or
3
Server/utilities/ClientSDKRequestObjectGenerator.bat (Windows) and look
for errors. If you encounter an error, address the problem, then execute
ClientSDKRequestObjectGenerator again. When the process completes successfully,
"managersdkro.jar", "managerdomgenerator.jar", and "managerrequestserializer.jar" are regenerated in the webapps/quark/WEB-INF/lib folder. Check the timestamps to verify
that the files are new.
Launch QuarkXPress Server Manager.
4
Modify Server/utilities/deploy_sdk.wsdd to add the bean mapping for the newly
5
generated class. To make change tracking easier, position the mapping within the classes
to match the position of any changes made to the DTD or XML.
Edit Server/utilities/deploy.sh (Mac OS) or Server/utilities/deploy.bat
6
(Windows) to change the port number where QuarkXPress Server Manager is running (if
it is different from 8090).
Execute Server/utilities/deploy.sh (Mac OS) or Server/utilities/deploy.bat
7
(Windows) and check for errors.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 29
GETTING STARTED
Open a Web browser and enter the following URL:
8
http://localhost:8090/quark/services/qxpsmsdk?wsdl. Verify that the class you
just added is visible in WSDL.
Generating new SDK stubs
To generate new stubs:
Execute Server/utilities/stub.sh (Mac OS) or Server/utilities/stub.bat
1
(Windows) and look for errors. If you encounter an error, address the problem, then execute
Server/utilities/stub.sh or Server/utilities/stub.bat again. If the process
succeeds, "managerwebservicestubs.jar" is generated in the Server/utilities directory.
You can use these Java stubs in Java applications that communicate with QuarkXPress Server
Manager.
If the application you are developing is in Visual Studio .NET, then you need to generate
2
stubs again. Simply open your solution in Visual Studio, then either refresh the Web service
reference or remove the Web service reference and then add it again.

Understanding ManagerSDK.xml

"ManagerSDK.xml" is used to generate client SDK classes for QuarkXPress Server requests.
Each element in "ManagerSDK.xml" corresponds to a request handler, a render type, or
an element in the DTD.
A client SDK class is generated for each element in the XML. Each property in the DTD
and each parameter of the request handler or render type also corresponds to a unique
element in the XML.
A Class variable is generated for each property, as follows.
<Class>: One element for each SDK class generated. The class generated is derived from QRequest. Attributes are:
name: The name of the generated class.
namespace: The namespace recognized by QuarkXPress Server when this request
class is translated into a QuarkXPress Server request.
description: A description of the class. Unless this value is null, the description
forms the header of the generated class and is included in the generated API docs.
alias: The alias to be used as an element name if this request class is serialized to
XML. For example, when the Project class is serialized to XML, the element used is Project.
serializeAs: Determines how the class is serialized. The valid values are:
nameValue indicates that all members of the class should be handled as
name-value pairs in the request to QuarkXPress Server. (This is the default option in JPEGRenderRequest and ModifierStreamRequest.)
30 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
Loading...
+ 196 hidden pages