2015

Table Of Contents
logFilePath:axisLogFile logLevel:axisLogLevel axis2Path:axis2Home
useHttps:usehttps serverCertificatePath:certFilePath
proxyHost:proxyHost proxyPort:proxyPort
username:proxyUserName password:proxyPassword];
6
Get a reference to the RequestService using QXPSMServiceManager and perform the
required API invocations on the referenced RequestService. For example:
[[QXPSMServiceManager requestService]
getXPressDomForDocumentName:documentName];
7
To invoke a QXPSM service, get a reference to the AdminService using
QXPSMServiceManager and perform the required API invocations on the referenced
AdminService. For example:
[[QXPSMServiceManager requestService]
getXPressDomForDocumentName:documentName];
For sample code, see the following topics.
Objective-C sample: Deconstructing a project
QXPSMQRequestContext *qRequestContext =
[[[QXPSMQRequestContext alloc] init] autorelease];
[qRequestContext setDocumentName:@"MyDoc.qxp"];
// Create XML Request
QXPSMXMLRequest *xmlRequest = [[[QXPSMXMLRequest alloc] init] autorelease];
[qRequestContext setRequest:xmlRequest];
// Get reference to RequestService and process request
QXPSMQContentData *data = [[QXPSMServiceManager requestService]
processRequestForRequestCmd:qRequestContext];
NSString *deconstructXml = [data getTextData];
Objective-C sample: Rendering a PDF
QXPSMQRequestContext *qRequestContext =
[[[QXPSMQRequestContext alloc] init] autorelease];
[qRequestContext setDocumentName:@"MyDoc.qxp"];
// Setting responseAsURL to true generates the response as a URL
[qRequestContext setResponseAsURL:YES];
// Create the PDFRenderRequest
QXPSMPDFRenderRequest *pdfRenderRequest =
[[[QXPSMPDFRenderRequest alloc] init] autorelease];
[qRequestContext setRequest:pdfRenderRequest];
// Get reference to RequestService and process request
QXPSMQContentData *data = [[QXPSMServiceManager requestService]
processRequestForRequestCmd:qRequestContext];
// URL from which resulting PDF can be fetched
NSString *pdfUrl = [data getResponseURL];
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
A GUIDE TO QUARKXPRESS SERVER 2015 | 171
USING QUARKXPRESS SERVER