This Guide provides numerous sample URLs in QuarkXPress Server format. To convert
these examples for use with QuarkXPress Server Manager, simply insert /
quark/servlet/qxpsm after [port]/ .
Versions of QuarkXPress Server Manager prior to 7.22 required absolute paths. You can
now use both absolute and relative paths when you modify a project with SDK objects or
classes. Relative paths are almost always relative to the document pool. If you use multiple
QuarkXPress Server instances, you should use a common document pool.
Interpreting the QXP Server Manager response
When QuarkXPress Server Manager successfully processes a request through the HTTP
interface, the response is the same as QuarkXPress Server's response unless the user has
supplied additional parameters to QuarkXPress Manager. For more information, see
"Working with QuarkXPress Server Manager" in A Guide to QuarkXPress Server.
If an error occurs, QuarkXPress Server Manager retries the request, either on the same
QuarkXPress server instance or a different one (depending on the error and global settings
established in the QuarkXPress Server Manager client). If QuarkXPress Server Manager
cannot process the request, it returns an XML response describing the error, plys any
header error codes returned by QuarkXPress Server. For example:
<?xml version="1.0" encoding="UTF-8" ?>
<error>
<httpresponsecode>404</httpresponsecode>
<xpressservererrorcode>-43</xpressservererrorcode>
<xpressservererrormessage>File not found.</xpressservererrormessage>
<xpressserverextendedmessage> <![CDATA[ Error #-43 - File not found. ]]>
</xpressserverextendedmessage>
<xpressservermanagererrorcode>M8000001</xpressservermanagererrorcode>
<xpressservermanagererrormessage>The server could not locate the specified
file.
</xpressservermanagererrormessage>
</error>
HTTP GET and POST Requests
The topics below describe how you can use HTML to interact with QuarkXPress Server.
QuarkXPress Server supports both the GET and POST HTML methods. When you use the
GET method, the browser encodes form data into a URL. When you use the POST method,
form data is passed within the message body. Use the GET method only when the form
processing is idempotent. In short: GET is for retrieving data, whereas POST can involve
storing or updating data, ordering a product, or sending an e-mail.
12 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
Using HTTP GET with QXP Server
Use HTML like the following to specify a server and port where you want to send a request.
You can specify the name of the target project, the output type, and a scaling value. You
can specify the name of a box and the path of a text or picture files to import into that
box, as long as the file's path is on the server's file system. You can also use HTML like the
following to specify the page number and layout number of the project.
The form section of the HTML should begin with the following line of code:
<form id = form1 method="GET" enctype="application/x-www-form-urlencoded">
For both GET and POST, the browser constructs a form data set and encodes it according
to the ENCTYPE attribute (you can use multipart/form-data for POST and
application/x-www-form-urlencoded (the default) for both POST and GET).
To create fields that let the user specify the server IP address, the port, and the project
The form's method is POST. The user agent conducts an HTTP post transaction using the
value of the action attribute (the URL), and a message is created according to the content
type specified by the enctype attribute.
Using HTTP POST with QXP Server Manager
HTTP POST with QuarkXPress Server Manager works the same way as HTTP POST with
QuarkXPress Server (see "Using HTTP POST with QXP Server"), except that with
QuarkXPress Server Manager, you must use UTF-8.
Getting started: Web services
The Web services interface is a collection of request classes. You can download the SDK
WSDL class definitions from
http://<server>:<port>/quark/services/qxpsmsdk?wsdl (replace <server> with
the QuarkXPress Server Manager computer's IP address and <port> with the
QuarkXPress Server Manager port number.
These classes can be chained together to form compound QuarkXPress Server requests.
The sample applications (see "Sample applications") show how to use these classes to invoke
a QuarkXPress Server command and manipulate the response.
For more information, see "Using the Web interface." In addition to the classes listed there,
the Web services interface includes the following:
•
QManagerSDKSvc processes QuarkXPress Server requests. This object's generic
processRequest() method takes a QRequestContext argument and returns a
16 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
QContentData object containing the response. For more information, see the sample
applications and "Using the Web interface."
•
QRequestContext is the argument you pass to QManagerSDKSvc. This object contains
settings which must be set once per request. Set all chained requests inside the request
context.
•
QRequest is the base class for all request objects (such as PDFRenderRequest).
Consequently, all request objects share some common data members.
•
RequestParameters is a generic class for executing any request and for adding dynamic
properties to a request.
•
NameValueParam is a generic class for adding dynamic properties to a request. This class
is specifically for requests that take a box's name and/or ID as the parameter name and
the box's content as the value.
•
QContentData is the response returned when a request is executed. QContentData is a
hyperlink that follows the same pattern as the classes above.
•
QException is the exception class for QuarkXPress Server Manager. This object is returned
by the getErrorObject() method.
Description
•
QManagerScriptingSvc is the Web services scripting interface.
You can extend the WIG to include your own XTensions software applications by simply
modifying an XML file and redeploying the WIG Web service.
To exclude empty tags in the request HTML, set the value of the appropriate variable to
null.
For Javadocs, WSDL schemas, and JSP samples, see the Welcome page that displays when
you launch QuarkXPress Server Manager.
The following topics describe the general Web services classes.
QRequestContext
An argument passed to QManagerSDKSvc. Contains settings that must be set once per request. All
chained requests must be set inside the request context.
Web service data objectType
NameMembers
documentName
DescriptionTypes
File or object name on which the command will be rendered.String
serverName
serverPort
userName
userPassword
String
Server name. Default is NULL. Load balancer searches for the host
itself in this case.
Port at which the desired server is listening.Integer
Max number of times to try executing the command before
returning failure.
Max time out in milliseconds.Integer
Indicates whether the cache should be checked for an existing
result or if the command should be executed again.
This value indicates whether the server should send the response
as-is (text or binary) or store the response on the server and return
its location as a URL. Because the object model works on SOAP,
which can be slow when transferring large binary files, you might
choose to set this value to "true" if you suspect that the response
is going to be several megabytes or larger.
Indicates whether file info should be fetched before executing the
command.
Context in which the command is being executed.String
QuarkXPress Server request is instances of request objects chained
together.
Description
Methods
//Create the service and call it QRequestContext object
QManagerSDKSvcService svc = new QManagerSDKSvcService();
sdk.QContentData qc = svc.processRequest(rc);
QManagerSDKSvc
Web service called to process the QuarkXPress Server request. QManagerSDKSvc has a generic method
named processRequest() that takes QRequestContext as an argument and returns QContentData
as the QuarkXPress Server response.
Web serviceType
processRequest
createSession
Processes the request context and returns the result.
DescriptionTypeParameter
QRequestContextrequestCmd
Creates a new session and returns a session ID.
timeout
Long
Argument passed to
QManagerSDKSvc. Contains settings
that must be set once per request.
All chained requests are set inside
the request context.
DescriptionTypeParameter
Timeout for the session in
milliseconds. If no call is executed
in that time, session is expired and
all the open documents in that
18 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
session are closed without saving. If
0 is passed as value of timeout,
default timeout is used. If a negative
value is passed as timeout, the
session never expires.
closeAlldocs
closeDoc
closeSession
Closes all open documents in the session without saving them. If the session
does not exist, an error is returned. If an error occurs while closing the
document, it is logged and the document is marked closed in the internal
cache. No error is returned.
DescriptionTypeParameter
sessionId
Closes the specified document without saving it. If the session does not exist,
an error is returned. If the document is not open, and error is returned. If the
document is open in another session, an error is returned. If an error occurs
while closing the document, it is logged and the document is marked closed
in the internal cache. No error is returned.
docName
sessionId
Closes the specified session. If the session does not exist, an error is returned.
If any documents are still open in the session, an error is returned.
String
String
Session whose documents are to be
closed.
DescriptionTypeParameter
Document to be closed.String
Session in which document was
opened.
DescriptionTypeParameter
getErrorObject
getOpenDocs
getOpenSessions
getPreferences
setPreferences
getXPressDOM
sessionId
Gets the internal error object. If you receive an exception from Web services,
and that exception was caused by QuarkXPress Server or Manager (rather than
a runtime exception such as a null pointer exception), you can call this method
and pass a stringified form of the exception. The method returns an error
object which has easy-to-use methods for getting the error code, getting the
error message, and so forth.
Gets all the open documents in the session. If the session does not exist, an
error is returned.
sessionId
Gets all open sessions.
Gets QuarkXPress Server preferences.
Sets QuarkXPress Server preferences.
Creates a DOM for the specified document.
String
Session to be closed.String
DescriptionTypeParameter
Session whose open documents are
sought.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 19
GETTING STARTED
newDoc
Creates a new document for modification and keeps it open until further
notice. The document is created with a single layout. To create a more complex
document, use the processRequestEx API. If a document with the same name
is already open, an error is returned. If the session does not exist, an error is
returned.
DescriptionTypeParameter
docName
jobJacketName
jobTicketName
host
String
String
String
Document to be opened for
modification. Provide the name
only. You can proivde a relative
path when you save the document.
Name of the Job Jackets file to be
used. The Job Jackets file is assumed
to be already available on the
QuarkXPress server computer.
Name of the Job Ticket to be used.String
The QuarkXPress Server instance
that should be used for this
document modification. If null, this
value is supplied by the load
balancer. If the indicated server is
not an active registered server, an
error is thrown.
openDoc
port
sessionId
Opens the specified document and keeps it open until further notice. If the
document is already open, an error is returned. If the session does not exist,
an error is returned.
docName
host
port
sessionId
Integer
String
String
String
Integer
String
The port for the server specified in
the host parameter.
Session in which the document
should be opened.
DescriptionTypeParameter
Document (along with relative path
if required) to be opened for
modification.
QuarkXPress Server instance which
should be used for this document
modification. If null, this value is
supplied by the load balancer. If the
indicated server is not an active
registered server, an error is thrown.
The port for the server specified in
the host parameter.
Session in which the document
should be opened.
processRequestEx
Executes the request context. If a session ID is specified, the document is kept
open after the request is executed. If no session ID is specified, the request is
20 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
executed normally without keeping the document open. If the document is
open in another session, an error is returned. If the document is marked dirty,
an error is returned (a document is marked dirty when the server that opened
the document has become inactive; in such a case, the document must be
closed and opened again).
DescriptionTypeParameter
saveAllDocs
QRequestContextreqContextObj
sessionId
Saves all open documents in the session. The documents are saved one by
one. If error occurs while saving a document, an error is returned immediately
and the rest of the documents remain unsaved. If a document is marked dirty,
an error is returned (a document is marked dirty when the server that opened
the document has become inactive; in such a case, the document must be
closed and opened again).
relativePath
String
String
Request to be executed.
Session in which the request should
be executed. This value may be null.
If a session ID is provided, the
document is kept open. If no session
ID is provided, the request is
executed normally, as if
processRequest had been called.
DescriptionTypeParameter
Relative path where open
documents should be saved. If this
value is provided, copies of open
documents with changes made so
far are saved in the new location.
The open documents are not saved
but have all of the changes made so
far.
saveDoc
sessionId
Saves the open document. If a document is marked dirty, an error is returned
(a document is marked dirty when the server that opened the document has
become inactive; in such a case, the document must be closed and opened
again).
docName
newName
relativePath
String
String
String
String
Session in which the document
exists.
DescriptionTypeParameter
Document to be saved. Must be the
same name that was used when
opening or creating the document.
New name of the document. If null,
the document is saved with the old
name.
Relative path where the document
should be saved. The relative path
can also contain the new name of
the document. If this is provided, a
copy of the open document with
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 21
GETTING STARTED
changes made so far is saved in the
new location. The open document
is not saved but has all of the
changes made so far.
JPEGRenderRequest jpegRequest = new JPEGRenderRequest();
rc.request = jpegRequest;
QManagerSDKSvcService svc = new QManagerSDKSvcService();
QContextData response = svc.processRequest(rc);
Lets you create a DOM of a particular layout or portion of a layout.
Creates an XML string out of the DOM.
Takes a raw XML representation of a project as a string and returns an object
model representing that project, with Project as the root class.
String
Session in which the document
exists.
QRequest
Base class for all request objects (such as PDFRenderRequest). All request objects share some common
data members, which are described below.
Web service data objectType
Additional
comments
NameMembers
QRequestrequest
DescriptionTypes
QuarkXPress Server request that includes instances of request objects
chained together.
RequestParameters
Generic class for executing any request and for adding dynamic properties to a request.Description
Web service data objectType
NameMembers
namespace
NameValueParam[]params
You can use this class to send any request for which a specific class does not exist. When this
request exists in the chain, its namespace is concatenated with the namespaces of other requests.
That means the namespace provided here can be null.
The parameters of this class can be used to parameterize a request being sent to the server.
DescriptionType
Namespace of the request (for example, jpeg).String
Parameter array for the specified request (for
example, jpegquality).
22 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
Example, object
model
Description
QRequestContext rc = new QRequestContext();
RequestParameters request = new RequestParameters();
request.setNamespace("jpeg");
rc.setRequest = request;
NameValueParam p1 = new NameValueParam();
p1.setParamName = "jpegquality";
p1.setTextValue = "4";
request.setParams(new NameValueParam[]{p1});
NameValueParam
Generic class for adding dynamic properties to a request. This class is specifically for requests that take
a box name/id as the parameter name and the box content as the parameter value.
Web service data objectType
NameMembers
paramName
textValue
streamValue
String
String
byte[]
DescriptionType
Name of the parameter. In most cases this will be the name/ID of
the box.
Text value of the box. (You can set either textValue or
streamValue.)
Stream value of the box. (You can set either textValue or
streamValue.)
contentType
QContentData
A response to a Web Services call to QuarkXPress Server.Description
Web service data objectType
NameMembers
contentType
textData
responseURL
streamValue
encodingType
actualServerPortUsed
The MIME content type of the parameter.String
String
String
String
binary
String
DescriptionTypes
The type of the response. For example, "text/xml" or
"text/plain."
If the response type is text, this contains the text.
Otherwise, this value is null.
If the responseAsURL parameter was set to "true" in the
request, this contains the URL of the response.
Otherwise, this value is null.
If the response type is binary, this contains the byte
array. Otherwise, this value is null.
If the response type is text, this value indicates the
encoding of the text (for example, UTF-8 or ANSI).
Identifies the server port.String
actualServerUsed
Identifies the server.String
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 23
GETTING STARTED
Example, object
model
Description
Type
headers
multipartResponse
QRequestContext context = new QRequestContext();
context.setDocumentName("sample.qxp");
context.setResponseAsURL(true);
JPEGRenderRequest request = new JPEGRenderRequest();
request.setJPEGQuality("4");
context.setRequest(request);
QManagerSDKSvcServiceLocator serviceLocator = new
QManagerSDKSvcServiceLocator();
QManagerSDKSvc service = serviceLocator.getqxpsmsdk();
QContentData response = service.processRequest(context);
System.out.println(response.getResponseURL());
String
String
If the response returned by the server is a set of headers,
this array contains the header response.
If the response returned by the server is multipart, this
array contains the multipart response parts.
QException
Exception class for QuarkXPress Manager. This class is returned by the getErrorObject method.
Exception
NameMembers
httpResponseCode
DescriptionTypes
HTTP response code.String
Example,
object model
managerErrorCode
managerErrorMessage
serverErrorCode
serverErrorMessage
serverExtendedMessage
String docName = "notexisting.qxp";
try {
QRequestContext ctx = getRequestContext(docName);
QRequest request = getJPEGRequest();
ctx.setRequest(ctx);
QContentData response = getService().processRequest(ctx);
System.out.println(response.getResponseURL());
}
catch (Exception ex) {
//PLEASE NOTE that the following would work only if
//QuarkXPress Manager threw an exception and it is not
//a runtime exception. In latter cases, an empty
//error object will be returned.
QException error = getService().getErrorObject(ex.toString());
System.out.println(error.getServerErrorCode());
}
QuarkXPress Server Manager error code.String
QuarkXPress Server Manager localized error message.String
QuarkXPress Server error code.String
QuarkXPress Server response message.String
QuarkXPress Server extended error message.String
QManagerScriptingSvc
Scripting interface via Web service.Description
Web service data objectType
24 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
Methods
checkScriptSyntax
deleteScript
executeScript
executeScriptFunction
executeScriptFunctionWithArguments
Checks the syntax of a script.
DescriptionTypeParameter
id
Deletes a script.
id
Executes a script.
id
Executes a function of a script.
id
function
Executes a function of a script, with passed arguments.
Script ID.String
DescriptionTypeParameter
Script ID.String
DescriptionTypeParameter
Scipt ID.String
DescriptionTypeParameter
String ID.String
Function to execute.String
executeScriptWithVars
getAllScripts
getErrorObject
getScript
DescriptionTypeParameter
id
function
arguments
Executes a script with variables for the script to use.
id
Gets all scripts saved with the system.
Creates an error object from a error string.
errorString
Gets the script with the specified ID.
String[]
QScriptVar[]variables
String ID.String
Function to execute.String
Arguments to pass to
function.
DescriptionTypeParameter
Script ID.String
Variables to be used by
script.
DescriptionTypeParameter
Error string to use.String
getScriptExecutionDetails
id
Gets the runtime details of a script.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 25
DescriptionTypeParameter
Script ID.String
GETTING STARTED
DescriptionTypeParameter
Script ID.String
DescriptionTypeParameter
Language to check.String
DescriptionTypeParameter
Script to update or add.
getSupportedLanguages
isLanguageSupported
updateScript
scriptId
Gets the supported scripting languages.
Checks whether a particular scripting language is supported.
language
Updates a script. If the script does not exist, this function
adds it.
QScriptscript
QXP Server Manager
The following topics are for people who want to enhance QuarkXPress Server Manager or
integrate it with other software.
Please refer to http://localhost:8090/qxpsmdocs/apidocs/index.html for manager
API documentation. (Note that the port number used to retrieve the API documentation
is 8090 by default, but you should use whatever port number you specified when installing
QuarkXPress Server Manager.)
QuarkXPress Server Manager was developed using interface-based programming and uses
the Spring Framework to instantiate pluggable objects. When QuarkXPress Server Manager
starts up, it reads the contents of a Spring context definition file named
"ManagerContainerConfig.xml" and instantiates all of the beans listed in the file.
QuarkXPress Server Manager then initializes by reading various configuration options
from a file named "ManagerConfig.xml."
Integrating with other Web servers
By default, QuarkXPress Server Manager is integrated with Tomcat.
QuarkXPress Server Manager needs a cache virtual directory to work. The context definition
file contains a bean definition called ContainerAdapter. By default, it uses the Tomcat
adapter, QTomcatContainerAdapterImpl. This adapter assumes the virtual directory to
be cache and reads the location of the virtual directory from the "cache.xml" file, which
is located in Tomcat's conf/Catalina/localhost folder.
If QuarkXPress Server Manager needs to be hosted in another web server, you can write
your own adapter or use QDefaultContainerAdapterImpl (which is provided with
QuarkXPress Server Manager). This adapter assumes that the cache folder is located under
the Web application context folder. The name of the cache folder can be set using the
Spring configuration file or the setCacheFolderRelativePath method.
26 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
Embedding QXP Server Manager
You can embed QuarkXPress Server Manager in applications (stand-alone or otherwise).
To do so, you must first initialize QuarkXPress Server Manager, as shown below:
QConfigurationData initializationData = new QConfigurationData();
initializationData.setBeanDefinitionConfigFile("ManagerContainerConfig.xml");
QClassFactory.getInstance().init(initializationData);
You can configure other QuarkXPress Manager options using QConfigurationManager.
Next, you must register one or more QuarkXPress Server hosts, like so:
QConnectionInfo connInfo = new QConnectionInfo();
connInfo.setServerName(<XPRESS_SERVER_NAME>);
connInfo.setServerPort(<XPRESS_SERVER_PORT>);
connInfo.setUserName(<XPRESS_SERVER_ADMIN_USER>);
connInfo.setPassword(<XPRESS_SERVER_ADMIN_PASSWORD>);
QHostSummary host = new QHostSummary();
host.setConnectionInfo(connInfo);
configManager.registerHost(host);
Once you have done so, you can use the embedded QuarkXPress Server Manager as shown
below:
XMLRequest xmlRequest = new XMLRequest();
QRequestContext context = new QRequestContext();
context.setDocumentName(<SAMPLE_DOCUMENT>);
context.setResponseAsURL(false);
context.setRequest(xmlRequest);
QContentData response = QRequestProcessor.getInstance().processRequest(context);
System.out.println(response.getTextData());
Writing special request handlers
If you need to perform custom actions on specific flags, you need to define special flags
and write handlers for them. These flags can then be passed as GET parameters to the
servlet, as additional QParam parameters in QCommand (executed using
QManagerSvc.executeCommand), or as additional NameValueParam parameters in a
derived class of QRequest using QManagerSDKSvc.processRequest. The servlet will
automatically create parameters out of these flags and set these in the command before
sending it for execution.
To handle these special flags, you can write your request handler derived from the class
QRequestHandler. You can then insert this new handler class anywhere in the chain of
responsibility pattern, starting with QDocProviderImpl and ending with
QHostRequestHandler.
Try not to change end points. In your handler implementation, handle your special flags,
then either return a response after handling or pass the control to the successor for further
handling.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 27
GETTING STARTED
getLoadBalancerAlgorithm
Implementing a custom load balancer
To implement a custom load balancer, first implement the
com.quark.manager.lb.QLoadBalancer interface. To use this interface, add a reference
to "managerengine.jar" to your project.
This interface method contains the following methods:
Signature
Description
getLoadBalancerDescription
Signature
Description
useFileInfo
Signature
Description
Returns
getAvailableHost
Signature
public String getLoadBalancerAlgorithm();
Returns the name of the algorithm that is mapped to the current load balancer while loading
the server.
The algorithm name used to load-balance the list of hosts.Returns
public String getLoadBalancerDescription();
Gets the description of the load-balancing algorithm so it can be displayed in the
QuarkXPress Server Manager client.
Description of the load balancer.Returns
public Boolean useFileInfo();
Gets a flag that indicates whether the load balancer uses file information to decide on
which host to use.
True if the fileinfo command should be fired before rendering, otherwise false.
public QHostProxy getAvailableHost(QHostProxy[] hosts, QCommand
command);
Gets an available host out of the provided list of hosts to execute the specified command.Description
Parameters
hosts: List of hosts that should be scanned for the most eligible host.
command: Command for which host is being searched.
Available host. Can be used for next request.Returns
Next:
Make a jar for the load balancer.
1
Deploy the jar to the following folder: {Apache-Tomcat
2
Home}\webapps\axis\WEB-INF\lib
Configure "ManagerContainerConfig.xml" for bean mapping:
3
1
Navigate to {Apache-Tomcat Home}\webapps\axis\WEB-INF\classes .
28 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
GETTING STARTED
2 Open the "ManagerContainerConfig.xml" file and look for the XML tag bean whose
id has the value ConfigurationManager.
3
Within that tag find the property name availableLoadBalancers.
4
In the <list> tag, add the following: <ref bean={your newbeanID}/>
5
Above this ConfigureManager tag, define the bean ID as your new bean ID: <bean
Execute Server/utilities/ClientSDKRequestObjectGenerator.sh (Mac OS) or
3
Server/utilities/ClientSDKRequestObjectGenerator.bat (Windows) and look
for errors. If you encounter an error, address the problem, then execute
ClientSDKRequestObjectGenerator again. When the process completes successfully,
"managersdkro.jar", "managerdomgenerator.jar", and "managerrequestserializer.jar" are
regenerated in the webapps/quark/WEB-INF/lib folder. Check the timestamps to verify
that the files are new.
Launch QuarkXPress Server Manager.
4
Modify Server/utilities/deploy_sdk.wsdd to add the bean mapping for the newly
5
generated class. To make change tracking easier, position the mapping within the classes
to match the position of any changes made to the DTD or XML.
Edit Server/utilities/deploy.sh (Mac OS) or Server/utilities/deploy.bat
6
(Windows) to change the port number where QuarkXPress Server Manager is running (if
it is different from 8090).
Execute Server/utilities/deploy.sh (Mac OS) or Server/utilities/deploy.bat
7
(Windows) and check for errors.
QXP SERVER 8.5 WEB INTEGRATION GUIDE | 29
GETTING STARTED
Open a Web browser and enter the following URL:
8
http://localhost:8090/quark/services/qxpsmsdk?wsdl. Verify that the class you
just added is visible in WSDL.
Generating new SDK stubs
To generate new stubs:
Execute Server/utilities/stub.sh (Mac OS) or Server/utilities/stub.bat
1
(Windows) and look for errors. If you encounter an error, address the problem, then execute
Server/utilities/stub.sh or Server/utilities/stub.bat again. If the process
succeeds, "managerwebservicestubs.jar" is generated in the Server/utilities directory.
You can use these Java stubs in Java applications that communicate with QuarkXPress Server
Manager.
If the application you are developing is in Visual Studio .NET, then you need to generate
2
stubs again. Simply open your solution in Visual Studio, then either refresh the Web service
reference or remove the Web service reference and then add it again.
Understanding ManagerSDK.xml
"ManagerSDK.xml" is used to generate client SDK classes for QuarkXPress Server requests.
Each element in "ManagerSDK.xml" corresponds to a request handler, a render type, or
an element in the DTD.
A client SDK class is generated for each element in the XML. Each property in the DTD
and each parameter of the request handler or render type also corresponds to a unique
element in the XML.
A Class variable is generated for each property, as follows.
•
<Class>: One element for each SDK class generated. The class generated is derived from
QRequest. Attributes are:
•
name: The name of the generated class.
•
namespace: The namespace recognized by QuarkXPress Server when this request
class is translated into a QuarkXPress Server request.
•
description: A description of the class. Unless this value is null, the description
forms the header of the generated class and is included in the generated API docs.
•
alias: The alias to be used as an element name if this request class is serialized to
XML. For example, when the Project class is serialized to XML, the element used
is Project.
•
serializeAs: Determines how the class is serialized. The valid values are:
•
nameValue indicates that all members of the class should be handled as
name-value pairs in the request to QuarkXPress Server. (This is the default
option in JPEGRenderRequest and ModifierStreamRequest.)
30 | QXP SERVER 8.5 WEB INTEGRATION GUIDE
Loading...
+ 196 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.