public final class RfcAccessor extends Object
LookupService
.
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.
RfcAccessor accessor = LookupService.getRfcAccessor(channel);
try{
// 2. Create a xml input stream representing the function module request message.
InputStream inputStream;
...
// 3. Create xml payload.
Payload payload = LookupService.getXmlPayload(inputStream);
// 4. Execute lookup.
Payload result = accessor.call(payload);
...
// Steps 2. to 4. can be executed several times.
...
}finally{
// 4. Close the accessor in order to free resources.
if (accessor!=null) accessor.close();
}
Modifier and Type | Method and Description |
---|---|
XmlPayload |
call(XmlPayload payload)
Executes a remote function call.
|
void |
close()
Closes this accessor and releases any resources associated with the
accessor.
|
public XmlPayload call(XmlPayload 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