The XML/SOAP RPC Server allows RPC clients to communicate with target servers via HTTP(S). The XML/SOAP RPC Server transforms RPC client calls into XML/SOAP calls. It works together with the XML/SOAP Wrapper. This document covers the following topics:
The following elements are used to set up the XML/SOAP RPC Server:
The start script for the XML/SOAP RPC Server is called jxmlrpcserver.bsh (UNIX) or jxmlrpcserver.bat (Windows) and is provided in the bin folder of the installation directory. You may customize this file.
You can set the environment variable JAVA_HOME
for the location of the Java interpreter.
Set the classpath to entirex.jar and the path to the generated proxies.
The XML/SOAP RPC Server accepts two unnamed parameters, broker_id
and server_address
.
Default values are localhost:1971
and RPC/SRV/CALLNAT
. Example:
java com.softwareag.entirex.xml.rt.XMLRPCServerbroker_id
server_address
The default name of the properties file is entirex.xmlrpcserver.properties
.
The file is searched for in the directory of the Start Script.
It can be changed by assigning an arbitrary file name with a path to a property with the name entirex.xmlrpcserver.propertyfile
.
The following is a sample properties file entirex.xmlrpcserver.properties
:
# Example server configuration # # parameter for xml stream parser entirex.sdk.xml.runtime.xmlparserfactory=com.ctc.wstx.stax.WstxInputFactory # xmlruntime configuration file entirex.sdk.xml.runtime.configurationfile=entirex.xmlrpcserver.configuration.xml # # Basic properties entirex.server.brokerid=localhost entirex.server.serveraddress=RPC/XMLSERVER/CALLNAT entirex.server.userid=XMLRPCServer
It can define parser settings, for example JAXP parameters (optional if these parameters are already specified in your environment) and the location of the configuration file. A sample properties file is contained in subfolder config of the installation folder.
Additionally, Java system properties are available to administer the XML/SOAP RPC Server. These properties are independent of the administration possibilities listed above.
Java System Property | Description | Values | Default |
---|---|---|---|
http.keepAlive |
Enable/disable HTTP persistence | true, false | true |
http.maxConnections |
Define the maximum number of HTTP connections to a host.
Note: |
Integer > 0 | 5 |
http.maxTotalConnections |
Define the maximum total number of HTTP connections to a host.
If Note: |
Integer > 0 | 20 |
The configuration contains a list of target servers defined in the TargetServer
block, including XML mapping files (XMM) associated with them and may contain information about the broker if not already
given as a property (command-line option, system property or property file).
The default name of the configuration file is entirex.xmlrpcserver.configuration.xml. The file is searched for in the directory of the Start Script. It can be changed by assigning an arbitrary file name with a path to a property with the name entirex.xml.runtime.configurationfile.
The configuration file has the lowest priority. It is written in XML format. The document frame is:
<?xml version="1.0" encoding="UTF-8" ?>
<EntireX xmlns="http://namespaces.softwareag.com/entirex/xml/runtime/configuration" version="9.12.0" >
<XmlRuntime Version="1">
<!-- information for XML/SOAP RPC Server, see TargetServer
Block -->
</XmlRuntime>
</EntireX>
The XML/SOAP RPC Server uses the properties that start with "entirex.server
" for configuring the RPC server side.
Alternatively to the properties, you can use the command-line options. These have a higher priority than the properties set as Java system properties, and these have higher priority than the properties in the configuration file.
Property Name | Command-line Option | Default | Explanation | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
entirex.server.brokerid |
-broker |
localhost |
Broker ID | ||||||||||||||||||
entirex.server.codepage |
-codepage |
The codepage the server uses. Permitted values are the names of the codepages the JVM supports. Use the value LOCAL when the default codepage of the JVM should be used. See Using Internationalization with EntireX XML Components under Writing Advanced Applications with the XML/SOAP Wrapper for details. | |||||||||||||||||||
entirex.server.compresslevel |
-compresslevel |
0 (no compression) |
|
||||||||||||||||||
entirex.server.development.relativepaths |
false |
The file locations of deployed XMM and WSDL files are written as relative paths in configuration file of the XML/SOAP RPC Server. | |||||||||||||||||||
entirex.server.environment |
Can be used in a user-written translation exit of the Broker. See BrokerService , setEnvironment(java.lang.String) (EntireX Java ACI).
|
||||||||||||||||||||
entirex.server.fixedservers |
no | If no, use attach server to manage worker threads, otherwise run minimum number of server threads. | |||||||||||||||||||
entirex.server.ignoreSOAPActionNamespace |
false |
true : Only the name part of SOAPAction is used, the namespace is ignored.false : The SOAPAction value is used as defined.
Note: |
|||||||||||||||||||
-help |
Display usage of the command-line parameters. | ||||||||||||||||||||
entirex.server.logfile |
-logfile |
Name of the log file, default is standard output. Environment variables in the name are resolved only if used as a command-line option. | |||||||||||||||||||
entirex.server.maxservers |
32 | Maximum number of worker threads. | |||||||||||||||||||
entirex.server.minservers |
1 | Minimum number of server threads. | |||||||||||||||||||
entirex.server.name |
The name of the server. | ||||||||||||||||||||
entirex.server.password |
-password |
The password for secured access to the Broker. The password is encrypted and written to the property
entirex.server.password.e . To change the password,
set the new password in the properties file (default is
entirex.server.properties ). To disable password
encryption, set entirex.server.passwordencrypt=no .
Default for this property is yes.
|
|||||||||||||||||||
entirex.sdk.xml.runtime.propertyfile |
-propertyfile |
entirex.xmlrpcserver.properties |
The file name of the property file. | ||||||||||||||||||
entirex.sdk.xml.runtime.configurationfile |
-configurationfile |
entirex.xmlrpcserver.configuration.xml |
Location and name of configuration file. | ||||||||||||||||||
entirex.server.restartcycles |
-restartcycles |
15 | Number of restart attempts if the Broker is not available. This can be used to keep the XML/SOAP RPC Server running while the Broker is down for a short time. | ||||||||||||||||||
entirex.server.security |
-security |
no | no/yes/auto/Name of BrokerSecurity object. | ||||||||||||||||||
entirex.server.serveraddress |
-server |
RPC/SRV1/CALLNAT |
Server address. | ||||||||||||||||||
entirex.server.serverlog |
-serverlog |
Name of the file where start and stop of worker threads is logged. Used by the Windows RPC Service. | |||||||||||||||||||
entirex.server.userid |
-user |
JavaServer | The user ID for the Broker for RPC. See entirex.server.password . | ||||||||||||||||||
entirex.server.verbose |
-verbose |
no | Enable verbose output to the log file. | ||||||||||||||||||
entirex.server.waitattach |
600S | Wait timeout for the attach server thread. | |||||||||||||||||||
entirex.server.waitserver |
300S | Wait timeout for the worker threads. | |||||||||||||||||||
entirex.timeout |
20 | TCP/IP transport timeout. See Setting the Transport Timeout under Writing Advanced Applications - EntireX Java ACI. | |||||||||||||||||||
entirex.trace |
-trace |
0 | Trace level (1,2,3). | ||||||||||||||||||
entirex.sdk.xml.runtime.xmlparserfactory |
-jaxp.saxparserfactory |
com.ctc.wstx.stax.WstxInputFactory
|
Location and name of stream parser factory class. | ||||||||||||||||||
entirex.sdk.xml.runtime. |
soap | Define the protocol used for fault document generation if no fault document is defined. Defined values = soap, xml. |
Generate a new XML mapping file with SOAP mapping in the XML Mapping Editor, or use an existing one.
Note:
Do not change the namespace for SOAP. This must be the namespace for SOAP version 1.1.
To use SOAP 1.2 for an XMM file, add the attribute soapVersion
to section xmms
in element exx-xmm
in the configuration file.
See soapVersion
under TargetServer
Block below for details.
The IDL library and IDL program names that come from the RPC client are used to locate the target server.
See library-definition
and program-definition
under Software AG IDL Grammar in the IDL Editor documentation.
This two-level concept (library and program) is mapped to a target servers using an XML mapping file (XMM) together with connection
information.
Both connection information and XML mapping files are defined in the target server block of the Configuration File.
Mapping Software AG IDL files to XML/SOAP is described under XML Structures and IDL-XML Mapping in the XML/SOAP Wrapper documentation. This section describes the following elements to define servers:
The section <TargetServer>
specifies a target server with mandatory HTTP(S) Web service address in the name
attribute.
Tip:
If you are using a target located outside the firewall, set the following Java properties:
http.proxyHost
http.proxyPort
http.nonProxyHosts
http.proxyUser
http.proxyPassword
Configuring SSL/TLS to the target server is described under Using SSL/TLS with the RPC Server.
The block contains section <xmms>
with EntireX XML mapping files (XMM files).
Each <TargetServer>
entry can have a list of XMMs for its server.
Caution:
It is not allowed to use one XMM in more than one TargetServer
entry inside one configuration file.
Within the <TargetServer>
tag you can specify basic authentication with a fixed user/password:
Attribute | Req/ Opt |
Description | ||||||
---|---|---|---|---|---|---|---|---|
basicAuthentication |
O |
|
||||||
user |
O | Name of default user for basic authentication. | ||||||
password |
O | Password of default user for basic authentication. | ||||||
password-encryption |
O | Specifies how the password is encrypted. Possible values:
|
||||||
httpConnectionTimeout |
R | HTTP connection timeout in seconds. |
See Reference - HTTP and Java Interface for explanation of attributes.
The section <xmms> contains the optional attributes for SOAP mapping.
Attribute | Description |
---|---|
soapVersion |
Specifies a SOAP version: 1.1 (default) or SOAP 1.2. |
wsdl |
The location of WSDL file, using a WSDL file the target address is retrieved from WSDL file. |
service |
The service name in WSDL file. |
port |
The port name in WSDL file. |
repository |
The repository directory used for WS-* features. See Software AG Web Services Stack client repository. |
usernameToken |
Valid values: PasswordText | PasswordDigest .
Prerequisites: Attribute |
Sample configuration file:
<?xml version="1.0" encoding="UTF-8" ?> <EntireX xmlns="http://namespaces.softwareag.com/entirex/xml/runtime/configuration" version="9.12"> <XmlRuntime Version="1"> <TargetServer name="http://localhost:1973/MyService"> <xmms> <exx-xmm name="c:\mydir\xmmfiles\XmmExample.xmm" soapVersion="1.1" wsdl="c:/mywsdl.wsdl" service="myservice" port="myserviceSOAP11Port" repository="c:\myrepository"\> </xmms> </TargetServer> </XmlRuntime> <EntireX>
Basic authentication is used for a target server if the attribute basicAuthentication
is defined in the TargetServer
block.
Basic authentication is used for all calls associated with the defined XMM files for the <TargetServer>
.
Basic authentication can be used with fixed credentials or credentials set from the RPC client application:
If <TargetServer>
contains attributes user
and password
, these settings are used for basic authentication.
Otherwise the RPC client application must provide the credentials: Enable Natural logon and set RPC user ID and RPC password.
See also Generating a Web Service with HTTP Basic Authentication and UsernameToken Authentication for EntireX Authentication under Using the EntireX Web Services Wrapper.
UsernameToken security is used for a target server if attribute usernameToken
is defined in <xmms>
.
Two kinds of UsernameToken
are supported:
PasswordText
PasswordDigest
The repository must be defined in section <xmms>
, for example:
<exx-xmm name="AService.xmm" soapVersion="1.1" repository="myrepository" usernameToken="PasswordText" />
The repository must contain module rampart
.
In the configuration file (axis2.xml) the rampart module must be engaged (<module ref="rampart"/>
) and the phase PreSecurity
can be empty (<phase name="PreSecurity" />
).
Natural logon must be set in the RPC client application. Additionally the RPC client application should set RPC user ID and RPC password.
See also Generating a Web Service with HTTP Basic Authentication and UsernameToken Authentication for EntireX Authentication under Using the EntireX Web Services Wrapper.
For specifying features such as WS-Policy, see configuration of Software AG Web Services Stack.
RPC servers can use Secure Sockets Layer/Transport Layer Security (SSL/TLS) as the transport medium. The term "SSL" in this section refers to both SSL and TLS. RPC-based servers are always SSL clients. The SSL server can be either the EntireX Broker or Broker SSL Agent. For an introduction see SSL/TLS and Certificates with EntireX in the EntireX Security documentation.
To use SSL with XML/SOAP RPC Server, you need to configure two sides: the RPC server side and the target server side.
To configure SSL/TLS with the RPC server side
To operate with SSL, certificates need to be provided and maintained. Depending on the platform, Software AG provides default certificates, but we strongly recommend that you create your own. See SSL/TLS Sample Certificates Delivered with EntireX in the EntireX Security documentation.
Set up the XML/SOAP RPC Server for an SSL connection.
Use the URL-style Broker ID with protocol ssl://
for the Broker ID. If no port number is specified, port 1958 is used as default. Example:
ssl://localhost:22101?trust_store=C:\SoftwareAG\EntireX\etc\ExxCACert.jks?verify_server=no
If the SSL client checks the validity of the SSL server only, this is known as one-way SSL. The mandatory trust_store
parameter
specifies the file name of a keystore that must contain the list of trusted certificate authorities for the certificate of
the SSL server.
By default a check is made that the certificate of the SSL server is issued for the hostname specified in the Broker ID.
The common name of the subject entry in the server's certificate is checked against the hostname. If they do not match, the
connection will be refused.
You can disable this check with SSL parameter verify_server=no
.
If the SSL server additionally checks the identity of the SSL client, this is known as two-way SSL. In this case the SSL server requests a client certificate
(the parameter verify_client=yes
is defined in the configuration of the SSL server).
Two additional SSL parameters must be specified on the SSL client side: key_store
and key_passwd
.
This keystore must contain the private key of the SSL client. The password that protects the private key is specified with
key_passwd
.
The ampersand (&) character cannot appear in the password.
SSL parameters are separated by ampersand (&). See also SSL/TLS Parameters for SSL Clients.
Make sure the SSL server to which the XML/SOAP RPC Server connects is prepared for SSL connections as well. The SSL server can be EntireX Broker or Broker SSL Agent. See:
Using HTTPS to the target server requires setting Java SSL/TLS properties and changing the protocol of the target server's Web service in the Configuration File.
To configure SSL/TLS to a target server
Set the following Java SSL/TLS properties.
Parameter | Description |
---|---|
-Djavax.net.ssl.keyStore=filename_without_blanks |
Here we keep the certificate and the private signing key of our client application, which is the RPC server. |
-Djavax.net.ssl.keyStorePassword=myPassword |
The password that protects the keystore. |
-Djavax.net.ssl.keyStoreType=pkcs12 |
If not jks (default).
|
-Djavax.net.ssl.trustStore=filename_without_blanks |
Here we keep the trusted certificate of the Web service host or the certificate of its signing (issuing) certificate authority. |
-Djavax.net.ssl.trustStorePassword=myPassword |
The password that protects the truststore. |
-Djavax.net.ssl.trustStoreType= |
If not jks (default).
|
The properties can be set for example in the Start Script. Example:
set CLASSPATH=.;.\classes\entirex.jar;..\WS-Stack\lib\wsstack-client.jar set PROXYSETTINGS=-Dhttps.proxySet=true -Dhttps.proxyHost=sslproxy.mydomain -Dhttps.proxyPort=443 -Dhttps.nonProxyHosts="localhost" set SSL=-Djavax.net.ssl.keyStore=C:\myKeystore.p12 -Djavax.net.ssl.keyStorePassword=myKeystorePassword -Djavax.net.ssl.keyStoreType=pkcs12 -Djavax.net.ssl.trustStore=C:\myTrustStore.jks -Djavax.net.ssl.trustStorePassword=myTruststorePassword java -classpath %CLASSPATH% %SSL% %PROXYSETTING% com.softwareag.entirex.xml.rt.XMLRPCServer
For more information about Java and SSL, see your Java documentation (JSSE documentation).
Optional. If you are using an HTTPS target server's Web service address located outside the firewall, set the following Java properties:
https.proxyHost
https.proxyPort
http.nonProxyHosts
https.proxyUser
https.proxyPassword
Change the protocol of the target server's Web service address from http
to https
in the configuration file.
Specify the fully qualified host name as TargetServer
.
The host name has to match the CN (Common Name) item of the host certificate. See also Configuration File.
Example:
<?xml version="1.0" encoding="iso-8859-1" ?> <EntireX xmlns="http://namespaces.softwareag.com/entirex/xml/runtime/configuration" version="9.12" > <XmlRuntime Version="1"> <TargetServer name="https://targethost:8080/entirex/xmlrt"> <xmms> <exx-xmm name="yourFile1.xmm" /> <exx-xmm name="yourFile2.xmm" /> </xmms> </TargetServer> </XmlRuntime> </EntireX>
To start the XML/SOAP RPC Server
Use the Start Script.
Or:
At the command prompt, enter:
java com.softwareag.entirex.aci.XMLRPCServerbroker_id
server_address
You can pass command-line options and customize your environment as described under Start Script.
To stop the XML/SOAP RPC Server
Use the command stopServer
. See Stop EntireX Broker Server Instances in Command Central's Command-line Interface.
Or:
Stop the server instance using Command Central's Graphical User Interface. See Stopping a Server Instance.
Or:
Use the command stopService
. See Stop Running EntireX Broker Services in Command Central's Command-line Interface.
Or:
Stop the service using Command Central's Graphical User Interface. See Stopping a Service.
Or:
Use the command-line utility etbcmd
. See etbcmd
under
z/OS |
UNIX |
Windows |
z/VSE |
BS2000.
Or:
Use CTRL-C
in the session where you started the RPC server instance.
Or:
Under UNIX, enter command kill -
.
process-id
For general information see Running an EntireX RPC Server as a Windows Service.
To run the XML/SOAP RPC Server as a Windows Service
Customize the Start Script according to your system installation.
Note:
The script file must pass external parameters to the RPC server:
java com.softwareag.entirex.xml.rt.XMLRPCServer %*
See also Starting the RPC Server.
Test your RPC server to see whether it will start if you run your script file.
Use the EntireX RPC Service Tool and install the RPCService
with some meaningful extension, for example MyServer
. If your Start Script is jxmlrpcserver.bat, the command will be
RPCService -install -ext MyServer -script install_path
\EntireX\bin\jxmlrpcserver.bat
The log file will be called RPCservice_MyServer.log.
In Windows Services menu (Control Panel > Administrative Tools > Services) select the service: Software AG EntireX RPC Service [MyServer]
and change the property Startup Type
from "Manual" to "Automatic".