ibm websphere adapter for ftp 7.0.0.0 quick start scenariopublib.boulder.ibm.com › bpcsamp ›...

574
Page 1 of 574 IBM WebSphere Adapter for FTP 7.0.0.0 Quick Start Scenario Note: Before using this information and the product it supports, read the information in Chapter "Notices” This edition applies to version 7, release 0, and modification 0 of IBM WebSphere Adapter for FTP and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2009. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

Upload: others

Post on 01-Feb-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

  • Page 1 of 574

    IBM WebSphere Adapter for FTP 7.0.0.0

    Quick Start Scenario

    Note: Before using this information and the product it supports, read the information in Chapter "Notices” This edition applies to version 7, release 0, and modification 0 of IBM WebSphere Adapter for FTP and to all subsequent releases and modifications until otherwise indicated in new editions. © Copyright International Business Machines Corporation 2009. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.

  • Page 2 of 574

    C h a p t e r 1 . Introduction........................................................................7

    Learning Objectives..................................................................................................................... 8 Audience ..................................................................................................................................... 8 Software prerequisites................................................................................................................. 8

    C h a p t e r 2 . Preparing to run through the tutorial...............................9

    Configuration prerequisites ......................................................................................................... 9 Extracting the sample files .......................................................................................................... 9

    C h a p t e r 3 . Tutorial 1: Outbound Processing – Creating a file in FTP server with sequencing and data transformation ...............................22

    Configuring the adapter for Outbound processing .................................................................... 22 Creating the project .......................................................................................................... 24 Setting connection properties for the New External Service wizard................................. 33 Generating business object definitions and related artifacts............................................ 37

    Deploying the module to the test environment.......................................................................... 52 Testing the assembled adapter application .............................................................................. 55

    C h a p t e r 4 . Tutorial 2: Outbound Processing – Appending to a file in FTP server with data transformation .......................................................58

    Configuring the adapter for Outbound processing .................................................................... 58 Creating the project .......................................................................................................... 59 Setting connection properties for the New External Service wizard................................. 68 Generating business object definitions and related artifacts............................................ 71

    Deploying the module to the test environment.......................................................................... 86 Testing the assembled adapter application .............................................................................. 89

    C h a p t e r 5 . Tutorial 3: Outbound Processing – Retrieving content from a file in the FTP server with data transformation...............................92

    Configuring the adapter for Outbound processing .................................................................... 92 Creating the project .......................................................................................................... 93 Setting connection properties for the New External Service wizard............................... 103 Generating business object definitions and related artifacts.......................................... 104

    Deploying the module to the test environment........................................................................ 123 Testing the assembled adapter application ............................................................................ 126

  • Page 3 of 574

    C h a p t e r 6 . Tutorial 4: Outbound Processing – Overwriting a file in FTP server 128

    Configuring the adapter for Outbound processing .................................................................. 128 Creating the project ........................................................................................................ 129 Setting connection properties for the New External Service wizard............................... 135 Generating business object definitions and related artifacts.......................................... 137

    Deploying the module to the test environment........................................................................ 147 Testing the assembled adapter application ............................................................................ 150

    C h a p t e r 7 . Tutorial 5: Outbound Processing –Deleting a file from FTP server 15353

    Configuring the adapter for Outbound processing .................................................................. 153 Creating the project ........................................................................................................ 154 Setting connection properties for the New External Service wizard............................... 159 Generating business object definitions and related artifacts.......................................... 162

    Deploying the module to the test environment........................................................................ 172 Testing the assembled adapter application ............................................................................ 175

    C h a p t e r 8 . Tutorial 6: Outbound Processing – Listing of files from a directory in FTP server.............................................................................178

    Configuring the adapter for Outbound processing .................................................................. 178 Creating the project ........................................................................................................ 179 Setting connection properties for the New External Service wizard............................... 184 Generating business object definitions and related artifacts.......................................... 187

    Deploying the module to the test environment........................................................................ 197 Testing the assembled adapter application ............................................................................ 200

    C h a p t e r 9 . Tutorial 7: Outbound Processing – Exists operation 202

    Configuring the adapter for Outbound processing .................................................................. 202 Creating the project ........................................................................................................ 203 Setting connection properties for the New External Service wizard............................... 209 Generating business object definitions and related artifacts.......................................... 211

    Deploying the module to the test environment........................................................................ 221 Testing the assembled adapter application ............................................................................ 224

  • Page 4 of 574

    C h a p t e r 1 0 . Tutorial 8: Outbound Processing –Retrieving the contents of file from FTP server in passthrough mode ...........................226

    Configuring the adapter for Outbound processing .................................................................. 226 Creating the project ........................................................................................................ 227 Setting connection properties for the New External Service wizard............................... 232 Generating business object definitions and related artifacts.......................................... 234

    Deploying the module to the test environment........................................................................ 245 Testing the assembled adapter application ............................................................................ 248

    C h a p t e r 1 1 . Tutorial 9: Outbound Processing –ExecuteFTPScript operation 25050

    Configuring the adapter for Outbound processing .............................................................. 25052 Creating the project .................................................................................................... 25154 Setting connection properties for the New External Service wizard........................... 25660 Generating business object definitions and related artifacts...................................... 25861

    Deploying the module to the test environment........................................................................ 269 Testing the assembled adapter application ............................................................................ 272

    C h a p t e r 1 2 . Tutorial 10: Outbound Processing –Server toServeroperation........................................................................................275

    Configuring the adapter for Outbound processing .................................................................. 275 Creating the project ........................................................................................................ 276 Setting connection properties for the New External Service wizard............................... 281 Generating business object definitions and related artifacts.......................................... 283

    Deploying the module to the test environment........................................................................ 294 Testing the assembled adapter application ............................................................................ 297

    C h a p t e r 1 3 . Tutorial 11: Receiving events from the FTP server with datatransformation 300

    Configuring the adapter for Inbound processing..................................................................... 300 Creating the project ........................................................................................................ 302 Setting connection properties for the New External Service wizard............................... 311 Generating business object definitions and related artifacts.......................................... 322

    Deploying the module to the test environment........................................................................ 343 Testing the assembled adapter application ............................................................................ 345

  • Page 5 of 574

    C h a p t e r 1 4 . Tutorial 12 : Receiving events from FTP server without datatransformation 350

    Configuring the adapter for Inbound processing..................................................................... 350 Creating the project ........................................................................................................ 351 Setting connection properties for the New External Service wizard............................... 356 Generating business object definitions and related artifacts.......................................... 365

    Deploying the module to the test environment........................................................................ 379 Testing the assembled adapter application ............................................................................ 381

    C h a p t e r 1 5 . Tutorial 13: Inbound Processing – Retrieving a cobol copybook record from FTP server .............................................................385

    Configuring the adapter for Inbound processing..................................................................... 387 Creating the project ........................................................................................................ 387 Setting connection properties for the New External Service wizard............................... 402 Generating business object definitions and related artifacts.......................................... 406

    Deploying the module to the test environment........................................................................ 417 Testing the assembled adapter application ............................................................................ 419

    C h a p t e r 1 6 . Tutorial 14: Inbound Processing – Polling events from SFTP server with password authentication......................................422

    Configuring the adapter for Inbound processing..................................................................... 424 Creating the project ........................................................................................................ 424 Generating business object definitions and related artifacts.......................................... 434

    Deploying the module using the test environment .................................................................. 444 Testing the assembled adapter application ............................................................................ 445

    C h a p t e r 1 7 . Tutorial 15: Using secure FTP protocol explicitly for receiving events from FTPS server ........................................................447

    Configuring the adapter for Inbound processing using secure FTP protocol.......................... 424 Creating the project ........................................................................................................ 424 Generating business object definitions and related artifacts.......................................... 434

    Deploying the module using the test environment .................................................................. 444 Testing the assembled adapter application ............................................................................ 445

  • Page 6 of 574

    C h a p t e r 1 8 . Tutorial 16: Using the secure FTP protocol explicitly for deleting a file on FTPS server...............................................................483

    Configuring the adapter for Outbound processing ................................................................. .485 Creating the project ....................................................................................................... .486 Generating business object definitions and related artifacts......................................... .487

    Deploying the module using the test environment .................................................................. 490 Testing the assembled adapter application ............................................................................ 492

    C h a p t e r 1 9 . Tutorial 17: Outbound processing – creating a file using SFTP protocol using public key authentication .........................51422

    Configuring the adapter for Outbound processing .................................................................. 424 Creating the project .................................................................................................... 42418 Generating business object definitions and related artifacts...................................... 43422

    Deploying the module using the test environment .............................................................. 44428 Testing the assembled adapter application ........................................................................ 44530

    C h a p t e r 2 0 . Tutorial 18: creating a file at a remote location where the business object has a global element ………………………………………………………………534

    Configuring the adapter for Outbound processin .............................................................. 424535 Creating the project .................................................................................................. 424539 Generating business object definitions and related artifacts.................................... 434545

    Deploying the module using the test environment .................................................................. 549 Testing the assembled adapter application ............................................................................ 560

    C h a p t e r 2 1 . Troubleshooting .........................................................561

    Deploying project through Admin Console.............................................................................. 564 Starting the application through Admin Console 0.................................................................. 569

    C h a p t e r 2 2 . Notices.........................................................................571

    Programming interface information ......................................................................................... 573 Trademarks ............................................................................................................................. 574

  • Page 7 of 574

    C h a p t e r 1 . Introduction The WebSphere Adapter for FTP 7.0.0.0 exchanges business data between remote file systems and J2EE applications. The adapter retrieves files or writes to the files by connecting to the FTP, FTPS or SFTP server.

    The document demonstrates the following scenarios:

    1. Outbound with data transformation for create operation

    2. Outbound with data transformation for append operation

    3. Outbound with data transformation for retrieve operation

    4. Outbound for overwrite operation

    5. Outbound for delete operation

    6. Outbound for list operation

    7. Outbound for exists operation

    8. Outbound for retrieve operation

    9. Outbound for executeFTPscript operation

    10. Outbound for servertoserver operation

    11. Inbound with data transformation using FTP protocol

    12. Inbound with simple pass through using FTP protocol

    13. Inbound using SFTP protocol with password authentication

    14. Outbound using FTPS protocol

    15. Inbound using FTPS protocol

    16. Outbound using SFTP using public key authentication

    17. Outbound where the global element has an anonymous complex type

  • Page 8 of 574

    These scenarios demonstrate how the WebSphere Adapter for FTP performs Inbound and Outbound operations.

    To gain practical knowledge in setting up and deploying the adapter go through these tutorials.

    If you have performed the prerequisite tasks, you can complete each tutorial within an hour.

    Learning objectives After completing these tutorials, you should be able to perform the following tasks:

    1. Create an adapter project in WebSphere Integration Developer.

    2. Discover services and associated business objects from the Enterprise Information system (EIS) and make them part of the adapter project.

    3. Create a deployable module that you can install on WebSphere Process Server or WebSphere Enterprise Service Bus.

    4. Test the module and validate the results.

    Audience These tutorials are for integration developers who design, assemble, test, and deploy business integration solutions.

    Software prerequisites 1. To use these tutorials, you must have the following applications installed:

    2. WebSphere Integration Developer 7.0

    3. WebSphere Process Server 7.0

    ftp://ftp/�

  • Page 9 of 574

    C h a p t e r 2 . Preparing to run through the tutorial

    Configuration prerequisites Before testing any tutorial, complete the following tasks:

    1. Create output, event and archive folders in the root directory of your FTP server.

    2. Create event, and archive folders in C:\temp.

    Extracting the sample files Replicas of the artifacts that you create when using the New External Service wizard are provided as sample files for your reference. Use these files to verify that the files you create with the New External Service wizard are correct.

    Tutorial1.zip

    File name Description

    FTPOutboundCreate

    FTPOutboundCreate/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundCreate /

    Customer.xsd

    Business object definition for the customer business function.

    FTPOutboundCreate /

    CustomerWrapper.xsd

    Business object definition for the business object container

  • Page 10 of 574

    FTPOutboundCreate /

    CustomerWrapperBG.xsd

    Business object definition for the business object graph

    FTPOutboundCreate/DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundCreate/DataHandlerConfiguration.bcfg

    Contains the datahandler configured for the module

    FTPOutboundCreate/

    FTPImport.wsdl

    Contains the wsdl file configured for the resource adapter

    FTPOutboundCreate/CommonSchemas

    Contains all the common schemas used by the adapter

    Tutorial2.zip

    File name Description

    FTPOutboundAppend

    FTPOutboundAppend/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundAppend /

    Customer.xsd

    Business object definition for the customer business function.

    FTPOutboundAppend /

    CustomerWrapper.xsd

    Business object definition for the business object container.

    FTPOutboundAppend /

    CustomerWrapperBG.xsd

    Business object definition for the business object graph.

    FTPOutboundAppend/DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundAppend/DataHandlerConfiguration.bcfg

    Contains the datahandler configured for the module

  • Page 11 of 574

    FTPOutboundAppend/

    FTPImport.wsdl

    Contains the wsdl file for the resource adapter

    FTPOutboundAppend/CommonSchemas

    Contains all the common schemas used by the adapter

    Tutorial3.zip

    File name Description

    FTPOutboundRetrieveDTF

    FTPOutboundRetrieveDTF/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundRetrieveDTF /

    Customer.xsd

    Business object definition for the customer business function

    FTPOutboundRetrieveDTF /

    CustomerRetrieveWrapper.xsd

    Contains the retrieve wrapper business object definition

    FTPOutboundRetrieveDTF /

    CustomerRetrieveWrapperBG.xsd

    Contains the retrieve business graph for the business object

    FTPOutboundRetrieveDTF/

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundRetrieveDTF/

    FTPImport.wsdl

    Contains the wsdl file for the resource adapter

    FTPOutboundRetrieveDTF/

    DataHandler.bcfg

    Contains the datahandler configured for the module

    FTPOutboundRetrieveDTF/

    CommonSchemas

    Contains all the common schemas used by the adapter

    Tutorial4.zip

  • Page 12 of 574

    File name Description

    FTPOutboundOverwrite

    FTPOutboundOverwrite/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundOverwrite

    FTPImport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPOutboundOverwrite/

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundOverwrite/Common Schemas/

    Contains all the common schemas used by the adapter

    Tutorial5.zip

    File name Description

    FTPOutboundDelete

    FTPOutboundDelete/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundDelete

    FTPImport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPOutboundDelete/

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundDelete/Common Schemas/

    Contains all the common schemas used by the adapter

    Tutorial6.zip

  • Page 13 of 574

    File name Description

    FTPOutboundList

    FTPOutboundList/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundList

    FTPImport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPOutboundList/

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundList/CommonSchemas/ Contains all the common schemas used by the adapter

    Tutorial7.zip

    File name Description

    FTPOutboundExists

    FTPOutboundExists/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundExists

    FTPImport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPOutboundExists/

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundExists/CommonSchemas/

    Contains all the common schemas used by the adapter

  • Page 14 of 574

    Tutorial8.zip

    File name Description

    FTPOutboundRetrieve

    FTPOutboundRetrieve/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundRetrieve

    FTPImport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPOutboundRetrieve/

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundRetrieve/CommonSchemas/

    Contains all the common schemas used by the adapter

    Tutorial9.zip

    File name Description

    FTPOutboundExecuteFTPscript

    FTPOutboundExecuteFTPscript/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundExecuteFTPscript

    FTPImport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPOutboundExecuteFTPscript/

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundExecuteFTPscript/CommonSchemas/

    Contains all the common schemas used by the adapter

  • Page 15 of 574

    Tutorial10.zip

    File name Description

    FTPOutboundServertoServer

    FTPOutboundServertoServer/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundServertoServer

    FTPImport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPOutboundServertoServer/

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundServertoServer/CommonSchemas/

    Contains all the common schemas used by the adapter

    Tutorial11.zip

    File name Description

    FTPInboundContentSpecific

    FTPInboundContentSpecific/

    FTPExport.export

    Contains the SCA export for the resource adapter

    FTPInboundContentSpecific /

    Customer.xsd

    business object definition for the customer business function

    FTPInboundContentSpecific /

    business object definition for the business object container

  • Page 16 of 574

    CustomerWrapper.xsd

    FTPInboundContentSpecific /

    CustomerWrapperBG.xsd

    Business object definition for the business object graph

    FTPInboundContentSpecific /

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPInboundContentSpecific /

    DataHandlerConfiguration.bcfg

    Contains the datahandler configured for the module

    FTPInboundContentSpecific /

    FunctionSelectorConfiguration.bcfg

    function selector information configured for this module

    FTPInboundContentSpecific /

    FTPExport.wsdl

    Contains the SCA wsdl file for the resource adapter

    Tutorial12.zip

    File name Description

    FTPInboundGeneric

    FTPInboundGeneric/

    FTPExport.export

    Contains the SCA export for the resource adapter.

    FTPInboundGeneric /

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPInboundGeneric /

    FunctionSelectorConfiguration.bcfg

    Function selector information configured for this module

  • Page 17 of 574

    FTPInboundGeneric /

    FTPExport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPInboundGeneric /CommonSchemas

    Contains the common schemas used by the resource adapter

    Tutorial13.zip

    File name Description

    FTPCCInbound

    FTPCCInbound/

    FTPExport.export

    Contains the SCA export for the resource adapter

    FTPCCInbound

    /

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPCCInbound/DFHCommArea.xsd

    Contains the COBOL. business object

    FTPCCInbound/DFHCommAreaWrapper.xsd

    Contains the wrapper for the COBOL. business object

    FTPCCInbound/DFHCommAreaWrapperBG.xsd

    Contains the business graph for the COBOL. business object

    FTPCCInbound

    /

    FTPExport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPCCInbound

    /CommonSchemas

    Contains the common schemas used by the resource adapter

    Tutorial14.zip

  • Page 18 of 574

    File name Description

    SFTPInbound

    SFTPInbound/

    FTPExport.export

    Contains the SCA export for the resource adapter

    SFTPInbound /

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    SFTPInbound /

    FunctionSelectorConfiguration.bcfg

    Function selector information configured for this module

    SFTPInbound /

    FTPExport.wsdl

    Contains the SCA wsdl file for the resource adapter

    SFTPInbound /CommonSchemas

    Contains the common schemas used by the resource adapter

    Tutorial15.zip

    File name Description

    FTPSExplicitInboundPass

    FTPSExplicitInboundPass /

    FTPExport.export

    Contains the SCA export for the resource adapter.

    FTPSExplicitInboundPass /

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPSExplicitInboundPass /

    FunctionSelectorConfiguration.bcfg

    Function selector information configured for this module

    FTPSExplicitInboundPass /

    FTPExport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPSExplicitInboundPass Contains the common schemas used

  • Page 19 of 574

    /CommonSchemas by the resource adapter

    Tutorial 16.zip

    File name Description

    FTPOutboundDelete

    FTPOutboundDelete/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundDelete

    FTPImport.wsdl

    Contains the SCA wsdl file for the resource adapter

    FTPOutboundDelete/

    DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundDelete/Common Schemas/

    Contains all the common schemas used by the adapter

    Tutorial17.zip

    File name Description

    FTPOutboundCreate

    FTPOutboundCreate/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundCreate /

    Customer.xsd

    Business object definition for the customer business function.

    FTPOutboundCreate /

    CustomerWrapper.xsd

    Business object definition for the business object container

    FTPOutboundCreate /

    CustomerWrapperBG.xsd

    Business object definition for the business object graph

  • Page 20 of 574

    FTPOutboundCreate/DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundCreate/DataHandlerConfiguration.bcfg

    Contains the datahandler configured for the module

    FTPOutboundCreate/

    FTPImport.wsdl

    Contains the wsdl file configured for the resource adapter

    FTPOutboundCreate/CommonSchemas

    Contains all the common schemas used by the adapter

    Tutorial18.zip

    File name Description

    FTPOutboundCreate

    FTPOutboundCreate/

    FTPImport.import

    Contains the SCA import for the resource adapter

    FTPOutboundCreate /

    Customer.xsd

    Business object definition for the customer business function.

    FTPOutboundCreate /

    CustomerWrapper.xsd

    Business object definition for the business object container

    FTPOutboundCreate /

    CustomerWrapperBG.xsd

    Business object definition for the business object graph

    FTPOutboundCreate/DataBindingConfiguration.bcfg

    Contains the databinding configured for the module

    FTPOutboundCreate/DataHandlerConfiguration.bcfg

    Contains the datahandler configured for the module

    FTPOutboundCreate/

    FTPImport.wsdl

    Contains the wsdl file configured for the resource adapter

  • Page 21 of 574

    FTPOutboundCreate/CommonSchemas

    Contains all the common schemas used by the adapter

  • Page 22 of 574

    C h a p t e r 3 . Tutorial 1: Outbound processing – Creating a file in FTP server with sequencing and data transformation

    This tutorial demonstrates how the managed connection factory property, that is the sequence file, can use WebSphere Adapter for FTP 7.0.0.0 to create a file. When the absolute path of a file is specified in the sequence file property, the adapter will sequence the file name to be created while performing the create operation. The sequence numbers are serialized into a file specified at sequence file and sequencing continues even while running multiple sessions of the adapter.

    Scenario

  • Page 23 of 574

    Business Case: A business process in which, a new customer avails of a credit card from the bank. So a new file needs to be created for the customer on a remote file system which hosts all the information, pertinent to a customer

    User story:

    1. A customer avails of a credit card from the bank. The bank administrator will enter the details in the Credit Card Management System and invoke the FTPOutboundImport.

    2. The adapter receives the request from the calling component and creates the record on the remote file server hosting customer records.

    3. The reply from the FTP server is sent back to the adapter. 4. The adapter passes the return response back to the client.

  • Page 24 of 574

    Configuring the adapter for Outbound processing Execute the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial.

    Create an empty text file called ‘sequencetest.txt’ in any folder that is used for ‘Create’ operation with sequencing option. 0.

    Creating the project

    1. Launch WebSphere Integration Developer by selecting Start > Programs > IBM WebSphere > Integration Developer 7.0.0.0

    2. Switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select Show all, and Business Integration from the list. Click OK.

    3. Create a new module by selecting File->New->Module

    4. Specify a name for the module as FTPOutboundCreate and click Finish.

  • Page 25 of 574

    5. Import the Customer xsd into the module created. Right-click DataTypes from the module FTPOutboundCreate and select Import.

  • Page 26 of 574

    6. Select the FileSystem from the General category and click Next.

  • Page 27 of 574

  • Page 28 of 574

    7. Browse and select the sample business object, Customer.xsd, for example.

    8. The Customer.xsd is displayed below the DataTypes.

  • Page 29 of 574

    9. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service.

    10. Select Adapters and ensure that FTP is selected. Select Advanced: create a FTP service using complete wizard. Click Next.

  • Page 30 of 574

    11. Select IBM WebSphere Adapter for FTP and click Next.

  • Page 31 of 574

    12. Ensure that the target run-time is Websphere Process Server 7.0 and click Next.

  • Page 32 of 574

    13. Select Outbound and click Next.0.

  • Page 33 of 574

    Setting connection properties for the New External Service wizard

    1. Specify the FTP connection information such as, Host name, directory, User name, and password.

  • Page 34 of 574

    2. Select Additional configuration from the Advanced property group tab. Browse and select the sequence file, sequencetest.txt.

    3. Under the Advanced property group tab click Additional configuration panel. Browse and choose the sequence file sequencetest.txt.

  • Page 35 of 574

  • Page 36 of 574

    4. Click Next after entering all the properties. 5.

  • Page 37 of 574

    Generating business object definitions and related artifacts

    6. Click Add in the Operations window to add operations.

    7. Select ‘Create’ as the Operation kind and, ‘User defined type’ as the data type for the operation.

    8. Select ‘Enable response type for the operation” check box and click Next.

  • Page 38 of 574

  • Page 39 of 574

    To generate a business graph for the business object, click New next to Input type.

  • Page 40 of 574

    9. Click Next.

  • Page 41 of 574

    10. Browse the Data type and select the object as Customer.

    11. Check Generate Business graph for each business object and click Finish.

  • Page 42 of 574

    12. To create a new data binding, select the Data format option as ‘Use a data format configuration’ for Input type data format.

  • Page 43 of 574

    13. Click Select next to Data format.

  • Page 44 of 574

    14. Select FTPFileBaseDataBinding and click Next.

  • Page 45 of 574

    15. Click Select to create a new data handler configuration.

  • Page 46 of 574

    16. Select XML from the Data Format Transformation list and click Next.

  • Page 47 of 574

    17. Click Next.

  • Page 48 of 574

    Click Next.

    18. Click Finish to complete the data binding configuration.

  • Page 49 of 574

    19. Click Finish after the ‘Create’ operation is configured.

  • Page 50 of 574

    20. Click Next after the ‘Create’ operation is added.

  • Page 51 of 574

    21. A default name is provided for the interface. Click Finish to complete the configuration.

  • Page 52 of 574

    22. Verify the results.

    Deploying the module to the test environment The result of executing the New External Service wizard is an SCA module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer integration test client.

  • Page 53 of 574

    1. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer. Right-click the.

  • Page 54 of 574

    2. Add the SCA module to the server.

  • Page 55 of 574

    3. Click Finish.

    Testing the assembled adapter application Test the assembled adapter application using WebSphere Integration Developer test client. 0.

    Select the service you want, and click Test > Test Module.

    Populate values for the input business objects.

    Specify the required parameters to execute ‘Create’ operations such as, Directory Path, File name, IncludeENDBODelimiter (specified as ### so that it can be used for the Append and Retrieve tutorials) and values for the Customer object.

  • Page 56 of 574

    1. Execute the service by clicking Continue.

    2. Check the output of the service and the data in the FTP server to ensure that it matches the expected values.

  • Page 57 of 574

    3. The sequencetest.txt file has an entry after the ‘Create’ operation.

  • Page 58 of 574

    C h a p t e r 4 . Tutorial 2: Outbound processing – Appending to a file in the FTP server with data transformation This tutorial demonstrates how the WebSphere Adapter for FTP 7.0.0.0 can be used to append content to an existing file in the FTP server with data transformation.

    Scenario

  • Page 59 of 574

    Business Case:

    A business process, where the existing credit card customer requests for an additional card and the new details needs to be added to the existing file in the remote file system.

    User story:

    1. A new dependent card holder needs to be added to the primary customer’s record. The bank administrator will enter the details in the Credit Card Management System and invokes the FTPOutboundImport.

    2. The adapter receives the request from the calling component and appends the record in to the master file which resides in the remote file server hosting customer records.

    3. The reply from the FTP server is sent back to the adapter. 4. The adapter passes the return response back to the client.

    Configuring the adapter for Outbound processing Execute the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial.

    Creating the project

    1. Launch WebSphere Integration Developer by selecting Start > Programs > IBM WebSphere > Integration Developer 7.0.

    2. In WebSphere Integration Developer switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select Show all and Business Integration from the list. Click OK.

    3. Create a new module by selecting File->New->Module

    4. Specify a name for the module as FTPOutboundAppend and click Finish.

  • Page 60 of 574

  • Page 61 of 574

    5. Import the Customer xsd into the module created. Right-click DataTypes from the module FTPOutboundAppend and select Import.

  • Page 62 of 574

    5. Select the FileSystem from the General category and click Next.

  • Page 63 of 574

    6. Browse and select the sample business object, Customer.xsd

  • Page 64 of 574

    7. The Customer xsd is displayed below the Data Types of FTPOutboundAppend module.

    8. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service.

    9. Select Adapters and ensure that FTP is selected. Select Advanced: create a FTP service using a FTP service wizard. Click Next.

  • Page 65 of 574

  • Page 66 of 574

    10. Select IBM WebSphere Adapter for FTP and click Next.

  • Page 67 of 574

    11. Ensure that the target run-time is WebSphere Process Server 7.0 and click Next.

  • Page 68 of 574

    12. Select Outbound and click Next.

    Setting connection properties for the New External Service wizard

    1. Specify the FTP connection information such as Host name, directory, User name, and password to connect to the FTP server.

  • Page 69 of 574

  • Page 70 of 574

    2. Click Next after entering all the properties.

  • Page 71 of 574

    Generating business object definitions and related artifacts

    1. Click Add in the Operations window to add operations.

  • Page 72 of 574

    2. Select ‘Append’, as the Operation kind and, ‘User defined type’ as the data type for the operation. Select ‘Enable response type for the operation’ and click Next.

  • Page 73 of 574

    3. To generate business graph for the business object click New next to the Input type

  • Page 74 of 574

    4. Click Next.

  • Page 75 of 574

    5. Browse the Data type and select the object as Customer.

    6. Select the check box, ‘Generate Business graph for each business object’ and click Finish.

  • Page 76 of 574

    7. To create a new data binding, select the Data format option as ‘Use a data format configuration’ from the Input type data format list.

  • Page 77 of 574

    8. Click Select to create a new data binding.

  • Page 78 of 574

    9. Select FTPFileBaseDataBinding and click Next.

  • Page 79 of 574

    10. Click Select to create a new data handler configuration.

  • Page 80 of 574

    11. Select XML from the Data Format Transformation list and click Next.

  • Page 81 of 574

    12. Click Next.

  • Page 82 of 574

    13. Leave the default name of data handler as is and click Finish.

    14. Click Next.

    15. Leave the default name of data binding as is and click Finish.

  • Page 83 of 574

    16. Click Finish after the ‘Append’ operation is configured.

  • Page 84 of 574

    17. Click Next to proceed after the ‘Append’ operation is added.

  • Page 85 of 574

    18. A default name is provided for the interface. Click Finish to complete the configuration.

  • Page 86 of 574

    19. Verify the results.

    Deploying the module to the test environment The result of executing the New External Service wizard is an SCA module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer test client. 0.

  • Page 87 of 574

    1. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer. Right-click the server, and select Add and Remove Projects.

  • Page 88 of 574

    2. Add the SCA module to the server.

  • Page 89 of 574

    3. Click Finish.

    Testing the assembled adapter application Test the assembled adapter application using WebSphere Integration Developer integration test client. 0.

    1. Select the service you want, and click Test > Test Module.

  • Page 90 of 574

    2. Populate values for input business objects. Specify the required parameters such as Directory Path, file name, IncludeENDBODelimiter and values for the Customer object.

    3. Execute the service by clicking Continue.

  • Page 91 of 574

    Verify the output of the service and the data in the EIS to ensure that it matches the expected values.

  • Page 92 of 574

    C h a p t e r 5 . Tutorial 3: Outbound processing – Retrieving content from a file in the FTP server with data transformation This tutorial demonstrates how the WebSphere Adapter for FTP 7.0.0.0 can be used to retrieve content from a file located in the FTP server. In addition, it demonstrates as to how you can use the XML Data handler to retrieve XML content from a file.

    Scenario

  • Page 93 of 574

    Business Case: A distributor orders goods from XYZ, a manufacturer. The company maintains the record of a distributor in a unique file at a remote file system. To understand the transactions with a particular distributor, that specific transaction record has to be retrieved.

    Scenario: 1. A manufacturing company wants to retrieve the record of a particular

    distributor. To do this, the company will invoke the FTPOutboundImport to retrieve information pertaining to the distributor.

    2. The adapter receives the request from the calling component and invokes the corresponding data at the remote system.

    3. The FTP server response is sent back to the adapter. 4. The adapter sends this response to the client.

    Configuring the adapter for Outbound processing Run the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial. 0.

    Creating the project

    1. Launch WebSphere Integration Developer by selecting Start > Programs > IBM WebSphere > Integration Developer 7.0.

    2. In WebSphere Integration Developer, switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select Show all, and Business Integration from the list. Click OK.

    3. Create a new module by selecting File->New->Module

    4. Specify a name for the module as FTPOutboundRetrieveDTF and click Finish.

  • Page 94 of 574

  • Page 95 of 574

    5. Import the Customer xsd into the module created. Right-click DataTypes from the module FTPOutboundRetrieveDTF and select Import.

  • Page 96 of 574

    6. Select FileSystem from the General category and click Next.

  • Page 97 of 574

    7. Browse and select the sample business object, Customer.xsd

  • Page 98 of 574

    8. The Customer xsd is imported into the FTPOutboundRetrieveDTF module.

    9. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service.

  • Page 99 of 574

    10. Select Adapters and ensure that FTP is selected. Select Advance: create a FTP service using the complete wizard. Click Next.

  • Page 100 of 574

    11. Select IBM WebSphere Adapter for FTP and click Next.

  • Page 101 of 574

    12. Ensure that the target run-time is WebSphere Process Server 7.0 and click Next.

  • Page 102 of 574

    13. Select Outbound and click Next.

  • Page 103 of 574

    Setting connection properties for the New External Service wizard

    1. Specify the FTP connection information such as Host name, directory, User name, and password.

  • Page 104 of 574

    2. Click Next after entering all the properties.0.

    Generating business object definitions and related artifacts

    1. Click Add in the Operations window to add operations.

  • Page 105 of 574

    2. Select ‘Retrieve’, as the Operation kind and ‘Generic business object with business graph’ as the data type of the operation. Click Next.

  • Page 106 of 574

    3. Leave the operation name as retrieveFTPFile. For the output type browse and click New.

  • Page 107 of 574

    4. Click Next.

  • Page 108 of 574

    5. Click Browse to select Customer. Suggestion: Browse the Data type and select the object as Customer.

  • Page 109 of 574

    6. Select Customer and click OK.

  • Page 110 of 574

    7. Select the check boxes, ‘Generate business graph for each object and Generate retrieve container to retrieve multiple business objects and click Finish.

  • Page 111 of 574

  • Page 112 of 574

    8. Click Select to create a new data binding configuration.

  • Page 113 of 574

    9. Select FTPFileBaseDataBinding and click Next.

  • Page 114 of 574

    10. Click Select next to Data handler configuration to configure the Data Handler.

  • Page 115 of 574

    11. Select XML and click Next.

  • Page 116 of 574

    12. Click Next.

  • Page 117 of 574

    13. Click Finish.

  • Page 118 of 574

    14. Click Next.

  • Page 119 of 574

    15. Leave the default name as ‘DataBindingConfiguration’ for the data binding and click Finish.

  • Page 120 of 574

    16. The ‘Retrieve’ operation is configured. Click Finish.

  • Page 121 of 574

    17. The ‘Retrieve’ operation is added. Click Next to proceed.

  • Page 122 of 574

    18. A default name is provided for the interface. Click Finish to complete the configuration.

  • Page 123 of 574

    19. Verify the results.

    Deploying the module to the test environment The result of running the New External Service wizard is a SCA module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer test client. 0.

  • Page 124 of 574

    1. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer . Right-click the server, and select Add and Remove Projects.

    2. Add the SCA module to the server.

  • Page 125 of 574

    3. Click Finish.

  • Page 126 of 574

    Testing the assembled adapter application Test the assembled adapter application using WebSphere Integration Developer integration test client. 0.

    1. Select the service you want, and click Test > Test Module.

    2. Populate values for input business objects.

    3. Place the Seqcreate.1.txt which is used in Tutorial 1 and 2 in the output directory so that it can be used here.

    4. Populate the business object with values for the directory path, file name, local directory path, splitting function class name and split criteria.

  • Page 127 of 574

    5. Execute the service by selecting Continue.

    6. Verify the output of the service and the data in the EIS to ensure that it matches the expected values.

  • Page 128 of 574

    C h a p t e r 6 . Tutorial 4: Outbound processing – Overwriting a file in the FTP server This tutorial demonstrates how the WebSphere Adapter for FTP 7.0.0.0 can be used to overwrite a file in the FTP server without data transformation.

    Scenario

  • Page 129 of 574

    Business Case: A business process where the existing credit card holder changes the address and this information has to be updated in the customer record which exists in a remote file system.

    Scenario: 1. An existing customer changes the address and this information has to be

    updated in the record. The bank administrator will invoke the Overwrite’ operation in FTPOutboundImport.

    2. The adapter receives the request from the calling component and overwrites the record on the remote file server hosting customer’s records.

    3. The reply from the FTP server is sent back to the adapter. 4. The adapter passes the return response back to the client.

    Configuring the adapter for Outbound processing Execute the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial. 0.

    Creating the project

    1. Launch WebSphere Integration Developer by selecting Start > Programs > IBM WebSphere > Integration Developer 7.0.

    2. In WebSphere Integration Developer, switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select Show all, and Business Integration from the list. Click OK.

    3. Create a new module by selecting File->New->Module

    4. Specify a name for the module as FTPOutboundOverwrite and click Finish.

  • Page 130 of 574

  • Page 131 of 574

    5. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service

    6. Select Adapters and ensure that FTP is selected. Select Advance: create a FTP service using the complete wizard. Click Next.

  • Page 132 of 574

    7. Select IBM WebSphere Adapter for FTP and click Next.

  • Page 133 of 574

    8. Ensure that the target run-time is WebSphere Process Server 7.0 and click Next.

  • Page 134 of 574

    9. Select Outbound and click Next.

  • Page 135 of 574

    Setting connection properties for the New External Service wizard

    1. Specify the FTP connection information such as Host name, directory, User name, and password.

  • Page 136 of 574

    2. Click Next after entering all the properties.

  • Page 137 of 574

    Generating business object definitions and related artifacts

    1. Click Add in the Operations window to add operations.

  • Page 138 of 574

    2. Select ‘Overwrite’, as the Operation kind and ‘Generic FTP business object with business graph’ as the data type of the input operation. Click Next.

  • Page 139 of 574

    3. Leave the default operation name as it is. To create a new data binding select ‘Use a data format configuration’ from the Data Format Options list.

    4. Click Select next to Data format.

  • Page 140 of 574

  • Page 141 of 574

    5. Select FTPFileBaseDataBinding and click Next.

  • Page 142 of 574

    6. Click Next.

    7. Leave the default name of Binding type as it is, and click Finish.

  • Page 143 of 574

  • Page 144 of 574

    8. The ‘Overwrite’ operation is configured. Click Finish.

  • Page 145 of 574

    9. Click Next.

  • Page 146 of 574

    10. A default name is provided for the interface. Click Finish to complete the configuration.

  • Page 147 of 574

    Verify the results.

    Deploying the module to the test environment The result of executing the New External Service wizard is a SCA module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer integration test client. 0.

    1. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer. Right-click the server and select Add and Remove Projects.

  • Page 148 of 574

  • Page 149 of 574

    2. Add the SCA module to the server.

  • Page 150 of 574

    3. Click Finish.

    Testing the assembled adapter application Test the assembled adapter application using WebSphere Integration Developer integration test client. 0.

    1. Select the service you want, and click Test > Test Module.

    2. Populate values for input business objects.

    3. Create a file called TestOverwrite.txt in the output directory of the FTP server with any content.

  • Page 151 of 574

    4. Specify the values for directory path, file name and content.

    5. Execute the service by selecting Continue.

  • Page 152 of 574

    6. Verify the output of the service and data in the FTP server to ensure that it matches the expected values.

  • Page 153 of 574

    C h a p t e r 7 . Tutorial 5: Outbound processing – Deleting a file from the FTP server This tutorial demonstrates how the WebSphere Adapter for FTP 7.0.0.0 can be used to delete a file from the FTP server.

    Scenario

  • Page 154 of 574

    Business Case: A distributor orders goods from XYZ, a manufacturer. company. The company maintains the record of a distributor in a unique file at the remote location. The distributor decides to break the contract with XYZ Pvt. Ltd.

    Scenario:

    1. A distributor cancels his contract with the manufacturing company. The company will invoke the FTPOutboundImport to delete the record of a distributor.

    2. The adapter receives the request from the calling component and deletes the record on the remote file server hosting distributor’s records.

    3. The reply from the FTP server is sent back to the adapter. 4. The adapter passes the return response back to the client.

    Configuring the adapter for Outbound processing Execute the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial. Create a file called TestDelete.txt in the output directory of your FTP server. 0.

    Creating the project

    1. Launch WebSphere Integration Developer by selecting Start > Programs > IBM WebSphere > Integration Developer 7.0.

    2. In WebSphere Integration Developer, switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select Show all and Business Integration from the list. Click OK.

    3. Create a new module by selecting File->New->Module

    4. Specify a name for the module as FTPOutboundDelete and click Finish.

  • Page 155 of 574

    5. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service

    6. Select Adapters and ensure that FTP is selected. Click Next.

  • Page 156 of 574

    7. Select IBM Websphere Adapter for FTP and click Next.

  • Page 157 of 574

    8. Ensure that the target run-time is WebSphere Process Server 7.0 and click Next.

  • Page 158 of 574

    9. Select Outbound and click Next.0.

  • Page 159 of 574

    Setting connection properties for the New External Service wizard

    1. Specify the FTP connection information such as Host name, directory, User name, and password.

  • Page 160 of 574

  • Page 161 of 574

    2. All the managed connection factory properties are entered and click Next.0.

  • Page 162 of 574

    Generating business object definitions and related artifacts

    1. Click Add in the Operations window to add operations.

    2. Select ‘Delete’ as the Operation kind and ‘Generic FTP business object with business graph’ as the data type of the input operation. Click Next.

  • Page 163 of 574

    3. Leave the operation name as delete FTPFile. Select ‘Use a data format configuration’ from the Data Format Options list.

  • Page 164 of 574

    4. Click Select next to Data format.

  • Page 165 of 574

    5. Select FTPFileBaseDataBinding and click Next.

  • Page 166 of 574

    6. Click Next.

  • Page 167 of 574

    7. Click Next.

  • Page 168 of 574

    8. The ‘Delete’ operation is configured. Click Finish.

  • Page 169 of 574

    9. The ‘Delete’ operation is added successfully. Click Next.

  • Page 170 of 574

    10. A default name is provided for the interface. Click Finish to complete the configuration.

  • Page 171 of 574

  • Page 172 of 574

    Verify the results.

    Deploying the module to the test environment The result of executing the New External Service wizard is a SCA module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer integration test client. 0.

    1. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer. Right-click the server and select Add and Remove Projects.

  • Page 173 of 574

    2. Add the SCA module to the server.

  • Page 174 of 574

  • Page 175 of 574

    3. Click Finish.

    Testing the assembled adapter application Test the assembled adapter application using WebSphere Integration Developer integration test client.

    1. Select the service you want, and click Test > Test Module.

    2. Populate values for input business objects.

    3. Create a file called TestDelete.txt and place in the output directory of the FTP server.

  • Page 176 of 574

    4. Enter the values for directory path, and file name.

    5. Execute the service by selecting Continue.

    6. Verify the output of the service and data in the EIS to ensure that it matches the expected values.

  • Page 177 of 574

  • Page 178 of 574

    C h a p t e r 8 . Tutorial 6: Outbound processing – Listing files from a directory in the FTP server This tutorial demonstrates how the WebSphere Adapter for FTP 7.0.0.0 can be used to list files from a specified directory in the FTP server.

    Scenario

  • Page 179 of 574

    Business Case: A distributor orders goods from XYZ, a manufacturer. The company maintains the record of a distributor in a unique file at the remote location. The company wants to get the names of all its existing distributors.

    Scenario: 1. A manufacturing company wants to get the names of all its distributors.

    The company will invoke the FTPOutboundImport to list the records of its distributors.

    2. The adapter receives the request from the calling component and lists all entries of distributors on the remote file server hosting distributors’ records.

    3. The reply from the FTP server is sent back to the adapter. 4. The adapter passes the return response back to the client.

    Configuring the adapter for Outbound processing Execute the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial. 0.

    Creating the project

    1. Launch WebSphere Integration Developer by selecting Start > Programs > IBM WebSphere > Integration Developer 7.0.

    2. In WebSphere Integration Developer, switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select ’Show all and Business Integration from the list. Click OK.

    3. Create a new module by selecting File->New->Module

    4. Enter a name for the module as FTPOutboundList and click Finish.

  • Page 180 of 574

    5. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service

    6. Select Adapters and ensure that FTP is selected. Click Next.

  • Page 181 of 574

    7. Select IBM WebSphere Adapter for FTP and click Next.

  • Page 182 of 574

    8. Ensure that the target run-time is WebSphere Process Server 7.0 and click Next.

  • Page 183 of 574

    9. Select Outbound and click Next.

  • Page 184 of 574

    Setting connection properties for the New External Service wizard

    1. Specify the FTP connection information such as Host name, directory, User name and password.

  • Page 185 of 574

    2. Click Next after all the properties are entered.

  • Page 186 of 574

  • Page 187 of 574

    Generating business object definitions and related artifacts

    1. Click Add in the Operations window to add operations.

    2. Select ‘List’ as the Operation kind and ’Generic FTP business object with business graph’ as the data type of the input operation. Click Next.

  • Page 188 of 574

    3. Leave the operation name with the default value. To create a new data binding select ‘Use a data format configuration’ from the Data Format Options list.

  • Page 189 of 574

    4. Click Select next to Data format.

  • Page 190 of 574

    5. Select FTPFileBaseDataBinding and click Next.

  • Page 191 of 574

    6. Click Next.

  • Page 192 of 574

    7. Click Next.

  • Page 193 of 574

    8. Click Finish.

  • Page 194 of 574

    9. The ‘List’ operation is added. Click Next.

  • Page 195 of 574

    10. A default name is provided for the interface. Click Finish to complete the configuration.

  • Page 196 of 574

    11. Verify the results.

  • Page 197 of 574

    Deploying the module to the test environment 12. The result of executing the New External Service wizard is a SCA

    module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer integration test client. 0.

    1. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer. Right-click the server and select Add and Remove Projects.

  • Page 198 of 574

    2. Add the SCA module to the server.

  • Page 199 of 574

    3. Click Finish.

  • Page 200 of 574

    Testing the assembled adapter application Test the assembled adapter application using WebSphere Integration Developer integration test client. 0.

    1. Select the service you want and click Test > Test Module.

    2. Populate values for input business objects.

    3. Specify the value for the directory path of the FTP server.

  • Page 201 of 574

    4. Execute the service by selecting Continue.

    5. Verify the output of the service and data in the FTP server to ensure that it matches the expected values.

  • Page 202 of 574

    C h a p t e r 9 . Tutorial 7: Outbound processing – Exists operation This tutorial demonstrates how the WebSphere Adapter for FTP 7.0.0.0 can be used to check for an existence of a file in a specified directory in the FTP server.

    Scenario

  • Page 203 of 574

    Business Case: A distributor orders goods from XYZ, a manufacturer. The company maintains a record of the distributor in a unique file at the remote location. The company wants to check if a particular distributor has a contract with them.

    Scenario:

    1. A manufacturing company wants to check if a particular distributor has a contract with them. The company will invoke the FTPOutboundImport to check if a record for the distributor in question is present.

    2. The adapter receives the request from the calling component and checks the existence of the distributors on the remote file server hosting distributor’s records.

    3. The reply from the FTP server is sent back to the adapter. 4. The adapter passes the return response back to the client.

    Configuring the adapter for Outbound processing Execute the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial. 0.

    Creating the project

    1. Launch WebSphere Integration Developer by clicking Start > Programs > IBM WebSphere > Integration Developer 7.0.

    2. In WebSphere Integration Developer, switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select “Show all,” then select Business Integration from the list and click OK.

    3. Create a new module by clicking File->New->Module

    4. Specify a name for the module as FTPOutboundExists and click Finish.

  • Page 204 of 574

    5. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service

    6. Select Adapters and ensure that FTP is selected. Click Next.

    7. Select IBM WebSphere Adapter for FTP and click Next.

  • Page 205 of 574

  • Page 206 of 574

    8. Ensure that the target run-time is WebSphere Process Server 7.0 and click Next.

  • Page 207 of 574

    9. Select Outbound and click Next.

  • Page 208 of 574

  • Page 209 of 574

    Setting connection properties for the New External Service wizard

    1. Enter the FTP connection information such as Host name, directory, User name, and password.

    2. Click Next after entering all the properties. 0.

  • Page 210 of 574

  • Page 211 of 574

    Generating business object definitions and related artifacts

    1. Click Add in the Operations window to add operations.

    2. Select ‘Exists’ as the Operation kind and ’Generic FTP business object with business graph’ as the data type of the input operation. Click Next.

  • Page 212 of 574

    3. Leave the operation name with the default value. To create a new data binding select ‘Use a data format configuration’ from the Data Format Options list.

  • Page 213 of 574

    4. Click Select.

  • Page 214 of 574

    5. Select FTPFileBaseDataBinding and click Next.

  • Page 215 of 574

    6. Click Next.

  • Page 216 of 574

    7. Click Finish.

  • Page 217 of 574

    8. The ‘Exists’ operation is configured. Click Finish.

  • Page 218 of 574

    9. The ‘Exists’ operation is added. Click Next.

  • Page 219 of 574

    10. A default name is provided for the interface. Click Finish to complete the configuration.

  • Page 220 of 574

    11. Verify the results.

  • Page 221 of 574

    Deploying the module to the test environment The result of executing the New External Service wizard is a SCA module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer integration test client.

    1. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer. Right-click the server and select Add and Remove Projects.

  • Page 222 of 574

    2. Add the SCA module to the server.

  • Page 223 of 574

    3. Click Finish.

  • Page 224 of 574

    Testing the assembled adapter application Test the assembled adapter application using WebSphere Integration Developer integration test client. 0.

    1. Select the service you require and click Test > Test Module.

    2. Populate values for input business objects.

    3. Specify the value for the directory path and file name. By executing this service the existence of file can be verified.

  • Page 225 of 574

    4. Execute the service by selecting Continue.

    5. Verify the output of the service and data in the FTP server to ensure that it matches the expected values.

  • Page 226 of 574

    C h a p t e r 1 0 . Tutorial 8: Outbound processing –Retrieving the contents of a file from the FTP server in the passthrough mode This tutorial demonstrates how the WebSphere Adapter for FTP 7.0.0.0 can be used to retrieve the contents of a file in the FTP server in the passthrough mode.

    Scenario

  • Page 227 of 574

    Business Case: A hospital maintains the records of its patients in a unique file at the remote file system. To study a patient profile, the hospital needs to retrieve the required patient medical record.

    Scenario: 1. A hospital wants to retrieve the record of a particular patient. The

    hospital will invoke the FTPOutboundImport to retrieve information pertaining to him.

    2. The adapter receives the request from the calling component and invokes the corresponding retrieve at the remote system.

    3. The reply from the FTP server is sent back to the adapter. 4. The adapter passes the return response back to the client.

    Configuring the adapter for Outbound processing Execute the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial.

    Creating the project

    1. Launch WebSphere Integration Developer by clicking Start > Programs > IBM WebSphere > Integration Developer 7.0.

    2. In WebSphere Integration Developer, switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select “Show all,” then select Business Integration from the list and click OK.

    3. Create a new module by clicking File->New->Module

    4. Specify the name for the module as FTPOutboundRetrievePass

  • Page 228 of 574

    5. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service

    6. Select Adapters and ensure that FTP is selected. Select Advance: create FTP service using the complete wizard. Click Next.

  • Page 229 of 574

    7. Select IBM Websphere Adapter for FTP and click Next.

    8. Ensure that CWYFT_FTPFile.rar is selected and click Next.

  • Page 230 of 574

  • Page 231 of 574

    9. Select Outbound and click Next.

  • Page 232 of 574

    Setting connection properties for the New External Service wizard

    1. Enter the FTP connection information such as Host name, directory, User name and password.

  • Page 233 of 574

    2. Click Next after entering all the properties.

  • Page 234 of 574

    Generating business object definitions and related artifacts

    3. Click Add in the Operations window to add operations.

  • Page 235 of 574

    4. Select ‘Retrieve’ as the Operation kind and ’Generic FTP business object with business graph’ as the data type of the input operation. Click Next.

  • Page 236 of 574

    5. Leave the operation name with the default value retrieveFTPFile. To create a new data binding select ‘Use a data format configuration’ from the Data Format Options list.

  • Page 237 of 574

    6. Click Select.

  • Page 238 of 574

    7. Select FTPFileBaseDataBinding and click Next.

  • Page 239 of 574

    8. Click Next.

  • Page 240 of 574

    9. Click Finish.

  • Page 241 of 574

    10. The ‘Retrieve’ operation is configured. Click Finish

  • Page 242 of 574

    11. The ‘Retrieve’ operation is added.

  • Page 243 of 574

    12. A default name is provided for the interface. Click Finish to complete the configuration.

  • Page 244 of 574

    13. Verify the results.

  • Page 245 of 574

    Deploying the module to the test environment The result of executing the New External Service wizard is a SCA module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer integration test client. 0.

    1. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer. Right-click the server and select Add and Remove Projects.

  • Page 246 of 574

    2. Add the SCA module to the server.

  • Page 247 of 574

    3. Click Finish.

  • Page 248 of 574

    Testing the assembled adapter application Test the assembled adapter application using WebSphere Integration Developer integration test client.

    1. Select the service you want and click Test > Test Module.

    2. Populate values for input business objects.

    3. Specify values for the dirtectory path, file name, local directory path. TestOverwrite.txt file can be reused to demonstrate retrieve. If splittingfunctionclassname is not specified it will be defaulted to SplitBySize and split criteria as 0.

  • Page 249 of 574

    4. Execute the service by selecting Continue.

    5. Verify the output of the service and data in the EIS to ensure that it matches the expected values.

  • Page 250 of 574

    C h a p t e r 1 1 . Tutorial 9: Outbound processing –ExecuteFTPScript operation This tutorial demonstrates how the WebSphere Adapter for FTP 7.0.0.0 can be used to execute a FTP script which has the FTP server related operations.

    Scenario

    Business Case:

  • Page 251 of 574

    Business process: A bank stores all customer data on a remote file system. Each customer data responds to a unique file on the remote file system. The bank wants to store all customer records on the remote file system in one single operation.

    Scenario:

    1. The Bank Management System invokes the FTPOutboundImport

    2. The adapter receives the request from the calling component and creates all records on the remote file server hosting customer records. The script is executed on the remote FTP server.

    3. The reply from the FTP server is sent back to the adapter. 4. The adapter passes the return response back to the client.

    Configuring the adapter for Outbound processing Execute the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial. 0.

    Creating the project

    1. Launch WebSphere Integration Developer by clicking Start > Programs > IBM WebSphere > Integration Developer 7.0.

    2. In WebSphere Integration Developer, switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select “Show all,” then select Business Integration from the list and click OK.

    3. Create a new module by clicking File->New->Module

    4. Enter the name for the module as FTPOutboundExecuteFTPScript

  • Page 252 of 574

    5. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service

    6. Select Adapters and ensure that FTP is selected. Click Next.

  • Page 253 of 574

    7. Select IBM WebSphere Adapter for FTP and click Next.

  • Page 254 of 574

    8. Ensure that the target run-time is WebSphere Process Server 7.0 and click Next.

  • Page 255 of 574

    9. Select Outbound and click Next.

  • Page 256 of 574

    Setting connection properties for the New External Service wizard

    1. Enter the FTP connection information such as Host name, directory, User name and password.

  • Page 257 of 574

    2. Click Next after entering all the properties.

  • Page 258 of 574

    Generating business object definitions and related artifacts

    3. Click Add in the Operations window to add operations.

  • Page 259 of 574

    4. Select ‘ExecuteFTPScript’ as the Operation kind and ’Generic FTP business object with business graph’ as the data type of the output operation. Click Next.

  • Page 260 of 574

    5. Leave the operation name with the default one. Select ‘Use a data format configuration’ from the Data Format Options list.

  • Page 261 of 574

    6. Click Select next to Data format.

  • Page 262 of 574

    7. Select FTPFileBaseDataBinding and click Next.

  • Page 263 of 574

    8. Click Next.

  • Page 264 of 574

    9. Click Finish.

  • Page 265 of 574

    10. Click Finish.

  • Page 266 of 574

    11. Click Next.

  • Page 267 of 574

    12. A default name is provided for the interface. Click Finish to complete the configuration.

  • Page 268 of 574

    13. Verify the results.

  • Page 269 of 574

    Deploying the module to the test environment The result of executing the New External Service wizard is a SCA module that contains an EIS import or export. Install this SCA module in WebSphere Integration Developer integration test client.

    1. Add the module you created earlier to the server using the server panel in WebSphere Integration Developer. Right-click the server and select Add and Remove Projects.

  • Page 270 of 574

    2. Add the SCA module to the server.

  • Page 271 of 574

    3. Click Finish.

  • Page 272 of 574

    Testing the assembled adapter application Test the assembled adapter application using WebSphere Integration Developer integration test client.

    1. Select the service you require and click Test > Test Module.

    2. Populate values for input business objects.

    3. Create a file called FTPScript.txt with the following content and place it within C:\temp

  • Page 273 of 574

    4. Specify the value for directory path and file name.

    5. Execute the service by selecting Continue.

    6. Verify the output of the service and data in the EIS to ensure that it matches the expected values.

  • Page 274 of 574

  • Page 275 of 574

    C h a p t e r 1 2 . Tutorial 10: Outbound processing –Server to Server File Transfer Operation This tutorial demonstrates how the WebSphere Adapter for FTP 7.0.0.0 can be used to transfer a file from one FTP server to another.

    Scenario

  • Page 276 of 574

    Business Case: A distributor orders goods from XYZ, a manufacturer. company under a legal contract. The company maintains a record of the distributor in a unique file at a remote location. While performing a backup on the machine at remote location, the files present in this server needs to be transferred to a backup server.

    Scenario:

    1. In a manufacturing company when the server hosting information is backed up, records present in this server needs to be transferred to the second server. The administrator will invoke the FTPOutboundImport to transfer the file from the first remote location to the second remote location.

    2. The adapter receives the request from the calling component and forwards it to the first FTP server. This FTP server transfers the record to the second FTP server.

    3. The reply from the FTP server is sent back to the adapter. 4. The adapter passes the return response back to the client.

    Configuring the adapter for Outbound processing Run the New External Service wizard to specify business objects, services, and configuration to be used in this tutorial. 0.

    Creating the project

    1. Launch WebSphere Integration Developer by clicking Start > Programs > IBM WebSphere > Integration Developer 7.0.

    2. In WebSphere Integration Developer , switch to the Business Integration perspective. To do this, click Window > Open perspective > Other. In the Select perspective window, select “Show all,” then select Business Integration from the list and click OK.

    3. Create a new module by clicking File->New->Module

    4. Specify the name for the module as FTPOutboundServertoServer

  • Page 277 of 574

    5. Launch the Enterprise Service Discovery wizard by selecting File->New->Other->Business Integration->External Service

    6. Select Adapters and ensure that FTP is selected. Click Next.

  • Page 278 of 574

    7. Select IBM WebSphere Adapter for FTP and click Next.

  • Page 279 of 574

    8. Ensure that the target run-time is WebSphere Process Server 7.0 and click Next.