2020

Table Of Contents
USING QUARKXPRESS SERVER
type such as EPS,
JPEG, PNG, or PICT.
Response The message “File upload completed.”
Alerts
The file system
document pool is
not enabled.
HTTP Error #404This alert displays if you attempt
to upload a document when the file system
document pool is not enabled. What to do: Check
Enable File System Document Pool in the Server
Configuration dialog box.
Incorrect
administration realm
user name and
password.
HTTP Error #401This alert displays if you specify an
invalid administrator user name and
password.What to do: Use the user name and
password set in theQuarkXPress Server Manager
client Server Configuration dialog box.
Cannot find required
volume or folder
HTTP Error #500QuarkXPress Server Error #120This
alert displays if you attempt to upload a document
that is in a subfolder that does not exist in the
document pool while Generate Hierarchy on
Document Upload is unchecked in the Server
Configuration dialog box. What to do: Check
Generate Hierarchy on Document Upload in the
Server Configuration dialog box.
Logs See “Understanding logging.”
Example GET URL
To post a binary file in the root
folder:http://localhost:8080/addfile/abc.qxpTo post a binary file in a
subfolder:http://localhost:8080/addfile/sub1/abc.qxp
Example, object
model
Request object name: AddFileRequest // STEP 1 (COMMON FOR ALL
REQUESTS): com.quark.qxpsm.QRequestContext rc = new
com.quark.qxpsm.QRequestContext();
if(!this.DocumentSettings1.documentName.Text.Equals(“”))
rc.documentName = this.DocumentSettings1.documentName.Text;
Stream theStream = uplTheFile.PostedFile.InputStream; long length =
theStream.Length; Byte[] Buffer = new Byte[length]; const int BUFFER_SIZE
= 10000; int nBytesRead = 0,iCount = 0; long remainingBytes = length —
BUFFER_SIZE; if(remainingBytes > BUFFER_SIZE) { nBytesRead =
theStream.Read( Buffer,iCount * BUFFER_SIZE,BUFFER_SIZE); while(0 !=
nBytesRead) { iCount++; remainingBytes = length — (iCount *
BUFFER_SIZE); if(remainingBytes > BUFFER_SIZE) nBytesRead =
theStream.Read( Buffer,iCount * BUFFER_SIZE,BUFFER_SIZE); else {
nBytesRead = theStream.Read( Buffer,iCount *
BUFFER_SIZE,(int)remainingBytes); break; } } } else nBytesRead =
theStream.Read( Buffer,iCount * BUFFER_SIZE,(int)remainingBytes);
AddFileRequest addfilereq = new AddFileRequest(); addfilereq.fileData =
Buffer; rc.request = addfilereq; // Create the service and call it with
QRequestContext object RequestService svc = new RequestService();
QContentData qc = svc.processRequest(rc); The object model uses SOAP to
transfer data, and SOAP encoding is not the most efficient way to transfer
binary data. If you have to add a file using QuarkXPress Server Manager,
the best way is to use a POST request in a QuarkXPress Server Manager
164 | A GUIDE TO QUARKXPRESS SERVER 2020