9.5

Table Of Contents
// Process request using RequestService
QContentData data = service.processRequest(qRequestContext);
String deconstructXml = data.textData;
.NET sample: Rendering a PDF
QRequestContext qRequestContext = new QRequestContext();
qRequestContext.documentName = "MyDoc.qxp";
// Setting responseAsURL to true generates the response as a URL
qRequestContext.responseAsURL = true;
// Create the PDFRenderRequest
PDFRenderRequest pdfRenderRequest = new PDFRenderRequest();
qRequestContext.request = pdfRenderRequest;
// Get reference to RequestService
RequestService service = new RequestService();
service.Url = "http://[server]:[port]/qxpsm/services/RequestService";
// Process request using RequestService
QContentData data = service.processRequest(qRequestContext);
// URL from which resulting PDF can be fetched
String pdfUrl = data.responseURL;
.NET sample: Chained request
QRequestContext qRequestContext = new QRequestContext();
qRequestContext.documentName = "Project.qxp";
// QXP doc render request
QuarkXPressRenderRequest qxpreq = new QuarkXPressRenderRequest();
// Save as request that saves the file
SaveAsRequest saveAsRequest= new SaveAsRequest();
saveAsRequest.newName = "NewDoc.qxp";
qxpreq.request = saveAsRequest;
qRequestContext.request = qxpreq;
// Get reference to RequestService
RequestService service = new RequestService();
service.Url = "http://[server]:[port]/qxpsm/services/RequestService";
// Process the request
service.processRequest(qRequestContext);
If made from QuarkXPress Server, this request would look like this:
http://[server]:[port]/saveas/qxpdoc/Project.qxp?newname="NewDoc.qxp"
Writing an Objective-C client for Mac OS or iOS
To write a QuarkXPress Server Manager client in objective C for Mac OS or iOS:
1
Include the QuarkXPress Server Manager stub header files path in the header search paths.
These files can be found at the following location:
[QXPSM_Home]/XDK/WebServiceStubs/objective-c/include
2
Include the Axis2c header files path in the header search paths. These header files can be
found at the following location:
Mac OS:
[QXPSM_Home]/XDK/WebServiceStubs/objective-c/lib/i86_64/axis2c/include
iOS: [QXPSM_Home]/XDK/WebServiceStubs/objective-c/lib/arm/axis2c/include
174 | A GUIDE TO QUARKXPRESS SERVER 9.5
USING QUARKXPRESS SERVER