Class SapALEIDocConnectorV3
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- com.ibm.di.connector.sapr3.aleidocv3.SapALEIDocConnectorV3
-
- All Implemented Interfaces:
ConnectorInterface
,VersionInfoInterface
public class SapALEIDocConnectorV3 extends Connector implements ConnectorInterface
The SAP R/3 and ERP ALE IDoc Server Connector.
The connector enables external applications, using TDI, to access SAP Intermediate Documents (IDocs) sent from an SAP R/3 or ERP client system. It supports the following TDI Connector Modes: Iterator The connector supports design time schema query via
querySchema(java.lang.Object)
. When parsing is enabled the input attribute mapping must be created manually based on the IDoc message type being processed.The configuration parameters of the connector are described below. IDoc Server SAP Gateway Host
The SAP Gateway host name or IP address for the R/3 RFC connection.
IDoc Server SAP Gateway Service
The SAP Gateway service name for R/3 RFC connection. Standard naming convention is the string "sapgw" appended with the SAP System Number. i.e. A SAP System with System number "00" would normally have a gateway service of "sapgw00".
IDoc Server Program ID
The SAP JCo Server external program identifier. This is used when configuring the SAP RFC destination to be used by logical system that will represent the TDI IDco Server Connector in SAL ALE distrbution models.
IDoc Server Program ID
The SAP JCo Server external program identifier. This is used when configuring the SAP RFC destination to be used by logical system that will represent the TDI IDco Server Connector in SAL ALE distrbution models.
IDoc Server Unicode Connection?
The SAP JCo Server needs this set when the client SAP R/3 or ERP system requires a unicode RFC connection.
IDoc Server Optional Connection Parameters
The SAP JCo Server optional RFC connection parameters. Delimite with space char. i.e. "jco.server.trace=1 jco.server.sysnr=00"
IDoc Server Poll Time
The Connector waits for incoming IDoc requests to be created on an internal Inbound IDoc queue. This is the period of time between checks on the queue for new Inbound IDoc requests. This time is also used in the TID Management processing when waiting for a particular transaction to be confirmed by the SAP Client and the connectors Iterator mode functionality.
IDoc Client Number
The SAP JCo Client RFC connection parameter that identifies the SAP System client identifier from which IDoc requests are made on the Connector.
IDoc Client User
The SAP JCo Client RFC connection parameter that identifies the SAP User Account used to authenticate the RFC connection.
IDoc Client Password
The SAP JCo Client RFC connection parameter that identifies the SAP User Account's password used to authenticate the RFC connection.
IDoc Client Lang
The SAP JCo Client RFC connection parameter that identifies the RFC connection logon language.
IDoc Client Hostname
The SAP JCo Client RFC connection parameter that identifies the client SAP R/3 or ERP system's hostname or IP address.
IDoc Client System Number
The SAP JCo Client RFC connection parameter that identifies the client SAP R/3 or ERP system number.
IDoc Client SAP Gateway Servicer
The SAP JCo Client RFC connection parameter that identifies the SAP Gateway service name for R/3 RFC connection. Standard naming convention is the string "sapgw" appended with the SAP System Number. i.e. A SAP System with System number "00" would normally have a gateway service of "sapgw00".
IDoc Client SAP Gateway Host
The SAP JCo Client RFC connection parameter that identifies the SAP Gateway host name or IP address for R/3 RFC connection.
IDoc Client Max Connections
The maximum allowed SAP JCo Client RFC connections in the internal JCo Client Connection pool.
IDoc Client Optional Connection Parameters
The SAP JCo Server optional RFC connection parameters. Delimite with space char. i.e. "jco.client.trace=1 jco.client.use_sapgui=1" pool.
IDoc As XML Only?
If set then only one attribute will be provided to represent the IDoc. This attribute's value is an XML representation of the IDoc. pool.
Process SAP RFM Requests?
If set then any Remote Function Module calls made on the JCo Server will be handled. The result is an attribute in the TDI entry who's value is an XML represenation of the RFM invoked. pool.
Parse IDoc or RFM XML?
If set then any if the attributes representing the IDoc or RFM call as XML are available, then they will be parsed with the appropriate TDI XML parser attached. The only parser options are the DOM, SAX and XSLT TDI parsers.
Enable JCo Middleware Trace Logging?
If set then the JCo trace listener will be instantiated and attached to the JCo IDoc Server. The trace messages and their level will be contained within the TDI trace mechanism.
JCo Middleware Trace Level
Sets the minimum JCo trace level allowed to be captured by the TDI trace mechanism.
JCo Middleware Trace File Path
Sets the path where the JCo trace files will be dumped.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTR_ARCKEY
static java.lang.String
ATTR_CHILD_SEG_PREFIX
static java.lang.String
ATTR_CIMTYP
static java.lang.String
ATTR_CREDAT
static java.lang.String
ATTR_CRETIM
static java.lang.String
ATTR_DESC_SEG_PREFIX
static java.lang.String
ATTR_DIRECT
static java.lang.String
ATTR_DOCNUM
static java.lang.String
ATTR_DOCREL
static java.lang.String
ATTR_DOCTYP
static java.lang.String
ATTR_EXPRSS
static java.lang.String
ATTR_IDOC_AS_XML
static java.lang.String
ATTR_IDOC_TID
static java.lang.String
ATTR_IDOCTYP
static java.lang.String
ATTR_LENGTH_STRING
static java.lang.String
ATTR_MANDT
static java.lang.String
ATTR_MESCOD
static java.lang.String
ATTR_MESFCT
static java.lang.String
ATTR_MESTYP
static java.lang.String
ATTR_OUTMOD
static java.lang.String
ATTR_RCVLAD
static java.lang.String
ATTR_RCVPFC
static java.lang.String
ATTR_RCVPOR
static java.lang.String
ATTR_RCVPRN
static java.lang.String
ATTR_RCVPRT
static java.lang.String
ATTR_RCVSAD
static java.lang.String
ATTR_REFGRP
static java.lang.String
ATTR_REFINT
static java.lang.String
ATTR_REFMES
static java.lang.String
ATTR_RFM_AS_XML
static java.lang.String
ATTR_SCHEMA_LENGTH
static java.lang.String
ATTR_SCHEMA_NAME
static java.lang.String
ATTR_SCHEMA_SYNTAX
static java.lang.String
ATTR_SERIAL
static java.lang.String
ATTR_SNDLAD
static java.lang.String
ATTR_SNDPFC
static java.lang.String
ATTR_SNDPOR
static java.lang.String
ATTR_SNDPRN
static java.lang.String
ATTR_SNDPRT
static java.lang.String
ATTR_SNDSAD
static java.lang.String
ATTR_STATUS
static java.lang.String
ATTR_STD
static java.lang.String
ATTR_STDMES
static java.lang.String
ATTR_STDVRS
static java.lang.String
ATTR_SYNTAX_STRING
static java.lang.String
ATTR_TABNAM
static java.lang.String
ATTR_TEST
static java.lang.String
CONFIG_PARAM_IDOC_XMLONLY
static java.lang.String
CONFIG_PARAM_PARSE_IDOC_XML
static java.lang.String
CONFIG_PARAM_QUEUE_POLE_TIME
static java.lang.String
CONFIG_PARAM_RFM_XML
java.lang.String
destinationName
static java.lang.String
JCO_TRACE_PATH
static java.lang.String
LINE_SEP
boolean
mDebugEnabled
static java.lang.String
NO
static java.lang.String
OFF
static java.lang.String
ON
protected com.sap.conn.idoc.IDocRepository
sapALEIDocRepos
protected SapIDocServerImplV3
sapALEIDocServer
protected SapIDocServerListenerV3
sapALEIdocSrvrListener
protected com.sap.conn.jco.JCoRepository
sapALEIRepos
protected java.util.Properties
serverConnProps
static java.lang.String
UNKNOWN_TID
static java.lang.String
YES
-
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
-
-
Constructor Summary
Constructors Constructor Description SapALEIDocConnectorV3()
Default constucter for SapALEIDocConnector object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDestinationName()
java.lang.String
getJcoServerProgId()
ConnectorInterface
getNextClient()
This method is to called for Server modes.Entry
getNextEntry()
Returns a TDI entry that represents either an SAP client IDoc or RFM request.SapIDocServerListenerV3
getSapALEIdocApp()
com.sap.conn.idoc.IDocRepository
getSapALEIDocRepos()
SapIDocServerImplV3
getSapALEIDocServer()
com.sap.conn.jco.JCoRepository
getSapALEIRepos()
java.util.Properties
getServerConnProps()
java.util.Map
getTidIDocMap()
java.lang.String
getVersion()
Returns the version of the connector based on source repository variables.void
initialize(java.lang.Object o)
This method is called once after the connector configuration file has been provided by the caller.boolean
isConnParamValueValid(java.lang.String key, boolean mandatory)
Checks if a Connector configuration parameter is valid for use.java.lang.Object
querySchema(java.lang.Object o)
This method is to populate the available connector variables for input and output mapping into AL work entry attributes.void
reconnect()
This method is to called for all modes.void
replyEntry(Entry requestResult)
This method is to called for Server modes.void
selectEntries()
This method is to called for both Iterator and Server modes.void
terminate()
This method is to called for all modes.void
terminateServer()
This method is to called for all modes.-
Methods inherited from class com.ibm.di.connector.Connector
addFindEntry, allModes, clearFindEntries, debug, debugMode, deleteEntry, extractExceptionInformation, findEntry, findEntry, getBoolean, getClassInstance, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getLog, getMaxDuplicateEntries, getModes, getModes, getName, getNextFindEntry, getParam, getParser, getProperty, getPushbackEntry, getRawConnectorConfiguration, getRSInterface, getUI, hasConfigValue, hasParser, initParser, isDeltaSupported, isExceptionFatal, isIOException, logError, logmsg, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, queryTables, reconnect, registerScriptBeans, setConfiguration, setContext, setCurrent, setDebugMode, setLog, setMaxDuplicateEntries, setModes, setModes, setName, setParam, setParser, setProperty, setRSInterface
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.di.connector.ConnectorInterface
deleteEntry, findEntry, getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isDeltaSupported, isExceptionFatal, isIOException, modEntry, modEntry, pushback, putEntry, queryOperations, queryReply, reconnect, registerScriptBeans, setConfiguration, setContext, setCurrent, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface
-
-
-
-
Field Detail
-
LINE_SEP
public static final java.lang.String LINE_SEP
-
UNKNOWN_TID
public static final java.lang.String UNKNOWN_TID
- See Also:
- Constant Field Values
-
ATTR_SCHEMA_NAME
public static final java.lang.String ATTR_SCHEMA_NAME
- See Also:
- Constant Field Values
-
ATTR_SCHEMA_SYNTAX
public static final java.lang.String ATTR_SCHEMA_SYNTAX
- See Also:
- Constant Field Values
-
ATTR_SYNTAX_STRING
public static final java.lang.String ATTR_SYNTAX_STRING
- See Also:
- Constant Field Values
-
ATTR_SCHEMA_LENGTH
public static final java.lang.String ATTR_SCHEMA_LENGTH
- See Also:
- Constant Field Values
-
ATTR_LENGTH_STRING
public static final java.lang.String ATTR_LENGTH_STRING
- See Also:
- Constant Field Values
-
ATTR_IDOC_TID
public static final java.lang.String ATTR_IDOC_TID
- See Also:
- Constant Field Values
-
ATTR_IDOC_AS_XML
public static final java.lang.String ATTR_IDOC_AS_XML
- See Also:
- Constant Field Values
-
ATTR_ARCKEY
public static final java.lang.String ATTR_ARCKEY
- See Also:
- Constant Field Values
-
ATTR_MANDT
public static final java.lang.String ATTR_MANDT
- See Also:
- Constant Field Values
-
ATTR_CREDAT
public static final java.lang.String ATTR_CREDAT
- See Also:
- Constant Field Values
-
ATTR_CRETIM
public static final java.lang.String ATTR_CRETIM
- See Also:
- Constant Field Values
-
ATTR_DIRECT
public static final java.lang.String ATTR_DIRECT
- See Also:
- Constant Field Values
-
ATTR_REFMES
public static final java.lang.String ATTR_REFMES
- See Also:
- Constant Field Values
-
ATTR_REFGRP
public static final java.lang.String ATTR_REFGRP
- See Also:
- Constant Field Values
-
ATTR_STDMES
public static final java.lang.String ATTR_STDMES
- See Also:
- Constant Field Values
-
ATTR_STD
public static final java.lang.String ATTR_STD
- See Also:
- Constant Field Values
-
ATTR_STDVRS
public static final java.lang.String ATTR_STDVRS
- See Also:
- Constant Field Values
-
ATTR_REFINT
public static final java.lang.String ATTR_REFINT
- See Also:
- Constant Field Values
-
ATTR_EXPRSS
public static final java.lang.String ATTR_EXPRSS
- See Also:
- Constant Field Values
-
ATTR_DOCTYP
public static final java.lang.String ATTR_DOCTYP
- See Also:
- Constant Field Values
-
ATTR_DOCNUM
public static final java.lang.String ATTR_DOCNUM
- See Also:
- Constant Field Values
-
ATTR_DOCREL
public static final java.lang.String ATTR_DOCREL
- See Also:
- Constant Field Values
-
ATTR_IDOCTYP
public static final java.lang.String ATTR_IDOCTYP
- See Also:
- Constant Field Values
-
ATTR_CIMTYP
public static final java.lang.String ATTR_CIMTYP
- See Also:
- Constant Field Values
-
ATTR_MESCOD
public static final java.lang.String ATTR_MESCOD
- See Also:
- Constant Field Values
-
ATTR_MESFCT
public static final java.lang.String ATTR_MESFCT
- See Also:
- Constant Field Values
-
ATTR_MESTYP
public static final java.lang.String ATTR_MESTYP
- See Also:
- Constant Field Values
-
ATTR_OUTMOD
public static final java.lang.String ATTR_OUTMOD
- See Also:
- Constant Field Values
-
ATTR_RCVSAD
public static final java.lang.String ATTR_RCVSAD
- See Also:
- Constant Field Values
-
ATTR_RCVLAD
public static final java.lang.String ATTR_RCVLAD
- See Also:
- Constant Field Values
-
ATTR_RCVPFC
public static final java.lang.String ATTR_RCVPFC
- See Also:
- Constant Field Values
-
ATTR_RCVPRN
public static final java.lang.String ATTR_RCVPRN
- See Also:
- Constant Field Values
-
ATTR_RCVPRT
public static final java.lang.String ATTR_RCVPRT
- See Also:
- Constant Field Values
-
ATTR_RCVPOR
public static final java.lang.String ATTR_RCVPOR
- See Also:
- Constant Field Values
-
ATTR_SNDSAD
public static final java.lang.String ATTR_SNDSAD
- See Also:
- Constant Field Values
-
ATTR_SNDLAD
public static final java.lang.String ATTR_SNDLAD
- See Also:
- Constant Field Values
-
ATTR_SNDPFC
public static final java.lang.String ATTR_SNDPFC
- See Also:
- Constant Field Values
-
ATTR_SNDPRN
public static final java.lang.String ATTR_SNDPRN
- See Also:
- Constant Field Values
-
ATTR_SNDPRT
public static final java.lang.String ATTR_SNDPRT
- See Also:
- Constant Field Values
-
ATTR_SNDPOR
public static final java.lang.String ATTR_SNDPOR
- See Also:
- Constant Field Values
-
ATTR_SERIAL
public static final java.lang.String ATTR_SERIAL
- See Also:
- Constant Field Values
-
ATTR_TABNAM
public static final java.lang.String ATTR_TABNAM
- See Also:
- Constant Field Values
-
ATTR_STATUS
public static final java.lang.String ATTR_STATUS
- See Also:
- Constant Field Values
-
ATTR_TEST
public static final java.lang.String ATTR_TEST
- See Also:
- Constant Field Values
-
ATTR_RFM_AS_XML
public static final java.lang.String ATTR_RFM_AS_XML
- See Also:
- Constant Field Values
-
ATTR_CHILD_SEG_PREFIX
public static final java.lang.String ATTR_CHILD_SEG_PREFIX
- See Also:
- Constant Field Values
-
ATTR_DESC_SEG_PREFIX
public static final java.lang.String ATTR_DESC_SEG_PREFIX
- See Also:
- Constant Field Values
-
CONFIG_PARAM_QUEUE_POLE_TIME
public static final java.lang.String CONFIG_PARAM_QUEUE_POLE_TIME
- See Also:
- Constant Field Values
-
CONFIG_PARAM_IDOC_XMLONLY
public static final java.lang.String CONFIG_PARAM_IDOC_XMLONLY
- See Also:
- Constant Field Values
-
CONFIG_PARAM_RFM_XML
public static final java.lang.String CONFIG_PARAM_RFM_XML
- See Also:
- Constant Field Values
-
CONFIG_PARAM_PARSE_IDOC_XML
public static final java.lang.String CONFIG_PARAM_PARSE_IDOC_XML
- See Also:
- Constant Field Values
-
JCO_TRACE_PATH
public static final java.lang.String JCO_TRACE_PATH
- See Also:
- Constant Field Values
-
YES
public static final java.lang.String YES
- See Also:
- Constant Field Values
-
NO
public static final java.lang.String NO
- See Also:
- Constant Field Values
-
ON
public static final java.lang.String ON
- See Also:
- Constant Field Values
-
OFF
public static final java.lang.String OFF
- See Also:
- Constant Field Values
-
sapALEIdocSrvrListener
protected SapIDocServerListenerV3 sapALEIdocSrvrListener
-
serverConnProps
protected java.util.Properties serverConnProps
-
sapALEIRepos
protected com.sap.conn.jco.JCoRepository sapALEIRepos
-
sapALEIDocRepos
protected com.sap.conn.idoc.IDocRepository sapALEIDocRepos
-
sapALEIDocServer
protected SapIDocServerImplV3 sapALEIDocServer
-
destinationName
public java.lang.String destinationName
-
mDebugEnabled
public boolean mDebugEnabled
-
-
Method Detail
-
getVersion
public java.lang.String getVersion()
Returns the version of the connector based on source repository variables.- Specified by:
getVersion
in interfaceVersionInfoInterface
- Returns:
- A String format for the version of this released Connector.
-
initialize
public void initialize(java.lang.Object o) throws SapALEIDocConnectorException
This method is called once after the connector configuration file has been provided by the caller.- Specified by:
initialize
in interfaceConnectorInterface
- Overrides:
initialize
in classConnector
- Parameters:
o
- TDI config object. Not used.- Throws:
SapALEIDocConnectorException
- When an error happens during class initialization.
-
isConnParamValueValid
public boolean isConnParamValueValid(java.lang.String key, boolean mandatory)
Checks if a Connector configuration parameter is valid for use.- Parameters:
key
- - The key for the Connector configuration parameter being checked.mandatory
- - flag indicating if the Connector configuration parameter is obligatory.- Returns:
- boolean result on the validity of the Connector configuration parameter.
-
getNextEntry
public Entry getNextEntry() throws SapALEIDocConnectorException
Returns a TDI entry that represents either an SAP client IDoc or RFM request. The entries are pulled from TIDManager objects sitting in the Inbound IDoc queue.- Specified by:
getNextEntry
in interfaceConnectorInterface
- Overrides:
getNextEntry
in classConnector
- Returns:
- TDI entry or null.
- Throws:
SapALEIDocConnectorException
- When an error occurs.- See Also:
ConnectorInterface.selectEntries()
-
querySchema
public java.lang.Object querySchema(java.lang.Object o) throws SapALEIDocConnectorException
This method is to populate the available connector variables for input and output mapping into AL work entry attributes.- Specified by:
querySchema
in interfaceConnectorInterface
- Overrides:
querySchema
in classConnector
- Parameters:
o
- TDI schema object. Not used.- Returns:
- A Vector of com.ibm.di.entry.Entry objects describing each entity
- Throws:
SapALEIDocConnectorException
- When an error occurs.- See Also:
Entry
,Vector
-
selectEntries
public void selectEntries() throws SapALEIDocConnectorException
This method is to called for both Iterator and Server modes. Normally this method would block until there was an IDoc to process. This connector has a non-standard iterator mode where getNextEntry() will block and not return null to mimick an asynchronous Server mode.- Specified by:
selectEntries
in interfaceConnectorInterface
- Overrides:
selectEntries
in classConnector
- Throws:
SapALEIDocConnectorException
- When an error occurs.
-
getNextClient
public ConnectorInterface getNextClient() throws SapALEIDocConnectorException
This method is to called for Server modes. This method blocks until there is an IDoc to process. If the IDoc Server can't be started then this method will return null.- Specified by:
getNextClient
in interfaceConnectorInterface
- Overrides:
getNextClient
in classConnector
- Returns:
- An instance of this connector for a seperate thread in the AL.
- Throws:
SapALEIDocConnectorException
- When an error occurs.
-
replyEntry
public void replyEntry(Entry requestResult)
This method is to called for Server modes. This method would normally be used to build and send a response to the client. As the IDoc communication is asynchronous this method does nothing for this release of the Connector.- Specified by:
replyEntry
in interfaceConnectorInterface
- Overrides:
replyEntry
in classConnector
- Parameters:
requestResult
- the information as an Entry
-
terminateServer
public void terminateServer()
This method is to called for all modes. This method is used to stop the IDoc Server.- Specified by:
terminateServer
in interfaceConnectorInterface
- Overrides:
terminateServer
in classConnector
-
terminate
public void terminate() throws SapALEIDocConnectorException
This method is to called for all modes. This method is used to stop the IDoc Server. Stopping the IDoc Server affects the TID management cycle so this method does nothing for this release of the Connector.- Specified by:
terminate
in interfaceConnectorInterface
- Overrides:
terminate
in classConnector
- Throws:
SapALEIDocConnectorException
-
reconnect
public void reconnect() throws SapALEIDocConnectorException
This method is to called for all modes. This method is used to stop and start the IDoc Server. If the IDoc server is stopped it can't be restarted so this method suspends then restarts the IDoc Server.- Overrides:
reconnect
in classConnector
- Throws:
SapALEIDocConnectorException
- See Also:
Connector.initialize(Object)
-
getSapALEIdocApp
public SapIDocServerListenerV3 getSapALEIdocApp()
- Returns:
- Returns the IDoc Server listener object.
-
getSapALEIDocRepos
public com.sap.conn.idoc.IDocRepository getSapALEIDocRepos()
- Returns:
-
getSapALEIDocServer
public SapIDocServerImplV3 getSapALEIDocServer()
- Returns:
- Returns the IDoc Server object
-
getSapALEIRepos
public com.sap.conn.jco.JCoRepository getSapALEIRepos()
- Returns:
- Returns the IDoc Server JCo repository object.
-
getServerConnProps
public java.util.Properties getServerConnProps()
- Returns:
- Returns the IDoc Server RFC Connection properties.
-
getTidIDocMap
public java.util.Map getTidIDocMap()
- Returns:
- Returns the IDoc Server Inbound IDoc request queue.
-
getJcoServerProgId
public java.lang.String getJcoServerProgId()
- Returns:
- Returns the IDoc Server program ID. Required when configuring the RFC Destination on the SAP Client.
-
getDestinationName
public java.lang.String getDestinationName() throws java.io.IOException
- Returns:
- Returns a temporary java.io.File to be used to save the jcoServer properties and which is deleted on exit.
- Throws:
java.io.IOException
-
-