public final class SystemAccessor extends Object
LookupService.getSystemAccessor(Channel)
.
After executing your communication calls, the accessor must be closed through the secure cleanup idiom. See the following example.
// 1. Get a system accessor for a channel.
SystemAccessor accessor = LookupService.getSystemAccessor(channel);
try{
// 2. Create a payload according to the data type.
// Use service.getBinaryPayload() for binary payload,
// or service.getTextPayload() for text payloads.
Payload payload = LookupService.getXmlPayload(inputStream);
// 3. Set the operation name and namespace; optional step, only necessary if the
// used adapter needs these parameters.
accessor.setOperationName(interfaceName);
accessor.setOperationNamespace(interfaceNS);
// 4. Execute lookup.
Payload result = accessor.call(payload);
...
// Steps 2. to 4. can be executed several times.
...
}finally{
// 5. close the accessor in order to free resources.
if (accessor!=null) accessor.close();
}
LookupService
Modifier and Type | Class and Description |
---|---|
static interface |
SystemAccessor.Internal
Internal system accessor.
|
Modifier and Type | Method and Description |
---|---|
Payload |
call(Payload payload)
Executes a lookup call.
|
void |
close()
Closes this accessor and releases any resources associated with the
accessor.
|
void |
setOperationName(String aOperationName)
Sets the operation name.
|
void |
setOperationNamespace(String aOperationNamespace)
Sets the operation namespace.
|
public void setOperationName(String aOperationName)
setOperationNamespace(String)
). The operation name is an
optional parameter for the RFC, JDBC, and SOAP adapter; it is used in the
logging of the Lookup API. Third party adapter may use this parameter.aOperationName
- operation namepublic void setOperationNamespace(String aOperationNamespace)
setOperationName(String)
). The operation namespace is an
optional parameter for the RFC, JDBC, and SOAP adapter; it is used in the
logging of the Lookup API. Third party adapter may use this parameter.aOperationNamespace
- the namespace of the operationpublic Payload call(Payload payload) throws LookupException
payload
- input payloadLookupException
- if an error occurs.NullPointerException
- if payload
is null
.public void close() throws LookupException
LookupException
- if an error occurs.Access Rights |
---|
SC | DC | Public Part | ACH |
---|---|---|---|
[sap.com] SAP_XIAF
|
[sap.com] com.sap.aii.mapping.lib.facade
|
api
|
BC-XI
|
Copyright 2019 SAP AG Complete Copyright Notice