WSO2 SAP adapter can be used with IDoc, which is a synchronous interface used when exchanging data with the SAP system. WSO2 ESB can be configured for Sending IDocs or Receiving IDocs when using the SAP adapter. Sending IDocsFollow the instructions below to configure WSO2 ESB as an IDoc client using the SAP adapter. Uncomment the following line in <ESB_HOME>/repository/conf/axis2/axis2.xml file to enable the IDoc transport sender on axis2 core. Code Block |
---|
| <transportSender name=”idoc” class="org.wso2.carbon.transports.sap.SAPTransportSender"/> |
Create IDocSender proxy service with the following configuration: Code Block |
---|
| <proxy xmlns=http://ws.apache.org/ns/synapse
name="IDocSender"
transports="http"
startOnLoad="true"
trace="enable"
statistics="enable">
<target>
<inSequence>
<log level="full"/>
<send>
<endpoint name="sapidocendpoint">
<address uri="idoc:/SAPSYS"/>
</endpoint>
</send>
</inSequence>
<outSequence/>
</target>
<parameter name="serviceType">proxy</parameter>
<description/>
</proxy> |
Info |
---|
- The SAP endpoint client properties file
SAPSYS.dest should be in <ESB_HOME>/repository/conf/sap folder. - Additional axis2 level sender parameters that can be defined in the axis2 core are listed in SAP Transport Sender Parameters.
|
You can now send IDocs using the configured WSO2 SAP adapter.
Anchor |
---|
| ReceivingIDocs |
---|
| ReceivingIDocs |
---|
|
Receiving IDocsFollow the instructions below to configure WSO2 ESB as an IDoc server using the SAP adapter. Uncomment the following line in <ESB_HOME>/repository/conf/axis2/axis2.xml file to enable IDoc transport receiver in axis2 core. Code Block |
---|
| <transportReceiver name=”idoc” class="org.wso2.carbon.transports.sap.SAPTransportListener"/> |
- Ensure the server configuration file
SAPSYS.server is available in <ESB_HOME>/repository/conf/sap folder.
Start the ESB using the -Djava.library.path switch to specify the location of your SAP jco library. For example sh wso2server.sh -Djava.library.path=/usr/lib/jvm/jre1.7.0/lib/i386/server/ Create the IDocReceiver proxy service with the following configuration: Code Block |
---|
| <proxy xmlns=http://ws.apache.org/ns/synapse
name="IDocReceiver"
transports="idoc"
statistics="enable"
trace="enable"
startOnLoad="true">
<target>
<inSequence>
<log level="full"/>
<drop/>
</inSequence>
<outSequence>
<log level="full"/>
<send/>
</outSequence>
</target>
<parameter name="transport.sap.enableTIDHandler">enabled</parameter>
<parameter name="transport.sap.serverName">SAPSYS</parameter>
<description/>
</proxy> |
Info |
---|
- The SAP endpoint server properties file
SAPSYS.server should be in <ESB_HOME>/repository/conf/sap folder. - Additional proxy level listener parameters that can be defined in the proxy configuration are listed in Proxy Service Listener Parameters.
|
Once the proxy service configuration is saved, WSO2 SAP adapter is now ready to receive IDoc messsages.
|