WebSphere Adapter for FTP

Data Transformation Framework

During outbound processing the adapter uses data transformation to convert the data contained in WebSphere® Adapter business objects to serialized data formats such as XML. This conversion is necessary because external applications and technologies often only understand their own native or industry standard data formats. Use of Data Transformation Framework enables users to bridge this communication gap.

The following steps describe how data transformation occurs during outbound processing:
  1. A wrapper business object (CustomerWrapper or FTPFile) contained in the wrapper business graph (CustomerWrapperBG or FTPFileBG) is populated with protocol specific information in the J2EE component. The actual business object (for example, Customer) is also set in the wrapper business object. This wrapper business object and the outbound operation name are sent as input through an SCA call.
  2. Based on the data binding configured while running the enterprise service discovery wizard, the correct data binding is called and this data binding gets the WrapperBG business object.
  3. The adapter checks the annotation of the wrapper business object and the Customer business object. Based on the content type set in the annotation of the Customer business object, the correct content-specific data binding is invoked. The mapping between the content type and the content-specific data binding to be called is obtained from the annotation of the wrapper business object. If the content type is invalid or the content-specific data binding name is invalid, then an appropriate error is generated by the Data Transformation Framework. The following example shows the annotation for both CustomerWrapper and Customer:
    <complexType name="CustomerWrapper">
    <annotation>
    <appinfo source="http://www.ibm.com/xmlns/prod/websphere/
    j2ca/datatransformation/databindingmapping"><dtm:DataBindingMapping
    xsi:type="dtm:DataBindingMapping" xmlns:xsi="http://www.w3.org/2001/
    XMLSchema-instance" xmlns:dtm="http://www.ibm.com/xmlns/prod/
    websphere/j2ca/datatransformation/databindingmapping">
    <DataBindingConfig xsi:type="dtm:XMLBOSerializerDataBindingMetadata">
    <ContentType>text/xml</ContentType>
    <DataBindingClass>com.ibm.j2ca.extension.emd.runtime.WBIXMLDataBinding
    </DataBindingClass>
    </DataBindingConfig>
    </dtm:DataBindingMapping>
    </appinfo>
    </annotation>
    ...	
    <complexType name="Customer">
    <annotation>
    <appinfo source="http://www.ibm.com/xmlns/prod/websphere/j2ca/
    datatransformation/databindingmapping">
    <dtm:DataTransformationMetadata xmlns:dtm="http://www.ibm.com/
    xmlns/prod/websphere/j2ca/datatransformation/databindingmapping">
    <ContentType>text/xml</ContentType>
    <Charset></Charset>
    <WrapperName>http://www.ibm.com/xmlns/prod/websphere/j2ca/
    ftp/customerwrapperbg/CustomerWrapperBG</WrapperName>
    </dtm:DataTransformationMetadata>
    </appinfo>
    </annotation>
    
    <sequence maxOccurs="1" minOccurs="1">
    <element maxOccurs="1" minOccurs="0" name="CustomerName" type="string"/>
    <element maxOccurs="1" minOccurs="0" name="Address" type="string"/>
    <element maxOccurs="1" minOccurs="0" name="City" type="string"/>
    <element maxOccurs="1" minOccurs="0" name="State" type="string"/>
    </sequence>
    </complexType>
  4. The request is sent to the adapter and the outbound operation is run. The adapter returns a business object that represents the result of the operation to the J2EE application component.

Pass through processing

Pass through processing occurs when data transformation will not happen. During pass through processing, the custom data binding that extends UnstructuredContentDataBinding does not call any other data binding.
The following steps describe how data pass through occurs during outbound processing:
  1. The FTPFile wrapper business object contained in the FTPFileBG wrapper business graph is populated with protocol specific information in the J2EE component. The Content attribute of FTPFile business object is populated with an unstructured business object. This wrapper business object and the outbound operation name are sent as input through an SCA call.
  2. Based on the data binding (FTPFileDataBinding) configured while running the enterprise service discovery wizard, the correct data binding is called and this data binding gets the FTPFileBG wrapper business object.
  3. The FTPFileDataBinding recognizes the content as unstructured and performs pass through processing. It instantiates the FTPFileUnstructuredRecord, sets the actual content, and sets the protocol specific information.
  4. This business object is sent to the adapter and the outbound operation is executed. The output of the outbound operation is a business object that is sent back to the WBIDataBindingImpl data binding and the business object is sent back to the J2EE client.
This image is described in the surrounding text.

Outbound processing diagram


Terms of use |

Last updated: Mon 30 Oct 2006 03:48:52

(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)