OftpService
The OFTPService makes it possible to receive data transmissions via Odette file transfer in accordance with VDA 4914-2 and make them available to subsequent processes. Communication can take place via ISDN or TCP/IP.
When operation via ISDN, a CAPI-capable ISDN card and a CAPI driver installed on the system is necessary.
Since a so-called JNI layer has to be used for the connection via Java, the compilation of a special C file is required depending on the operating system used. Precompiled files already exist for the following operating systems.
All supported Windows versions.
Linux systems with CAPI 2.0 drivers (no l4i).
Similar to the FTPService, received data are passed on via MessageService to subsequent processes. The context and queue to be used have to be set accordingly.
XML configuration
Important note: The availability of a service depends on the license purchased and whether the service has been registered in the configuration file ./etc/factory.xml of the Service Factory (changes require server restart!). There you will also find the responsible configuration file for a service, otherwise you can also edit the configuration file of the service directly in the GUI of the service (changes require a service restart!).
The following XML fragment with all possible basic settings can be used for the configuration of OFTPService.
<
Set
name
=
"controller"
>1</
Set
>
<
Set
name
=
"ignoreTooBigTransferedSize"
type
=
"boolean"
>false</
Set
>
<
Set
name
=
"maximumReceieverThreads"
>2</
Set
>
The parameters have the following meaning.
controller |
The controller to use to access the CAPI system. A controller usually corresponds to an ISDN card. If no explicit controller is specified, the first available controller will be used. |
ignoreTooBigTransferedSize |
Some systems that send data via OFTP provide incorrect information about the amount of data transferred at the end of the transfer. Therefore, by default, this is ignored. If you want to change this behaviour, you can do this by setting value false. |
maximumReceiverThreads |
Specifies the number of concurrent receive threads. If all threads are busy receiving data, no further calls will be accepted. |
traceBaseDirectory |
If the CAPI messages are to be logged, specify the directory in which the messages are to be stored. The tracing will only start in verbose mode. Since the data size of such a logging can be very large, this setting should only be used when dealing with connection problems. |
Enabling the Message-based notification
The following XML fragment activates the notification of applications via the MessageService for incoming files and other OFTP-based events.
<
Call
name
=
"enableMessageService"
>
<
Arg
>MessageService</
Arg
>
<
Arg
>System</
Arg
>
<
Arg
>oftp</
Arg
>
</
Call
>
The arguments have the following meaning.
MessageService |
The name of the MessageService to use. This is usually the name seen in the example and does not have to be changed. |
System |
The message context. |
oftp |
The message queue. |
Enabling the TCP/IP-based OFTP server
The following XML fragment enables TCP/IP-based reception.
<
Call
name
=
"enableTCPListener"
>
<
Arg
>listenaddress</
Arg
>
<
Arg
type
=
"int"
>port</
Arg
>
<
Arg
type
=
"int"
>nrThreads</
Arg
>
</
Call
>
The parameters have the following meaning.
listenaddress |
The address on which to listen for incoming requests. If this should happen on all available interfaces, use 0.0.0.0. |
nrThreads |
Number of threads that wait for incoming requests. |
Setting the MSN to use when answering calls
The following XML fragment restricts accepted incoming call to a certain MSN.
<
Call
name
=
"setLocalListenNumber"
>
<
Arg
>
<
New
class
=
"net.sourceforge.jcapi.message.parameter.CallingPartyNumber"
>
<
Set
name
=
"number"
>08154711</
Set
>
</
New
>
</
Arg
>
<
Arg
>
<
New
class
=
"net.sourceforge.jcapi.message.parameter.CallingPartySubAddress"
>
<
Set
name
=
"number"
>12</
Set
>
</
New
>
</
Arg
>
</
Call
>
This sets the number to be accepted to the 0815/4711 and the subaddress to be used to 12. If no subaddress is used, the NullClass must be set. This is done with the following XML fragment.
<
New
class
=
"com.ebd.hub.xml.NullClass"
/>
Setting the MSN to use for outgoing calls
The following XML fragment sets the MSN for outgoing calls.
<
Call
name
=
"setCallingNumber"
>
<
Arg
>
<
New
class
=
"net.sourceforge.jcapi.message.parameter.CallingPartyNumber"
>
<
Set
name
=
"number"
>08154711</
Set
>
</
New
>
</
Arg
>
</
Call
>
This number is used by the CAPI driver for outgoing calls.
General settings
(1) Selection of AuthenticationService, CommunicationLogService and MessageService. These values usually do not need to be changed.
(2) Context and queue for the messages that send OFTP events to the MessageService.
(3) If set, EFID size errors are ignored.
(4) The OftpService generates CAPI traces when the base directory is set and the service is in verbose mode. Attention: The traces can generate a lot of data on the hard disk.
ISDN receiver thread settings
(1) Number of threads that process incoming calls.
(2) Number of the used ISDN controller.
(3) The MSN to use for answering calls. See chapter Setting the MSN to Use When Answering Calls above.
(4) Timeout for waiting for the confirmation of a transmission of a B3 data block.
(5) The MSN to use when sending calls. See chapter Setting the MSN to Use for Outgoing Calls above.
(6) The subaddress of the MSN to use for answering calls. See chapter Setting the MSN to Use When Answering Calls above.
TCP receiver thread settings
(1) Number of threads that process incoming requests.
(2) The IP address and port on which the service registers as a listener.
TLS receiver thread settings
(1) Number of threads that process incoming requests.
(2) The IP address and port on which the service registers as a listener.