Configuring the Server

www.altova.com Print this Topic Previous Page Up One Level Next page

Home >  Server APIs: HTTP REST, COM/.NET, Java > HTTP REST Client Interface > Server Setup >

Configuring the Server

This section:

 

Server configuration file: initial settings
Server configuration file: modifying the initial settings, reverting to initial settings
Server configuration file: listing and settings
Server configuration file: description of settings
Configuring the server address

 

Server configuration file: initial settings

RaptorXML Server is configured by means of a configuration file called server_config.xml, which is located by default at:

 

C:\Program Files (x86)\Altova\RaptorXMLServer2019\etc\server_config.xml

 

The initial configuration for RaptorXML Server defines the following:

 

A port number of 8087 as the server's port.
That the server listens only for local connections (localhost).
That the server writes output to C:\ProgramData\Altova\RaptorXMLServer2019\Output\.

 

Other default settings are shown in the listing of server_config.xml below.

 

Server configuration file: modifying the initial settings, reverting to initial settings

If you wish to change the initial settings, you must edit the server configuration file, server_config.xml (see listing below), save it, and then restart RaptorXML Server as a service.

 

If you wish to recreate the original server configuration file (so that the server is configured with the initial settings again), run the command createconfig:

 

 RaptorXML.exe createconfig

 

On running this command, the initial settings file will be recreated and will overwrite the file server_config.xml. The createconfig command is useful if you wish to reset server configuration to the initial settings.

 

Server configuration file: listing and settings

The server configuration file, server_config.xml, is listed below with initial settings. Settings available in it are explained below the listing.

 

 

server_config.xml

 

<config xmlns="http://www.altova.com/schemas/altova/raptorxml/config"

xsi:schemaLocation="http://www.altova.com/schemas/altova/raptorxml/config 
http://www.altova.com/schemas/altova/raptorxml/config.xsd" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xs="http://www.w3.org/2001/XMLSchema">

 

<language>en</language>

  <server.unrestricted-filesystem-access>true</server.unrestricted-filesystem-access>

  <server.output-root-dir>C:\ProgramData\Altova\RaptorXMLServer2019\output\</server.output-root-dir>

  <server.script-root-dir>C:\Program Files\Altova\RaptorXMLServer2019\etc\scripts\</server.script-root-dir>

  <!--<server.default-script-api-version>2</server.default-script-api-version>-->

<!--<server.catalog-file>catalog.xml</server.catalog-file>-->

  <!--<server.log-file>C:\ProgramData\Altova\RaptorXMLServer2019\Log\server.log</server.log-file>-->

 

  <http.enable>true</http.enable>

<http.environment>production</http.environment>

<http.socket-host>127.0.0.1</http.socket-host>

<http.socket-port>8087</http.socket-port>

  <http.log-screen>true</http.log-screen>

<http.access-file>C:\ProgramData\Altova\RaptorXMLServer2019\Log\access.log</http.access-file>

<http.error-file>C:\ProgramData\Altova\RaptorXMLServer2019\Log\error.log</http.error-file>

 

  <https.enable>false</https.enable>

  <https.socket-host>127.0.0.1</https.socket-host>

  <https.socket-port>443</https.socket-port>

  <https.private-key>C:\Program Files\Altova\RaptorXMLServer2019\etc\cert\key.pem</https.private-key>

  <https.certificate>C:\Program Files\Altova\RaptorXMLServer2019\etc\cert\cert.pem</https.certificate>

  <!--<https.certificate-chain>/path/to/chain.pem</https.certificate-chain>-->

 

</config>

 

Settings

 

language

Sets the language of server messages, in an optional language element. The default value is en (English). Allowed values are en|de|es|fr|ja (English, German, Spanish, French, and Japanese, respectively). See Localization Commands for an overview of how to localize RaptorXML.

 

 

server.unrestricted-filesystem-access

 

When set to true (the default value), output files will be written directly to the location specified by the user and in Python scripts (possibly overwriting existing files of the same name). Note, however, that local file paths cannot be used to access files from a remote machine via HTTP. So, if RaptorXML Server is running on a remote machine, set the value of this option to false. Setting the value to true is only viable if the client and server are on the same machine and you want to write the output files to a directory on that machine.
When set to false, files will be written to the job's directory in the output directory, and the URIs of these files will be included in the result document. Setting the value to false provides a layer of security, since files can be written to disk only in a dedicated and known job directory on the server. Job output files can subsequently be copied by trusted means to other locations.

 

 

server.output-root-dir

Directory in which the output of all submitted jobs is saved.

 

 

server.script-root-dir

Directory in which trusted Python scripts are to be saved. The script option, when used via the HTTP interface, will only work when scripts from this trusted directory are used. Specifying a Python script from any other directory will result in an error. See 'Making Python Scripts Safe'.

 

 

server.default-script-api-version

Default Python API version used to run Python scripts. By default the newest version of the Python API is used. Currently supported values are 1 and 2. 

 

 

server.catalog-file

