10.2.1

Table Of Contents
HTTP Error #500The XML document is
not valid or well
formed.
This alert displays if the XML you supply is not well-formed or do not
adhere to the Modifier DTD.
HTTP Error #500The XML document
contains an invalid tag
value.
This alert displays if you supply an invalid value in the XML.
If the request succeeds, a transaction success message is written to the QuarkXPress Server
transaction log file. For example:
Logs
8/3/2005 11:27:42 jpeg/construct/table.qxp Type: image/jpeg Size: 31715 Client:
127.0.0.1
If an alert is displayed, an error message is written to the QuarkXPress Server error log. The
following is a sample of the error log entry:
8/10/2005 10:39:07 Error Error Code: 10339 The specified file failed to load in the
picture box.
Request Object Names:
XMLRequest
ConstructRequest
Example, object
model
ConstructFileRequest
ConstructStreamRequest
To construct a new QuarkXPress project by editing an existing document, first deconstruct a
QuarkXPress project using code like the following:
XMLRequest dcnstrq = new XMLRequest();
rc.request = dcnstrq;
Next, alter the project by manipulating the XML. When you're done, pass the modified XML
document to ConstructStreamRequest to create a new QuarkXPress project. For example:
ConstructStreamRequest cnstrq =
new ConstructStreamRequest();
cnstrq.modify = Buffer; // Byte[] for the modified XML
rc.request = cnstrq;
QuarkXPressRenderRequest qxprq =
new QuarkXPressRenderRequest();
cnstrq.request = qxprq;
Alternatively, you can deconstruct a QuarkXPress project using code like the following:
RequestServiceService svc =
new RequestServiceService()
Project proj = svc.getDOM("document.qxp");
Next, alter the project by manipulating the XML. When you're done, pass the modified Project
instance to ConstructRequest to create a new QuarkXPress project. For example:
ConstructRequest cnstrq =
new ConstructRequest();
cnstrq.project = proj;
QRequestContext rc = new QRequestContext();
rc.request = cnstrq;
QuarkXPressRenderRequest qxprq =
new QuarkXPressRenderRequest();
cnstrq.request = qxprq;
The construct namespace takes two arguments: The name of the project to be created and a
modify parameter with the string or the path of the XML file that describes how to create the
project:
http://localhost:8080/qxpdoc/construct/project1.qxp?
modify=file:path to XML file on server
http://localhost:8080/qxpdoc/construct/project1.qxp?
modify=<xml-string>
Notes
112 | A GUIDE TO QUARKXPRESS SERVER 10.2.1
USING QUARKXPRESS SERVER