TCP

In this section:

Reference:

Today, the Internet and World Wide Web (WWW) are familiar terms to millions of people all over the world. Many people depend on applications enabled by the Internet, such as electronic mail and Web access. In addition, the increased popularity of business applications places additional emphasis on the Internet.

The Transmission Control Protocol/Internet Protocol (TCP/IP) protocol suite is the engine for the Internet and networks worldwide. Its simplicity and power makes it the single network protocol of choice in the world today.

This topic provides an overview of the TCP/IP protocol suite. Another name for it is the Internet Protocol Suite, which is the phrase used in the official Internet standards documents. iWay Software uses the more common acronym, TCP/IP, to refer to the entire protocol suite.

The main goal of TCP/IP was to build an interconnection of networks, referred to as an internetwork, or internet, that provided universal communication services over the internet.

The iWay Adapter for TCP provides bidirectional capability to and from TCP/IP destinations. It enables the iWay Protocol Adapter to receive messages on a TCP/IP port and route those messages back to a client or to another non-TCP destination. Similarly, messages received through the other iWay Service Manager listeners can be directed to a TCP/IP port. During the message flow, iWay Service Manager can apply standard document analysis, validation, transformation, and business logic capabilities to the document.


Top of page

x
Reference: TCP Listener Properties

The following table lists and describes the TCP listener properties. For instructions on creating a listener, see Configuring Listeners.

Property Name

Property Description

Port (required)

Socket number on which iWay Service Manager listens for incoming messages from a client application. The iWay Service Manager configuration tool requires that the port be numeric.

Local bind address

Local bind address for multi-homed hosts; usually leave this value empty.

Allowable Client

If set, accepts messages only from this HOSTNAME or IP address.

Timeout

Timeout interval for the TCP socket.

Stream Length Encoded

The protocol needs to be able to recognize a complete message. Several methods are provided:

  • None (XML encoded). Looks for the end of the XML document.
  • 4 byte MSB. An integer precedes the message.
  • 2 byte LSB. An integer in LSB form precedes the message. This is often used for messages from mainframes.
  • 6 byte ASCII. Character encoded length precedes the message.
  • Non-XML. Complete message to socket close.

Persistent connection

If true, the connection is maintained until the client closes.

Note: If you use this option, length encoding must be enabled.

Whitespace Normalization

Specifies how the parser treats whitespace in Element content. Choose preserve to turn off all normalization as prescribed by the XML Specification.Choose condense to remove extra whitespace in pretty printed documents and for compatibility with earlier versions.

Accepts non-XML (flat) only

If true, the input data is sent directly to the business logic step. The data is not preparsed, parsed, or validated. This flag is used primarily to send non-XML to the business logic or replyTo without processing it.

Optimize Favoring

Use this option to customize how the listener performs. For smaller transactions, select performance. For large input documents that could monopolize the amount of memory used by iWay Service Manager, select memory.

Multithreading

Indicates the number of worker threads (documents or requests) that iWay Service Manager can handle in parallel. Setting this to a value of greater than 1 enables the listener to handle a second request while an earlier request is still being processed. The total throughput of a system can be affected by the number of threads operating. Increasing the number of parallel operations may not necessarily improve throughput.

Default: 1

Max Value: 99

Maximum Threads

Parallel threads can grow to this count automatically on demand. Over time, the worker count will decrease back to the multithreading level. Use this parameter to respond to bursts of activity.

Execution Time Limit

Maximum time that a request may take to complete. Used to prevent runaway requests. Any request that takes longer to complete than this value will be attempted to be terminated. (See the "kill interval" for related information in Global Options.)

Default Java File Encoding

Default encoding if incoming message is not self-declaring (that is, XML).

Agent Precedence

Sets the order by which iWay Service Manager selects agents. iWay Service Manager selects the agent or agents to process the document by searching through the configuration dictionary. Usually, it looks for a document entry in the configuration and when a match is found, the agent specified in that document entry is selected. If a matching document entry is not found, or no agent is specified, the engine looks in the input protocol configuration (listener). To have the processing agent taken directly from the listener (thus ignoring the document entry), use <listener> overrides <document>.

Possible values are <document> overrides <listener> and <listener> overrides <document>.

The default value is: <document> overrides <listener>

Always reply to listener default

If true, the default reply definition is used in addition to define reply-to and error-to destinations.

Error Documents treated normally

If true, error documents are processed by any configured preemitters.

Listener is Transaction Manager

If true, agents run in a local transaction. Agents can roll back uncompleted transactions.

Record in Activity Log(s)

If set, activity on this channel will be recorded in the activity logs, else the activity will not be recorded.



x
Reference: TCP Listener Special Registers

The following table lists and describes the special registers (SREGs) available on the TCP listener.

Name

Level

Type

Description

ip

Document

String

IP address of the sender.

iwayconfig

System

String

Current active configuration name.

msgsize

Document

Integer

Physical length of the message payload.

name

System

String

Assigned name of the master (listener).

protocol

System

String

Protocol on which message was received.

source

Document

String

Originator of the message. Same as IP.



x
Configuring a TCP Emitter

Messages are sent to particular destinations at the completion of a workflow. The state of the document determines which destination is used. The order in which they are used cannot be predicted.

Note: Configuring a TCP emitter is not required if the emitter protocol is the same as the listener protocol.

To route an output document or error message to a protocol other than that of the outlet (listener), you must configure an emitter. For example, an application may send input over FTP but want to route the output to a TCP listener.



x
TCP Emitter Properties

The following table lists and describes the TCP emitter properties. For instructions on creating an emitter, see Configuring Emitters.

Property Name

Property Description

Destination (required)

TCP host and port.

Stream Length Encoded

Form of length encoding for the TCP stream. Values include:

  • None (XML encoded). Looks for the end of the XML document.
  • 4 byte MSB. An integer precedes the message.
  • 2 byte LSB. An integer in LSB form precedes the message. This is often used for messages from mainframes.
  • 6 byte ASCII. Character encoded length precedes the message.
  • Non-XML. Complete message to socket close.

iWay Software