SOA Patterns | Design Patterns | File Gateway

SOA Patterns > Legacy Encapsulation Patterns > File Gateway
Home > Design Patterns > File Gateway

File Gateway (Roy)

How can service logic interact with legacy systems that can only share information by exchanging files?

File Gateway


Data records contained in flat files produced by a legacy system need to be processed individually by service logic, but legacy systems are not capable of directly invoking services. Conversely, service logic may need to produce information for the legacy system, but building file creation and transfer functionality into the service can result in an inflexible design.


Intermediary two-way file processing logic is positioned between the legacy system and the service.


For inbound data the file gateway processing logic can detect file drops and leverage available broker features to perform Data Model Transformation and Data Format Transformation. On the outbound side, this logic intercepts information produced by services and packages them (with possible transformation) into new or existing files for consumption by the legacy system.


The type of logic provided by this pattern is unsuitable when immediate replies are required by either service or legacy system. Deployment and governance of two-way file processing logic can further add to operational complexity and may require specialized administration skills.



File Gateway: File gateway logic acts as a mediator between a service and a flat-file-based legacy system.

File gateway logic acts as a mediator between a service and a flat-file-based legacy system.

SOA Design Patterns

This page contains excerpts from:

SOA Design Patterns by Thomas Erl

(ISBN: 0136135161, Hardcover, Full-Color, 400+ Illustrations, 865 pages)

For more information about this book, visit