9.5

Table Of Contents
proxyHost: Host name of HTTP proxy. If null, proxy is not used.
proxyPort: HTTP proxy port number.
username: User name for proxy authentication. If null, no authentication is performed.
password: Password for HTTP proxy authentication.
For example:
[[QXPSMServiceManager sharedInstance]
setupForHost:server port:port
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];
176 | A GUIDE TO QUARKXPRESS SERVER 9.5
USING QUARKXPRESS SERVER