The SCA EIS Binding can accept input for the InteractionSpec and ConnectionSpec specified by using a well defined child Data Object that accompanies the payload. This allows for dynamic request-response interactions with a resource adapter through the InteractionSpec and component authentication through the ConnectionSpec.
The javax.cci.InteractionSpec carries information on how the interaction request with the resource adapter should be handled. It can also carry information on how the interaction was achieved after the request. These two-way communications through the interactions are sometimes referred to as conversations.
BOFactory dataFactory = (BOFactory) \ serviceManager.locateService("com/ibm/websphere/bo/BOFactory"); //Wrapper for doc-lit wrapped stle interfaces, //skip to payload for non doc-lit DataObject docLitWrapper = dataFactory.createByElement / ("http://mytest/eis/Account", "AccountWrapper");Create the payload.
DataObject account = docLitWrapper.createDataObject(0); DataObject accountInfo = account.createDataObject("AccountInfo"); //Perform your setting up of payload //Construct properties data for dynamic interaction DataObject properties = account.createDataObject("properties");For name "workingSet", set the value expected "xyz".
properties.setString("ISworkingSet", "xyz"); //Invoke the service with argument Service accountImport = (Service) \ serviceManager.locateService("AccountOutbound"); DataObject result = accountImport.invoke("createAccount", docLitWrapper); //Get returned property DataObject retProperties = result.getDataObject("properties"); String workingset = retProperties.getString("ISworkingSet");You can use ConnectionSpec properties for dynamic component authentication. The same rules apply as above, except that the property name prefix needs to be "CS" (instead of "IS"). ConnectionSpec properties are not two-way. The same "properties" Data Object can contain both IS and CS properties. To utilize ConnectionSpec properties the resAuth specified on the import binding should be "Application", and the resource adapter must support component authorization. See chapter 8 of the J2EE Connector Architecture Specification for more details.
Last updated: Wed 06 Dec 2006 07:08:08
(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)