URL of the XML catalog file to use. By default, the catalog file RootCatalog.xml, which is located in the folder <ProgramFilesFolder>\Altova\RaptorXMLServer2019\etc, will be used. Use the server.catalog-file setting only if you wish to change the default catalog file.

 

 

server.log-file

Name and location of the server log file. Events on the server, like Server started/stopped, are logged continuously in the system's event log and displayed in a system event viewer such as Windows Event Viewer. In addition to the viewer display, log messages can also be written to the file specified with the server.log-file option. The server log file will contain information about all activities on the server, including server startup errors, the configuration file used, and license errors.

 

 

http.enable

A boolean value to enable or disable HTTP: true | false. HTTP can be enabled/disabled independently of HTTPS, and both can be active concurrently.

 

 

http.environment

Internal environments of raptorxml: production | development. The Development environment will be more geared to the needs of developers, allowing easier debugging than when the Production environment is used.

 

 

http.socket-host

The interface via which RaptorXML Server is accessed. If you wish RaptorXML Server to accept connections from remote machines, uncomment the element and set its content to: 0.0.0.0, like this: <http.socket-host>0.0.0.0</http.socket-host>. This hosts the service on every addressable interface of the server machine. In this case, ensure that firewall settings are suitably configured. Inbound firewall exceptions for Altova products must be registered as follows: Altova LicenseServer: port 8088; Altova RaptorXML Server: port 8087; Altova FlowForce Server: port 8082.

 

 

http.socket-port

The port via which the service is accessed. The port must be fixed and known so that HTTP requests can be correctly addressed to the service.

 

 

http.log-screen

If RaptorXML Server is started with the command RaptorXMLServer.exe debug, (see Starting the Server) and if http.log-screen is set to true, then server activity is displayed in the command line console. Otherwise server activity is not displayed. The log screen is displayed in addition to the writing of log files.

 

 

http.access-file

Name and location of the HTTP access file. The access file contains information about access-related activity. It contains information that is useful for resolving connection issues.

 

 

http.error-file

Name and location of the HTTP error file. The error file contains errors related to traffic to and from the server. If there are connection problems, this file can provide useful information towards resolving them.

 

 

http.max_request_body_size

This option specifies the maximum size of the request body that RaptorXML Server accepts. The default value is 100MB. If the site of a request body is larger than the value specified for this option, then the server responds with HTTP Error 413: Request entity too large. The option's value must be greater than or equal to zero. The limit can be disabled with http.max_request_body_size=0.

 

 

https.enable

A boolean value to enable or disable HTTPS: true | false. HTTPS can be enabled/disabled independently of HTTP, and both can be active concurrently. HTTPS support is disabled by default and must be enabled by changing the value of this setting to true.

 

 

https.socket-host

Takes a string value which is the host address on which HTTP connections are accepted. To accept connections from the local host only, set localhost or 127.0.0.1. If you wish RaptorXML Server to accept connections from all remote machines, set the value to: 0.0.0.0, like this: <http.socket-host>0.0.0.0</http.socket-host>. This hosts the service on every addressable interface of the server machine. In this case, ensure that firewall settings are suitably configured. Inbound firewall exceptions for Altova products must be registered as follows: Altova LicenseServer: port 8088; Altova RaptorXML Server: port 8087; Altova FlowForce Server: port 8082. You can also use IPv6 addresses such as: '::'.

 

 

https.socket-port

An integer value that is the port on which HTTPS is accepted. The port must be fixed and known so that HTTP requests can be correctly addressed to the service.

 

 

https.private-key, https.certificate

URIs that are the paths, respectively, to the server's private key and certificate files. Both are required. See HTTPS Settings and Setting Up SSL Encryption for more information. On Windows machines, you can also use Windows paths.

 

 

https.certificate-chain

An optional setting, this is a URI which locates the intermediate certificate file. If you have two intermediate certificates (primary and secondary), then combine them into one file as described in Step 7 at Setting Up SSL Encryption. See HTTPS Settings and Setting Up SSL Encryption for more information.

 

The RaptorXML Server address

The HTTP address of the server consists of the socket-host and socket-port:

http://{socket-host}:{socket-port}/

 

The address as set up with the initial configuration will be:

http://localhost:8087/

 

To change the address, modify the http.socket-host and http.socket-port settings in the server configuration file, server_config.xml. For example, say the server machine has an IP address of 123.12.123.1, and that the following server configuration settings have been made:

<http.socket-host>0.0.0.0</http.socket-host>
<http.socket-port>8087</http.socket-port>  

 

RaptorXML Server can then be addressed with:

http://123.12.123.1:8087/

 

 

Note:After server_config.xml has been modified, RaptorXML Server must be restarted for the new values to be applied.

 

Note:If there are problems connecting to RaptorXML Server, information in the files named in http.access-file and http.error-file can help resolve issues.

 

Note:Messages submitted to RaptorXML Server must contain path names that are valid on the server machine. Documents on the server machine can be accessed either locally or remotely (in the latter case with HTTP URIs, for example).

 


© 2019 Altova GmbH