Skip to main content
Skip table of contents

JCo 3 Listener configuration

Read on this page how to assign properties and methods to incoming JCo 3 connections.

The configuration of incoming JCo 3 connections from one or several SAP systems is located within the file saplistener.xml  in <X4>\X4DB\0. There, a JCo 3 listener can be defined for each SAP system. The JCo 3 Listener thereby references server properties and method definitions (in a specific XML document).

XML structure

To describe the structure of saplistener.xml also an XML schema definition saplistener.xsd is available within the same folder. This XSD is specified within the root element <listeners> of the Listener configuration.

HTML/XML
<listener>
   <serverPropertiesURL>Path to the properties file</serverPropertiesURL>
   <methodDefinitionsURL>Path to the method definition</methodDefinitionsURL>
   <replaceEscapedControlChars>false</replaceEscapedControlChars><!-- true | false -->
</listener>

Each element <listener> contains the following child elements:

  • <serverPropertiesURL>: Valid URL to a properties text file that contains all connection settings for the SAP host

  • <methodDefinitionsURL>: Valid URL to an XML document, in which all method definitions or function block calls and transaction handling processes are defined

  • <replaceEscapedControlChars>Replace masked control characters (e.g.: &#31;) within the XML strings returned by the JCo library by the replacement character:

    Possible values are
    true and false.

Example

For the connection of two SAP hosts, two single listeners with separate properties and method definitions are defined. Moreover, with replaceEscapedControlChars true masked control characters (e.g.: &#31;) within the XML strings returned by the JCo library are replaced by the replacement character.

HTML/XML
<listeners xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:noNamespaceSchemaLocation="saplistener.xsd">
  <listener>
     <serverPropertiesURL>file:///C:/X4/X4DB/0/host1.prop</serverPropertiesURL>
     <methodDefinitionsURL>file:///C:/X4/X4DB/0/host1_method_def.xml
     </methodDefinitionsURL>
	 <replaceEscapedControlChars>true</replaceEscapedControlChars>
  </listener>
  <listener>
     <serverPropertiesURL>file:///C:/X4/X4DB/0/host2.prop</serverPropertiesURL>
     <methodDefinitionsURL>file:///C:/X4/X4DB/0/host2_method_def.xml
     </methodDefinitionsURL>
	 <replaceEscapedControlChars>true</replaceEscapedControlChars>
  </listener>
</listeners>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.