9.5

Table Of Contents
Objective-C sample: Chained request
QXPSMQRequestContext *qRequestContext =
[[[QXPSMQRequestContext alloc] init] autorelease];
[qRequestContext setDocumentName:@"MyDoc.qxp"];
//QXP doc render request
QXPSMQuarkXPressRenderRequest *qxpReq =
[[[QXPSMQuarkXPressRenderRequest alloc] init] autorelease];
//Save as request that saves the file.
QXPSMSaveAsRequest *saveAsRequest = [[[QXPSMSaveAsRequest alloc] init]
autorelease];
[saveAsRequest setNewname:@"NewDoc.qxp"];
[qxpReq setRequest:saveAsRequest];
[qRequestContext setRequest:qxpReq];
//Get reference to RequestService and process request
[[QXPSMServiceManager requestService]
processRequestForRequestCmd:qRequestContext];
If made from QuarkXPress Server, this request would look like this:
http://[server>]:[port]/saveas/qxpdoc/MyDoc.qxp?newname="NewDoc.qxp"
Extending QuarkXPress Server Manager
Custom XTensions written for XPressServer can be used in the QuarkXPress Server Manager
Web service interface in two ways:
Using the Extensibility tool in the QXPSM SDK. With this tool, you can easily update
QXPSM Web service objects to include objects corresponding to custom request handlers
and their parameters.
Using the RequestParameters class. This is a generic request class that can be used in lieu
of any class, existing or otherwise.
The prerequisites for using the Extensibility tool are as follows:
JDK 1.6
Apache ANT 1.6.5 or later
Perl 5.8.4 or later with the XML::DOM module
Third-party libraries (available at [QXPSM application
folder]\Server\dependencies)
QXPSM libraries (avaiable at [QXPSM application folder]\Server\lib
Microsoft .NET Framework 3.5 or later (required only for generating .NET stubs)
The Extensibility tool is located in the XDK/Extensibility folder. For instructions on
how to use it, see the following topics.
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
A GUIDE TO QUARKXPRESS SERVER 9.5 | 177
USING QUARKXPRESS SERVER