Class SapALEIDocConnector
- java.lang.Object
-
- com.ibm.di.connector.Connector
-
- com.ibm.di.connector.sapr3.aleidoc.SapALEIDocConnector
-
- All Implemented Interfaces:
ConnectorInterface,VersionInfoInterface
public class SapALEIDocConnector 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.StringATTR_ARCKEYstatic java.lang.StringATTR_CHILD_SEG_PREFIXstatic java.lang.StringATTR_CIMTYPstatic java.lang.StringATTR_CREDATstatic java.lang.StringATTR_CRETIMstatic java.lang.StringATTR_DESC_SEG_PREFIXstatic java.lang.StringATTR_DIRECTstatic java.lang.StringATTR_DOCNUMstatic java.lang.StringATTR_DOCRELstatic java.lang.StringATTR_DOCTYPstatic java.lang.StringATTR_EXPRSSstatic java.lang.StringATTR_IDOC_AS_XMLstatic java.lang.StringATTR_IDOC_TIDstatic java.lang.StringATTR_IDOCTYPstatic java.lang.StringATTR_LENGTH_STRINGstatic java.lang.StringATTR_MANDTstatic java.lang.StringATTR_MESCODstatic java.lang.StringATTR_MESFCTstatic java.lang.StringATTR_MESTYPstatic java.lang.StringATTR_OUTMODstatic java.lang.StringATTR_RCVLADstatic java.lang.StringATTR_RCVPFCstatic java.lang.StringATTR_RCVPORstatic java.lang.StringATTR_RCVPRNstatic java.lang.StringATTR_RCVPRTstatic java.lang.StringATTR_RCVSADstatic java.lang.StringATTR_REFGRPstatic java.lang.StringATTR_REFINTstatic java.lang.StringATTR_REFMESstatic java.lang.StringATTR_RFM_AS_XMLstatic java.lang.StringATTR_SCHEMA_LENGTHstatic java.lang.StringATTR_SCHEMA_NAMEstatic java.lang.StringATTR_SCHEMA_SYNTAXstatic java.lang.StringATTR_SERIALstatic java.lang.StringATTR_SNDLADstatic java.lang.StringATTR_SNDPFCstatic java.lang.StringATTR_SNDPORstatic java.lang.StringATTR_SNDPRNstatic java.lang.StringATTR_SNDPRTstatic java.lang.StringATTR_SNDSADstatic java.lang.StringATTR_STATUSstatic java.lang.StringATTR_STDstatic java.lang.StringATTR_STDMESstatic java.lang.StringATTR_STDVRSstatic java.lang.StringATTR_SYNTAX_STRINGstatic java.lang.StringATTR_TABNAMstatic java.lang.StringATTR_TESTprotected java.util.PropertiesclientConnPropsstatic java.lang.StringCONFIG_PARAM_IDOC_XMLONLYstatic java.lang.StringCONFIG_PARAM_PARSE_IDOC_XMLstatic java.lang.StringCONFIG_PARAM_QUEUE_POLE_TIMEstatic java.lang.StringCONFIG_PARAM_RFM_XMLstatic java.lang.StringJCO_TRACE_PATHstatic java.lang.StringLINE_SEPbooleanmDebugEnabledstatic java.lang.StringNOstatic java.lang.StringOFFstatic java.lang.StringONprotected com.sap.mw.idoc.IDoc.RepositorysapALEIDocReposprotected SapIDocServerImplsapALEIDocServerprotected SapIDocServerListenersapALEIdocSrvrListenerprotected com.sap.mw.jco.IRepositorysapALEIReposprotected java.util.PropertiesserverConnPropsstatic java.lang.StringUNKNOWN_TIDstatic java.lang.StringYES-
Fields inherited from class com.ibm.di.connector.Connector
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER
-
-
Constructor Summary
Constructors Constructor Description SapALEIDocConnector()Default constucter for SapALEIDocConnector object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetJcoServerProgId()ConnectorInterfacegetNextClient()This method is to called for Server modes.EntrygetNextEntry()Returns a TDI entry that represents either an SAP client IDoc or RFM request.SapIDocServerListenergetSapALEIdocApp()com.sap.mw.idoc.IDoc.RepositorygetSapALEIDocRepos()SapIDocServerImplgetSapALEIDocServer()com.sap.mw.jco.IRepositorygetSapALEIRepos()java.util.PropertiesgetServerConnProps()java.util.MapgetTidIDocMap()java.lang.StringgetVersion()Returns the version of the connector based on source repository variables.voidinitialize(java.lang.Object o)This method is called once after the connector configuration file has been provided by the caller.booleanisConnParamValueValid(java.lang.String key, boolean mandatory)Checks if a Connector configuration parameter is valid for use.java.lang.ObjectquerySchema(java.lang.Object o)This method is to populate the available connector variables for input and output mapping into AL work entry attributes.voidreconnect()This method is to called for all modes.voidreplyEntry(Entry requestResult)This method is to called for Server modes.voidselectEntries()This method is to called for both Iterator and Server modes.voidterminate()This method is to called for all modes.voidterminateServer()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 SapIDocServerListener sapALEIdocSrvrListener
-
serverConnProps
protected java.util.Properties serverConnProps
-
clientConnProps
protected java.util.Properties clientConnProps
-
sapALEIRepos
protected com.sap.mw.jco.IRepository sapALEIRepos
-
sapALEIDocRepos
protected com.sap.mw.idoc.IDoc.Repository sapALEIDocRepos
-
sapALEIDocServer
protected SapIDocServerImpl sapALEIDocServer
-
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:
getVersionin interfaceVersionInfoInterface- Returns:
- A String format for the version of this released Connector.
-
initialize
public void initialize(java.lang.Object o) throws SapALEIDocConnectorExceptionThis method is called once after the connector configuration file has been provided by the caller.- Specified by:
initializein interfaceConnectorInterface- Overrides:
initializein 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:
getNextEntryin interfaceConnectorInterface- Overrides:
getNextEntryin 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 SapALEIDocConnectorExceptionThis method is to populate the available connector variables for input and output mapping into AL work entry attributes.- Specified by:
querySchemain interfaceConnectorInterface- Overrides:
querySchemain 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 SapALEIDocConnectorExceptionThis 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:
selectEntriesin interfaceConnectorInterface- Overrides:
selectEntriesin 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:
getNextClientin interfaceConnectorInterface- Overrides:
getNextClientin 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:
replyEntryin interfaceConnectorInterface- Overrides:
replyEntryin 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:
terminateServerin interfaceConnectorInterface- Overrides:
terminateServerin classConnector
-
terminate
public void terminate()
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:
terminatein interfaceConnectorInterface- Overrides:
terminatein classConnector
-
reconnect
public void reconnect() throws SapALEIDocConnectorExceptionThis 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:
reconnectin classConnector- Throws:
SapALEIDocConnectorException- See Also:
Connector.initialize(Object)
-
getSapALEIdocApp
public SapIDocServerListener getSapALEIdocApp()
- Returns:
- Returns the IDoc Server listener object.
-
getSapALEIDocRepos
public com.sap.mw.idoc.IDoc.Repository getSapALEIDocRepos()
- Returns:
- Returns the IDoc Server IDoc repository object.
-
getSapALEIDocServer
public SapIDocServerImpl getSapALEIDocServer()
- Returns:
- Returns the IDoc Server object
-
getSapALEIRepos
public com.sap.mw.jco.IRepository 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.
-
-