Class RfcXmlGenerator
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.licensing.LicensedService
-
- com.adaptris.core.sap.jco3.rfc.dynamic.RfcXmlGenerator
-
- All Implemented Interfaces:
AdaptrisComponent
,ComponentLifecycle
,ComponentLifecycleExtension
,ConnectedService
,com.adaptris.core.licensing.LicensedComponent
,MessageEventGenerator
,Service
,StateManagedComponent
- Direct Known Subclasses:
BapiXmlGenerator
@ComponentProfile(summary="Helper that generates an XML input file for a SAP RFC", tag="service,sap,rfc", recommended={ConfiguredRfcConnection.class,DynamicRfcConnection.class}) public class RfcXmlGenerator extends com.adaptris.core.licensing.LicensedService implements ConnectedService
Service implementation that generates an XML input file sample for a RFC.This service determines the RFC to invoke based on the the xpath
local-name(/*)
. After querying the configured repository, it generates a sample document that contains all the elements required to execute a RFC. If you map your input file to the generated example, then it will be possible to useDynamicBapiProducer
orDynamicRfcProducer
as your producer without explicitly configuring anyExportParameter
orImportParameter
instances.- Input parameters will always be a child of the
[RFC_NAME]/INPUT
element - Output parameters will always be a child of the
[RFC_NAME]/OUTPUT
element - Table parameters will be a child of the
[RFC_NAME]/INPUT/TABLES
element and also the[RFC_NAME]/OUTPUT/TABLES
element as tables could form both a an input and output parameter; how you can have multiple rows for a table parameter should be obvious from the resulting XML. - CHANGING parameters are not currently supported.
- Every element has attribute information for mapping and informational purposes; it is redundant at runtime
In the adapter configuration file this class is aliased as sapjco3-rfc-xml-generator which is the preferred alternative to the fully qualified classname when building your configuration.
License Required: ENTERPRISE
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description RfcXmlGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeService()
void
doService(AdaptrisMessage msg)
AdaptrisConnection
getConnection()
protected void
initService()
boolean
isEnabled(com.adaptris.core.licensing.License license)
protected void
prepareService()
void
setConnection(AdaptrisConnection connection)
Set the connection used to connect to SAP.void
start()
void
stop()
-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init
-
Methods inherited from interface com.adaptris.core.ComponentLifecycleExtension
prepare
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, isBranching, setUniqueId
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Method Detail
-
prepareService
protected void prepareService() throws CoreException
- Specified by:
prepareService
in classcom.adaptris.core.licensing.LicensedService
- Throws:
CoreException
-
isEnabled
public boolean isEnabled(com.adaptris.core.licensing.License license)
- Specified by:
isEnabled
in interfacecom.adaptris.core.licensing.LicensedComponent
-
initService
protected void initService() throws CoreException
- Specified by:
initService
in classServiceImp
- Throws:
CoreException
-
start
public void start() throws CoreException
- Specified by:
start
in interfaceComponentLifecycle
- Overrides:
start
in classServiceImp
- Throws:
CoreException
-
stop
public void stop()
- Specified by:
stop
in interfaceComponentLifecycle
- Overrides:
stop
in classServiceImp
-
closeService
protected void closeService()
- Specified by:
closeService
in classServiceImp
-
doService
public void doService(AdaptrisMessage msg) throws ServiceException
- Specified by:
doService
in interfaceService
- Throws:
ServiceException
-
getConnection
public AdaptrisConnection getConnection()
- Specified by:
getConnection
in interfaceConnectedService
-
setConnection
public void setConnection(AdaptrisConnection connection)
Set the connection used to connect to SAP.- Specified by:
setConnection
in interfaceConnectedService
- Parameters:
connection
- the connection, either aSharedConnection
or aConfiguredRfcConnection
-
-