9.5

Table Of Contents
rc.request = new PreflightRequest();
//Create the service and call it with QRequestContext object
RequestService svc = new RequestService();
com.quark.qxpsm.QContentData qc = svc.processRequest(rc);
Setprefs
The setprefs request handler lets you set server preferences. To use this request handler,
issue a getprefs request, determine the name of the tag that needs to be modified, and
then submit a setprefs request with the using the name of this tag. For example, to turn
off memory caching, you would first submit a getprefs request to the server. In the
resulting XML, you would note that the name of the tag for memory caching tag is
AllowMemoryCaching. Finally, you would submit a setprefs request to the server, like
so:
http://localhost:8080/setprefs?AllowMemoryCaching=false
For a full list of preferences, see "General preferences" and "Renderer preferences."
setprefs
Namespace
The message "Preferences successfully set."Response
HTTP Error #401
Incorrect
administration
Alerts
This alert displays if you specify an invalid administrator user name and
password.
realm user name
and password.
What to do: Use the user name and password set in the QuarkXPress Server
Manager client Server Configuration dialog box.
See Understanding loggingLogs
http://localhost:8080/setprefs?CacheSize=200
Example GET
URL
EMailPreferences emailPrefs = new EMailPreferences();
emailPrefs.emailFrom = "from@email.com";
Example, object
model
emailPrefs.emailTo = "to@email.com";
emailPrefs.smtpPort = "25";
emailPrefs.smtpServerIP = "SMTPServerIP";
Preferences prefs = new Preferences();
prefs.setEmailPreferences(emailPrefs);
// Create the service and call setPreferences method
RequestService svc = new RequestService();
svc.setPreferences("ServerName", "ServerPort", "Username", "Password", prefs);
If a user name and password have been set in the Server Configuration dialog box, the browser
requests that user name and password when you submit a setprefs parameter request.
Notes
General preferences
The /getprefs handler lets clients remotely retrieve an XML representation of the current
QuarkXPress Server preferences, as described below.
164 | A GUIDE TO QUARKXPRESS SERVER 9.5
USING QUARKXPRESS SERVER