Jump To Close Expand all Collapse all Table of contents Smooks User Guide Preface 1. Preface Expand section "1. Preface" Collapse section "1. Preface" 1.1. Business Integration 1.2. What is a Service-Oriented Architecture? 1.3. Key Points of a Service-Oriented Architecture 1.4. What is the JBoss Enterprise SOA Platform? 1.5. The Service-Oriented Architecture Paradigm 1.6. Core and Components 1.7. Components of the JBoss Enterprise SOA Platform 1.8. JBoss Enterprise SOA Platform Features 1.9. Features of the JBoss Enterprise SOA Platform's JBossESB Component 1.10. Task Management 1.11. Integration Use Case 1.12. Utilising the JBoss Enterprise SOA Platform in a Business Environment 2. Introduction Expand section "2. Introduction" Collapse section "2. Introduction" 2.1. Intended Audience 2.2. Aim of the Guide 2.3. Back Up Your Data 2.4. Red Hat Documentation Site 3. Basics Expand section "3. Basics" Collapse section "3. Basics" 3.1. Smooks 3.2. Visitor Logic in Smooks 3.3. Message Fragment Processing 3.4. Basic Processing Model 3.5. Supported Models 3.6. FreeMarker 3.7. Example of Using SAX 3.8. Cartridges 3.9. Supplied Cartridges 3.10. Selectors 3.11. Using Selectors 3.12. Declaring Namespaces 3.13. Filtering Process Selection 3.14. Example of Setting the Filter Type to SAX in Smooks 1.3 3.15. DomModelCreator 3.16. Mixing the DOM and SAX Models 3.17. Configuring the DomModelCreator 3.18. Further Information about the DomModelCreator 3.19. The Bean Context 3.20. Configuring Bean Contexts 3.21. Pre-Installed Beans 3.22. Multiple Outputs/Results 3.23. Creating "In-Result" Instances 3.24. Supported Result Types 3.25. Event Stream Results 3.26. During the Filtering Process 3.27. Checking the Smooks Execution Process 3.28. Terminating the Filtering Process 3.29. Global Configuration Settings 3.30. Global Configuration Parameters 3.31. Default Properties 3.32. Default Properties Example Configuration 3.33. Default Property Options 3.34. Filter Settings 3.35. Filter Options 4. Consuming Input Data Expand section "4. Consuming Input Data" Collapse section "4. Consuming Input Data" 4.1. Stream Readers 4.2. XMLReader Configurations 4.3. Setting Features on the XML Reader 4.4. Configuring the CSV Reader 4.5. Defining Configurations 4.6. Binding CSV Records to Java Objects 4.7. Configuring the CSV Reader for Record Sets 4.8. Configuring the Fixed-Length Reader 4.9. Configuring Fixed-Length Records 4.10. Configuring the Fixed-Length Reader Programmatically 4.11. EDI Processing 4.12. EDI Processing Terms 4.13. EDI to SAX 4.14. EDI to SAX Event Mapping 4.15. Segment Definitions 4.16. Segment Terms 4.17. The Type Attribute 4.18. The EDIReaderConfigurator 4.19. The Edifact Java Compiler 4.20. Edifact Java Compiler Example 4.21. Executing the Edifact Java Compiler 4.22. Maven Plug-in Parameters for the Edifact Java Compiler 4.23. Executing the Edifact Java Compiler with Ant 4.24. UN/EDIFACT Message Interchanges 4.25. Using UN/EDIFACT Interchanges with the edi:reader 4.26. Configuring Smooks to Consume a UN/EDIFACT Interchange 4.27. The mappingModel 4.28. Configuring the mappingModel 4.29. Processing a D03B UN/EDIFACT Message Interchange 4.30. Processing JSON Data 4.31. Using Characters Not Allowed in XML when Processing JSON Data 4.32. Configuring YAML Streams 4.33. Supported Result Types 4.34. Using Characters Not Allowed in XML when Processing YAML Data 4.35. Options for Replacing XML in YAML 4.36. Anchors and Aliases in YAML 4.37. Java Object Graph Transformation 4.38. String Manipulation on Input Data 5. Validation Expand section "5. Validation" Collapse section "5. Validation" 5.1. Rules in Smooks 5.2. Configuring Rules in Smooks 5.3. Mandatory Configurations for the rules:ruleBase Configuration Element 5.4. Rule Providers 5.5. The RegexProvider 5.6. Configuring a Regex ruleBase 5.7. The MVEL Provider 5.8. Configuring an MVEL ruleBase 5.9. The Smooks Validation Cartridge 5.10. Configuring Validation Rules 5.11. Configuring Validation Exceptions 5.12. Rule Bases 5.13. Smooks.filterSource 5.14. The Validation Cartridge and Messages 5.15. Types of Validation 5.16. Running Validation Rules 5.17. RuleBase Example 5.18. Message Data Validation 5.19. Using an MVEL Expression 6. Producing Output Data Expand section "6. Producing Output Data" Collapse section "6. Producing Output Data" 6.1. The Smooks Javabean Cartridge 6.2. Javabean Cartridge Features 6.3. Javabean Cartridge Example 6.4. Javabean Elements 6.5. Javabean Conditions 6.6. Javabean Cartridge Data Bindings 6.7. Binding Data 6.8. Binding Data Configurations 6.9. Binding Tips 6.10. DataDecoder/DataEncoder Implementations 6.11. DataDecoder/DataEncoder Date Example 6.12. DataDecoder/DataEncoder SqlTimestamp Example 6.13. DataDecoder/DataEncoder decodeParam Example 6.14. Number-Based DataDecoder/DataEncoder Implementations 6.15. Number-Based DataDecoder/DataEncoder Example 6.16. Number-Based DataDecoder/DataEncoder Integer Example 6.17. Number-Based DataDecoder/DataEncoder decodeParam Example 6.18. Using the Mapping Decoder to Bind 6.19. The Enum Decoder 6.20. Enum Decoder Example 6.21. BeanContext Configuration 6.22. Javabean Cartridge Actions 6.23. Pre-processing String Data 6.24. Pre-processing Example 6.25. The Javabean Cartridge and Factories 6.26. Instantiate an ArrayList Object Using a Static Factory Method 6.27. Declaring Definition Language 6.28. Using Your Own Definition Language 6.29. The MVEL Language 6.30. MVEL Example 6.31. Extracting a List Object with MVEL 6.32. The jb:value Property 6.33. jb:value Property Example 6.34. Virtual Object Models 6.35. Virtual Object Model Example 6.36. Merging Multiple Data Entities Into a Single Binding 6.37. Value Binding 6.38. Value Binding Attributes 6.39. Value Binding Example 6.40. Programmatic Value Binding Example 6.41. Java Binding in Smooks 6.42. Java Binding Example 6.43. The org.milyn.javabean.gen.ConfigGenerator Utility Class 6.44. org.milyn.javabean.gen.ConfigGenerator Example 6.45. Programming the Binding Configuration 6.46. Configuring Transformations 6.47. jb:result Configuration Example 7. Templates Expand section "7. Templates" Collapse section "7. Templates" 7.1. Smooks Templates 7.2. FreeMarker Templates 7.3. FreeMarker Template Examples 7.4. Inlining in Smooks 7.5. The ftl:bindTo Element 7.6. ftl:bindTo Example 7.7. The ftl:outputTo Element 7.8. ftl:outputTo Example 7.9. Configuring Transformations 7.10. FreeMarker and the Java Bean Cartridge 7.11. NodeModel Example 7.12. Programmatic Configuration 7.13. XSL Templates 7.14. XSL Example 7.15. Points to Note Regarding XSL Support 7.16. Potential Issue: XSLT Works Externally but not Within Smooks 8. Enriching Output Data Expand section "8. Enriching Output Data" Collapse section "8. Enriching Output Data" 8.1. Out-of-the-Box Enrichment Methods 8.2. Hibernation Example 8.3. Hibernate Entities 8.4. Processing and Persisting an Order 8.5. Executing Smooks with a SessionRegister Object 8.6. Persisting an Order with DAO 9. "Groovy" Scripting Expand section "9. "Groovy" Scripting" Collapse section "9. "Groovy" Scripting" 9.1. Groovy 9.2. Groovy Example 9.3. Groovy Tips 9.4. Imports 9.5. Using Mixed-DOM-and-SAX with Groovy 9.6. Mixed-DOM-and-SAX Tips 9.7. Mixed-DOM-and-SAX Example 10. Routing Output Data Expand section "10. Routing Output Data" Collapse section "10. Routing Output Data" 10.1. Output Data Options 10.2. Routing with Apache Camel 11. Performance Tuning Expand section "11. Performance Tuning" Collapse section "11. Performance Tuning" 11.1. Performance Tuning Tips 12. Testing Expand section "12. Testing" Collapse section "12. Testing" 12.1. Unit Testing 13. Common Use Cases Expand section "13. Common Use Cases" Collapse section "13. Common Use Cases" 13.1. Support for Processing Huge Messages 13.2. Transforming Huge Messages with FreeMarker 13.3. Huge Messages and NodeModels 13.4. Configuring Smooks to Capture Multiple NodeModels 13.5. Message Splitting Requirements 13.6. Streaming Split Messages Through Smooks 13.7. Methods for Creating Split Messages 13.8. Serializing Messages 13.9. Routing Split Messages Example 13.10. File-based Routing 13.11. File-based Routing Components 13.12. Huge Message Processing 13.13. JMS Routing 13.14. Routing to a Database 14. Extending Smooks Expand section "14. Extending Smooks" Collapse section "14. Extending Smooks" 14.1. APIs in Smooks 14.2. Configuring Smooks Components 14.3. Namespace-specific Configurations 14.4. Namespace-specific Configuration Example 14.5. Runtime Representation 14.6. Configuration Annotations 14.7. The @ConfigParam Annotation 14.8. @ConficParam Benefits 14.9. Using the @ConfigParam Annotation 14.10. The @Config Annotation 14.11. Using the @Config Annotation 14.12. @Initialize and @Uninitialize 14.13. A Basic Initialization/Un-initialization Sequence 14.14. Using @Initialize and @Uninitialize 14.15. Defining Custom Configuration Namespaces 14.16. Using Custom Configuration Namespaces 14.17. Implementing a Source Reader 14.18. Implementing a Source Reader for use with Smooks 14.19. Configuring the Reader with java-binding-config.xml Example 14.20. Tips for Using a Reader 14.21. Binary Source Readers 14.22. Implementing a Binary Source Reader 14.23. Visitor Implementations 14.24. Supported Visitor Implementations 14.25. SAX and DOM Visitor Implementations 14.26. The SAX Visitor API 14.27. SAX Visitor API Interfaces 14.28. SAX Visitor API Example 14.29. Text Accumulation with SAX 14.30. org.milyn.delivery.sax.SAXElement 14.31. Text Accumulation Example 14.32. The @TextConsumer Annotation 14.33. @TextConsumer Example 14.34. StreamResult Writing/Serialization 14.35. Configuring StreamResult Writing/Serialization 14.36. Implementing the SAXVisitor 14.37. SAXVisitor Implementation Example 14.38. The SAXElement.setWriter 14.39. StreamResultWriter Example 14.40. SAXToXMLWriter 14.41. SAXToXMLWriter Example 14.42. Configuring the SAXToXMLWriter 14.43. Visitor Configuration 14.44. Example Visitor Configuration 14.45. The ExecutionLifecycleCleanable 14.46. The VisitLifecycleCleanable 14.47. The ExecutionContext 14.48. The ApplicationContext 15. Apache Camel Integration Expand section "15. Apache Camel Integration" Collapse section "15. Apache Camel Integration" 15.1. Apache Camel-Smooks Integration 15.2. Methods of Using Smooks in Apache Camel 15.3. SmooksComponent 15.4. Using the SmooksComponent 15.5. SmooksComponent Configuration 15.6. SmooksDataFormat 15.7. SmooksDataFormat Example 15.8. SmooksProcessor 15.9. SmooksProcessor Example 15.10. Camel Properties 16. Integrating Smooks With the JBoss Enterprise SOA Platform Expand section "16. Integrating Smooks With the JBoss Enterprise SOA Platform" Collapse section "16. Integrating Smooks With the JBoss Enterprise SOA Platform" 16.1. Message Transformation 16.2. The resource-config Property 16.3. Input/Output Configuration 16.4. Java Output Configuration 16.5. Profile-Based Transformation 16.6. Transform_XML2POJO2 16.7. Transform_XML2POJO2 Files A. Revision History Legal Notice Settings Close Language: 日本語 English Language: 日本語 English Format: Multi-page Single-page PDF Format: Multi-page Single-page PDF Language and Page Formatting Options Language: 日本語 English Language: 日本語 English Format: Multi-page Single-page PDF Format: Multi-page Single-page PDF Red Hat Training A Red Hat training course is available for JBoss Enterprise SOA Platform Preface Previous Next