JMS系列(四)-oracle esb 发送JMS消息

本文详细介绍了如何使用Oracle ESB与JMS进行消息交互的过程,包括创建Business Service和Proxy Service,设置JMS消息头,以及使用Postman进行测试的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在实际项目上,一般是通过服务总线跟jms交互,oracle esb是oracle公司提供的服务总线产品简称osb,支持多种协议。

创建osb business service

  1. 创建business service

  1. 服务类型选择Messaging Service

  1. 请求消息类型选择Text

  1. 协议选择jms URI输入jms://host:port/jms.jms_test_connection_factory1/jms.jms_test_queue如果jndi名字中带有/需要将/替换为.如jms队列名称为jms/queue在URI中需要替换为jms.queue,输入完后点击add

  1. 类型选择Queue如果要往jms主题中发送消息则选择Topic,消息类型选择Text

  1. 后面就全部默认到最后一步
  2. Active后测试该服务

image.png

创建osb proxy service

business service是无法被第三方调用,要通过proxy service做代理才可被调用

  1. 创建 proxy service

  1. 服务类型选择基于business service并将上面创建的business service选中

  1. 请求消息类型选择Text响应消息类型选择Nonejms都是异步服务不需要Response

  1. 协议选择http,Endpoint URI是http调用的地址,Get All Headers选择Yes

  1. 请求和响应都输入utf-8,后面一路默认到结束

  1. 测试proxy service

设置jms消息头

如图在osb如何设置jms消息头信息

  1. 打开proxy service

  1. 创建Transport Headers

  1. Header名称选择JMSType这里以该字段为例其他字段类似,Set Header to输入'oracle osb'


  1. 测试

  1. postman测试

ORACLE OSB开发指南,英文版。 目录: Part I IDE Help for Oracle Service Bus 1 Introduction to Oracle Service Bus 2 Tasks Working with Projects, Folders, Resources, and Configurations ................................................... 2-1 Resource Naming Restrictions ......................................................................................................... 2-2 Editing Resources.............................................................................................................................. 2-2 Cloning Oracle Service Bus Projects and Folders.......................................................................... 2-2 Creating Oracle Service Bus Configuration Projects..................................................................... 2-3 Creating Oracle Service Bus Projects............................................................................................... 2-3 Creating Servers ................................................................................................................................ 2-3 Creating Custom Resources.............................................................................................................. 2-4 Creating and Editing JNDI Provider Resources ............................................................................ 2-4 Creating Proxy Server Resources..................................................................................................... 2-5 Creating Message Format Files ........................................................................................................ 2-5 Exporting Resources .......................................................................................................................... 2-5 Using the Export Wizard ........................................................................................................... 2-6 Using the Command Line or a Script to Export an Oracle Service Bus Configuration.... 2-6 Before You Begin.................................................................................................................. 2-6 Exporting a Configuration Using the Command Line................................................... 2-6 Exporting a Configuration Using Ant .............................................................................. 2-8 Exporting a Configuration Using WLST .......................................................................... 2-9 Generating an Effective WSDL ........................................................................................................ 2-9 Modifying JAR Dependencies.......................................................................................................... 2-9 Importing Resources......................................................................................................................... 2-9 Using the Import Wizard........................................................................................................ 2-10 Using the Command Line or a Script to Import an Oracle Service Bus Configuration. 2-10 Creating Service Account Resources............................................................................................ 2-10 Creating Service Key Provider Resources ................................................................................... 2-10 Creating SMTP Server Resources ................................................................................................. 2-11 iv Creating XQuery Transformations ............................................................................................... 2-11 Creating XSL Transformations...................................................................................................... 2-11 Working with Business Services ........................................................................................................ 2-11 Creating Business Services............................................................................................................. 2-11 Generating a Business Service from an Existing Service.................................................... 2-12 Generating a JCA Business Service from an Outbound JCA File ............................................ 2-12 Generating a Business Service from Oracle Enterprise Repository......................................... 2-13 Re-generating an Existing Business Service from Oracle Enterprise Repository ........... 2-13 Editing Business Services............................................................................................................... 2-13 Working with Proxy Services .............................................................................................................. 2-13 Creating Proxy Services ................................................................................................................. 2-13 Generating a Proxy Service from an Existing Service ........................................................ 2-14 Generating a JCA Proxy Service from an Inbound JCA File .................................................... 2-14 Consuming Oracle Service Bus Proxy Services in Oracle JDeveloper with WSIL ................ 2-15 Editing Proxy Services.................................................................................................................... 2-16 Working with Proxy Service Message Flows................................................................................... 2-16 Constructing Proxy Service Message Flows................................................................................ 2-17 Adding and Configuring Alert Actions in Message Flows ...................................................... 2-18 Adding and Configuring Assign Actions in Message Flows ................................................... 2-18 Adding and Configuring Conditional Branch Nodes in Message Flows............................... 2-19 Adding and Configuring Delete Actions in Message Flows .................................................... 2-19 Adding and Configuring Dynamic Publish Actions in Message Flows ................................. 2-20 Adding and Configuring Dynamic Routing Actions in Message Flows ................................ 2-20 Adding and Configuring Error Handlers in Message Flows ................................................... 2-20 Adding and Configuring For-Each Actions in Message Flows................................................ 2-21 Adding and Configuring If-Then Actions in Message Flows .................................................. 2-21 Adding and Configuring Insert Actions in Message Flows ..................................................... 2-22 Adding and Configuring Java Callout Actions in Message Flows.......................................... 2-22 Adding and Configuring Log Actions in Message Flows......................................................... 2-22 Adding and Configuring MFL Transform Actions in Message Flows ................................... 2-23 Adding and Configuring Operational Branch Nodes in Message Flows............................... 2-23 Adding and Configuring Pipeline Pair Nodes in Message Flows........................................... 2-24 Adding and Configuring Publish Actions in Message Flows .................................................. 2-24 Adding and Configuring Publish Table Actions in Message Flows ....................................... 2-24 Adding and Configuring Raise Error Actions in Message Flows............................................ 2-25 Adding and Configuring Rename Actions in Message Flows ................................................. 2-26 Adding and Configuring Replace Actions in Message Flows.................................................. 2-26 Adding and Configuring Reply Actions in Message Flows ..................................................... 2-27 Adding and Configuring Report Actions in Message Flows ................................................... 2-27 Adding and Configuring Resume Actions in Message Flows ................................................. 2-27 Adding and Configuring Route Nodes in Message Flows ....................................................... 2-28 Adding and Configuring Routing Actions in Message Flows ................................................. 2-28 Adding and Configuring Routing Options Actions in Message Flows .................................. 2-28 Adding and Configuring Routing Table Actions in Message Flows ...................................... 2-29 Adding and Configuring Service Callout Actions in Message Flows..................................... 2-29 Adding and Configuring Skip Actions in Message Flows........................................................ 2-30 Adding and Configuring Stages in Message Flows................................................................... 2-30 v Adding and Configuring Transport Headers Actions in Message Flows .............................. 2-30 Adding and Configuring Validate Actions in Message Flows................................................. 2-31 Working with Alert Destinations....................................................................................................... 2-31 Creating and Editing Alert Destinations ..................................................................................... 2-31 Adding E-mail Recipients to Alert Destinations ........................................................................ 2-32 Adding JMS Destinations to Alert Destinations......................................................................... 2-32 Working with MQ Connections ......................................................................................................... 2-32 Adding and Editing MQ Connections ......................................................................................... 2-32 Working with Oracle Enterprise Repository and Harvester ......................................................... 2-33 Generating Business Services from Oracle Enterprise Repository .......................................... 2-33 Using Harvester.............................................................................................................................. 2-35 Using Harvester from Eclipse ................................................................................................ 2-35 Using Harvester from the Command Line or a Script ....................................................... 2-36 Performing Queries in Oracle Enterprise Repository from Eclipse......................................... 2-37 Working with UDDI Registries.......................................................................................................... 2-38 Adding and Configuring UDDI Registries ................................................................................. 2-38 Importing Business Services From a UDDI Registry................................................................. 2-38 Working with Split-Join....................................................................................................................... 2-39 Introduction to Split-Join ............................................................................................................... 2-39 Using Split-Join with Content in SOAP Headers ................................................................ 2-39 Transaction Support ................................................................................................................ 2-40 Security with Split-Joins.......................................................................................................... 2-40 Designing a Split-Join ..................................................................................................................... 2-41 Initial Setup.............................................................................................................................. 2-41 Creating/Importing a WSDL Containing the Base Operation .................................. 2-41 Creating/Importing a Business Service to Use the Split-Join .................................... 2-41 Designing a Static Split-Join .......................................................................................................... 2-41 1. Creating a New Split-Join ................................................................................................... 2-42 2. Adding an Assign ................................................................................................................ 2-42 3. Adding a Parallel Node ...................................................................................................... 2-43 4. Adding an Assign for Each Branch ................................................................................... 2-43 5. Adding an Invoke Service .................................................................................................. 2-43 6. Adding an Assign for Each Branch ................................................................................... 2-43 7. Exporting and Testing the Split-Join................................................................................. 2-44 Designing a Dynamic Split-Join.................................................................................................... 2-44 1. Creating a New Split-Join ................................................................................................... 2-45 2. Adding an Assign ................................................................................................................ 2-46 3. Adding a For Each ............................................................................................................... 2-46 4. Adding an Assign ................................................................................................................ 2-47 5. Adding an Invoke Service .................................................................................................. 2-47 6. Adding an Assign ................................................................................................................ 2-47 7. Adding an Error Handler ................................................................................................... 2-47 8. Exporting and Testing the Split-Join................................................................................. 2-47 Creating a New Split-Join .............................................................................................................. 2-48 Configuring the Start Node ........................................................................................................... 2-49 Adding General Information.................................................................................................. 2-50 Defining Global Variables....................................................................................................... 2-50 vi Viewing External Services ...................................................................................................... 2-51 Configuring a Receive .................................................................................................................... 2-51 Viewing the Operation............................................................................................................ 2-51 Defining the Receive Variable................................................................................................ 2-51 Adding General Information.................................................................................................. 2-52 Creating an Assign......................................................................................................................... 2-52 Adding and Configuring Assign Operations ...................................................................... 2-52 Adding an Operation to an Assign ................................................................................ 2-53 Adding a Copy Operation............................................................................................... 2-53 Adding General Information.................................................................................................. 2-54 Invoking a Service.......................................................................................................................... 2-54 Selecting an Operation ............................................................................................................ 2-54 Defining Input and Output Variables................................................................................... 2-54 Adding General Information.................................................................................................. 2-55 Creating a Parallel ........................................................................................................................... 2-55 Adding Nodes .......................................................................................................................... 2-55 Adding General Information.................................................................................................. 2-56 Creating a For Each......................................................................................................................... 2-56 Defining the For Each Logic ................................................................................................... 2-56 Adding General Information.................................................................................................. 2-57 Creating an If Activity .................................................................................................................... 2-57 Configuring the If ................................................................................................................... 2-57 Writing the logic of the condition................................................................................... 2-58 Adding resulting nodes ................................................................................................... 2-58 Adding General Information .......................................................................................... 2-58 Adding and Configuring Else If ........................................................................................... 2-58 Writing the Logic of the Condition ................................................................................ 2-58 Adding Resulting Nodes ................................................................................................. 2-59 Adding General Information .......................................................................................... 2-59 Configuring the Else................................................................................................................ 2-59 Adding Resulting Nodes ................................................................................................. 2-59 Adding General Information.................................................................................................. 2-59 Creating an Error Handler............................................................................................................. 2-59 Creating a Raise Error..................................................................................................................... 2-60 Configuring a Reply........................................................................................................................ 2-60 Viewing the Operation............................................................................................................ 2-61 Defining the Reply Variable ................................................................................................... 2-61 Adding General Information.................................................................................................. 2-62 About Scope .................................................................................................................................... 2-62 Scope and Variables................................................................................................................. 2-62 Exporting and Testing a Split-Join................................................................................................ 2-63 Creating a Transport Typed Business Service ..................................................................... 2-63 Exporting the Split-Join Files.................................................................................................. 2-63 Exporting from the Business Service Menu.................................................................. 2-64 Auto-export ....................................................................................................................... 2-64 Manual export ................................................................................................................... 2-64 Testing the Split-Join in the Test Console............................................................................. 2-65 vii Exporting from the Business Service Menu.................................................................. 2-65 Using the Oracle Service Bus Debugger........................................................................................... 2-65 Enabling Debugging ....................................................................................................................... 2-66 Using Standard Debugging ........................................................................................................... 2-66 Debug Views............................................................................................................................ 2-67 Step Actions and Breakpoints ................................................................................................ 2-68 Using the Oracle Service Bus Debugger Launch Configuration.............................................. 2-68 Remote Debugging .................................................................................................................. 2-69 Debugging Oracle Service Bus Running Stand-Alone on a Managed Server................. 2-69 Server Sharing .......................................................................................................................... 2-69 3 Transport Configuration Protocol-Specific Transport Configuration Pages.............................................................................. 3-1 BPEL-10g Transport Configuration Page (Business Services)..................................................... 3-2 DSP Transport Configuration Page (Business Services)............................................................... 3-3 EJB Transport Configuration Page (Business Services)................................................................ 3-4 E-Mail Transport Configuration Page (Business Services) .......................................................... 3-5 E-Mail Transport Configuration Page (Proxy Services) ............................................................... 3-6 File Transport Configuration Page (Business Services)................................................................ 3-7 File Transport Configuration Page (Proxy Services)..................................................................... 3-7 FTP Transport Configuration Page (Business Services) ............................................................... 3-8 FTP Transport Configuration Page (Proxy Services) .................................................................... 3-9 HTTP Transport Configuration Page (Business Services) ........................................................ 3-10 HTTP Transport Configuration Page (Proxy Services) ............................................................. 3-13 JCA Transport Configuration Page (Proxy and Business Services)......................................... 3-15 JEJB Transport Configuration Page (Business Services)............................................................ 3-17 JEJB Transport Configuration Page (Proxy Services) ................................................................ 3-19 JMS Transport Configuration Page (Business Services)............................................................ 3-20 JMS Transport Configuration Page (Proxy Services)................................................................. 3-23 MQ Transport Configuration Page (Business Services) ............................................................ 3-27 MQ Transport Configuration Page (Proxy Services) ................................................................. 3-29 SB Transport Configuration Page (Business Services)............................................................... 3-31 SB Transport Configuration Page (Proxy Services) ................................................................... 3-32 SFTP Transport Configuration Page (Business Services).......................................................... 3-33 SFTP Transport Configuration Page (Proxy Services)............................................................... 3-33 SOA-DIRECT Transport Configuration Page (Business Services)........................................... 3-35 Tuxedo Transport Configuration Page (Business Services)...................................................... 3-37 Tuxedo Transport Configuration Page (Proxy Services)........................................................... 3-38 WS Transport Configuration Page (Business Services) ............................................................. 3-40 WS Transport Configuration Page (Proxy Services).................................................................. 3-40 4 User Interface Reference Alerts.......................................................................................................................................................... 4-1 Alert Destination Editor .................................................................................................................... 4-2 Edit E-mail Recipient Page ............................................................................................................... 4-2 Edit JMS Destination Page ................................................................................................................ 4-3 viii Business Service Configuration ............................................................................................................ 4-3 Business Service General Configuration Page ............................................................................... 4-3 Business Service Editor Options ............................................................................................... 4-4 Business Service Message Type Configuration Page.................................................................... 4-4 Business Service SOAP Binding Configuration Page ................................................................... 4-6 Business Service Transport Configuration Page ........................................................................... 4-6 Business Service Message Handling Configuration Page......................................................... 4-10 Business Service - Service Policy Configuration Page ............................................................... 4-13 Business Service Security Configuration Page............................................................................ 4-14 Proxy Service Configuration............................................................................................................... 4-15 Proxy Service General Configuration Page................................................................................. 4-15 Proxy Service Editor Options................................................................................................. 4-15 Proxy Service Message Type Configuration Page...................................................................... 4-16 Proxy Service Operation Selection Configuration Page ............................................................ 4-18 Proxy Service Message Handling Configuration Page.............................................................. 4-21 Proxy Service SOAP Binding Configuration Page .................................................................... 4-24 Proxy Service Transport Configuration Page ............................................................................. 4-25 Proxy Service - Service Policy Configuration Page ................................................................... 4-27 Proxy Service Security Configuration Page ................................................................................ 4-28 Oracle Service Bus Configurations and Projects............................................................................. 4-30 Oracle Service Bus Configurations View..................................................................................... 4-30 New Oracle Service Bus Configuration Project Wizard............................................................ 4-31 Oracle Service Bus Configuration Page ....................................................................................... 4-31 New Oracle Service Bus Project .................................................................................................... 4-32 Custom Resources ................................................................................................................................ 4-32 New Custom Resource Wizard..................................................................................................... 4-33 New Custom Resource Editor....................................................................................................... 4-33 New Custom Resource - Resource Type Page ........................................................................... 4-33 Custom MQ Resource Configuration Page ................................................................................ 4-33 Export Wizard........................................................................................................................................ 4-34 Export Wizard - Oracle Service Bus Configuration JAR Export Page..................................... 4-34 Export Wizard - Export to Server - Select Resources Page ....................................................... 4-35 Export Wizard - Export to Server - Review Resources Page .................................................... 4-36 Import Wizard ....................................................................................................................................... 4-36 Import Wizard - Config JAR Import - Load Resources Page ................................................... 4-36 Import Wizard - Config JAR Import - Review Resources Page ............................................... 4-37 Import Wizard - Config ZIP Import - Load Resources Page .................................................... 4-37 Import Wizard - Config ZIP Import - Review Resources Page................................................ 4-37 Import Wizard - URL Import - Load Resources Page ............................................................... 4-38 Import Wizard - URL Import - Review Resources Page ........................................................... 4-38 JNDI Providers...................................................................................................................................... 4-38 JNDI Provider Editor...................................................................................................................... 4-38 New JNDI Provider Resource Wizard ......................................................................................... 4-39 Proxy Servers ........................................................................................................................................ 4-39 Message Flow Design Palette ............................................................................................................. 4-40 Message Flow Nodes ...................................................................................................................... 4-40 Message Flow Route Actions - Communication Actions.......................................................... 4-41 ix Message Flow Route Actions - Flow Control Actions ............................................................... 4-41 Message Flow Stage Actions - Communication Actions........................................................... 4-42 Message Flow Stage Actions - Flow Control Actions ................................................................ 4-42 Message Flow Stage Actions - Message Processing Actions .................................................... 4-43 Message Flow Stage Actions - Reporting Actions...................................................................... 4-44 Message Flow Editor............................................................................................................................ 4-44 Alert Action Properties................................................................................................................... 4-46 Assign Action Properties ............................................................................................................... 4-46 Conditional Branch Node Properties ........................................................................................... 4-47 Delete Action Properties ................................................................................................................ 4-48 Dynamic Publish Action Properties ............................................................................................. 4-49 Dynamic Routing Action Properties ............................................................................................ 4-50 Error Handler Node Properties..................................................................................................... 4-50 For-Each Action Properties............................................................................................................ 4-50 If-Then Action Properties............................................................................................................... 4-51 If Action and Else-If Action Properties................................................................................. 4-52 Else Action Properties ............................................................................................................. 4-52 Insert Action Properties ................................................................................................................. 4-52 Java Callout Action Properties ...................................................................................................... 4-53 Log Action Properties..................................................................................................................... 4-55 Message Flow Properties - Comment .......................................................................................... 4-56 Message Flow Properties - Namespaces ..................................................................................... 4-56 Message Flow Properties - Variables .......................................................................................... 4-56 MFL Transform Action Properties................................................................................................ 4-56 Operational Branch Node Properties ........................................................................................... 4-57 Pipeline Pair Node Properties ....................................................................................................... 4-58 Publish Action Properties .............................................................................................................. 4-59 Publish Table Action Properties.................................................................................................... 4-59 Publish Table Properties ......................................................................................................... 4-60 Case Action Properties ............................................................................................................ 4-60 Publish Action Properties ....................................................................................................... 4-61 Raise Error Action Properties........................................................................................................ 4-61 Transactions............................................................................................................................. 4-61 Rename Action Properties ............................................................................................................. 4-61 Replace Action Properties.............................................................................................................. 4-62 Reply Action Properties ................................................................................................................. 4-63 Report Action Properties................................................................................................................ 4-64 Resume Action Properties ............................................................................................................. 4-65 Route Node Properties ................................................................................................................... 4-65 Routing Action Properties ............................................................................................................. 4-66 Routing Options Action Properties .............................................................................................. 4-66 Routing Table Action Properties................................................................................................... 4-67 Routing Table Properties ........................................................................................................ 4-68 Case Action Properties ............................................................................................................ 4-69 Routing Action Properties ...................................................................................................... 4-69 Service Callout Action Properties................................................................................................. 4-69 Skip Action Properties.................................................................................................................... 4-72 x Stage Node Properties .................................................................................................................... 4-72 Transport Headers Action Properties .......................................................................................... 4-72 Validate Action Properties............................................................................................................. 4-74 Modify JAR Dependencies Dialog .................................................................................................... 4-75 SMTP Servers........................................................................................................................................ 4-75 Edit SMTP Server Page................................................................................................................... 4-76 New SMTP Server Resource Wizard............................................................................................ 4-76 UDDI Registry Configuration Page................................................................................................... 4-76 Outline view - Oracle Service Bus ..................................................................................................... 4-77 Resource Management ......................................................................................................................... 4-77 Preferences dialog - Oracle Service Bus - Type Associations Page.......................................... 4-77 References View .............................................................................................................................. 4-78 Select Clone Target Dialog............................................................................................................. 4-78 Select a Resource Dialog................................................................................................................. 4-78 New Service Key Provider Resource ................................................................................................. 4-78 New WS-Policy ..................................................................................................................................... 4-79 Service Accounts................................................................................................................................... 4-79 New Service Account Resource .................................................................................................... 4-80 Service Account Editor - General Configuration Page .............................................................. 4-80 Service Account Editor - Static User Configuration Page ......................................................... 4-80 Service Account Editor - User Mappings Configuration Page................................................. 4-81 Expression Editors ............................................................................................................................... 4-81 XQuery/XSLT Expression Editor ................................................................................................. 4-81 XPath Expression Editor ................................................................................................................ 4-82 Condition Editor............................................................................................................................. 4-82 Condition Builder Page .................................................................................................................. 4-83 Expression Page.............................................................................................................................. 4-83 XQuery Resource Page ................................................................................................................... 4-83 XSLT Resource Page ....................................................................................................................... 4-84 Dynamic XQuery Page ................................................................................................................... 4-84 Variable Structures Page ................................................................................................................ 4-85 Namespace Definitions Page......................................................................................................... 4-85 XQuery Functions Page.................................................................................................................. 4-86 Add Variable Structure Dialog ..................................................................................................... 4-86 New XSL Transformation .................................................................................................................... 4-87 Split-Join User Interface Reference ................................................................................................... 4-87 Split-Join Design Palette................................................................................................................. 4-88 Operations................................................................................................................................ 4-88 Global / Start Node Properties ..................................................................................................... 4-90 Variable Properties......................................................................................................................... 4-90 Error Handler Properties ............................................................................................................... 4-91 Invoke Service Properties............................................................................................................... 4-91 Invoking Another Split-Join ................................................................................................... 4-92 Reply Properties .............................................................................................................................. 4-93 For Each Properties ......................................................................................................................... 4-93 If Properties..................................................................................................................................... 4-94 If and Else If Properties .................................................................................................................. 4-94 xi Parallel Properties ........................................................................................................................... 4-95 Raise Error Properties..................................................................................................................... 4-95 Repeat Until Properties .................................................................................................................. 4-95 Re-Raise Error Properties............................................................................................................... 4-95 Scope Properties .............................................................................................................................. 4-96 While Properties .............................................................................................................................. 4-96 Wait Properties ............................................................................................................................... 4-96 Assign Properties ............................................................................................................................ 4-97 Assign Operation Properties .................................................................................................. 4-97 Copy Properties.............................................................................................................................. 4-98 Delete Properties ............................................................................................................................. 4-98 Insert Properties .............................................................................................................................. 4-99 Java Callout Properties................................................................................................................. 4-100 Log Properties............................................................................................................................... 4-101 Replace Properties........................................................................................................................ 4-101 Receive Properties........................................................................................................................ 4-102 Counter Variable Dialog .............................................................................................................. 4-102 Create/Edit Variable Dialog........................................................................................................ 4-102 Scope and Variables............................................................................................................... 4-103 Create Message Variable Dialog ................................................................................................. 4-103 Service Browser ............................................................................................................................. 4-103 SOAP Fault Variable Dialog ........................................................................................................ 4-103 WSDL Browser .............................................................................................................................. 4-104 Split-Join Wizard - New Split-Join.............................................................................................. 4-104 Split-Join Wizard - Specify Operations ...................................................................................... 4-104 Part II XQuery Mapper 5 Introduction Overview of XQuery Mapper ................................................................................................................ 5-1 Support for XQuery 2002 and 2004........................................................................................................ 5-2 Restrictions Applicable to the XQuery Test View......................................................................... 5-2 6 Transforming Data Using XQuery Mapper Launching XQuery Mapper.................................................................................................................... 6-1 Importing the XQuery Mapper Sample Project ................................................................................. 6-1 Creating an XQuery Mapper Project .................................................................................................... 6-2 Importing and Creating Schema Files.................................................................................................. 6-2 Importing XML Schemas and MFL Files ........................................................................................ 6-3 Creating XML Schemas ..................................................................................................................... 6-4 Creating XML Files from XML Schemas ........................................................................................ 6-4 Creating WSDL Files.......................................................................................................................... 6-5 Creating MFL Files............................................................................................................................ 6-5 Selecting Source and Target Data Types.............................................................................................. 6-5 Creating Data Transformations ............................................................................................................. 6-7 Creating Basic Element Transformations ....................................................................................... 6-7 xii Prerequisite ................................................................................................................................. 6-7 Creating Element-to-Element Links......................................................................................... 6-7 Creating Basic Attribute Transformations...................................................................................... 6-8 Prerequisite ................................................................................................................................. 6-8 Creating an Attribute-to-Element Link.................................................................................... 6-8 Creating Complex Transformations................................................................................................ 6-9 Prerequisite ................................................................................................................................. 6-9 Creating a Complex Transformation ....................................................................................... 6-9 Editing Data Transformations............................................................................................................. 6-10 Viewing and Editing XQuery Files............................................................................................... 6-10 Creating Joins and Unions ............................................................................................................. 6-11 Creating If-Then-Else Expressions................................................................................................ 6-11 Creating For-Let-Where-Order By-Return (FLWOR) Expressions.......................................... 6-13 Creating Typeswitch Expressions................................................................................................. 6-14 Inserting XQuery Functions .......................................................................................................... 6-15 Inserting Expression Variables...................................................................................................... 6-16 Viewing Schema Properties........................................................................................................... 6-17 Restricting Output of Optional Elements ........................................................................................ 6-17 Testing Data Transformations............................................................................................................. 6-18 Features of the Test View............................................................................................................... 6-18 Related Topics .......................................................................................................................... 6-21 Graphical Features in Design View................................................................................................... 6-21 Right-Click Menu Options............................................................................................................. 6-21 Link Patterns................................................................................................................................... 6-22 Link Colors...................................................................................................................................... 6-23 XML Global Elements, Global Types, Local Elements, and Attributes...................................... 6-24 7 Examples: Data Transformation Using XQuery Mapper Combining Data from Different Schemas .......................................................................................... 7-1 Mapping Repeating Elements and Creating Joins ............................................................................ 7-4 Step 1. Create an XQuery File........................................................................................................... 7-4 Step 2. Add a Constraint ................................................................................................................... 7-6 Step 3. Add Data to Return Element ............................................................................................... 7-7 Step 4. Add Function to Calculate Value of Quote ....................................................................... 7-7 Step 5. Add a Constraint with Multiple Conditions ..................................................................... 7-9 Test the XQuery.............................................................................................................................. 7-10 Creating Unions.................................................................................................................................... 7-10 Creating Repeating-Source to Nonrepeating-Target Transformations ....................................... 7-12 Creating Nonrepeating-Source to Repeating-Target Transformation......................................... 7-14 Creating Nested If-Then-Else Expressions....................................................................................... 7-17 Step 1. Create the XQuery Transformation ................................................................................. 7-18 Step 2. Create the First "If" Condition .......................................................................................... 7-19 Step 3. Create the First Nested If-Then-Else Condition............................................................. 7-20 Step 4. Create the Second Nested If-Then-Else Condition ........................................................ 7-20 Creating FLWOR Expressions............................................................................................................. 7-21 Using Recursive Schemas.................................................................................................................... 7-23 Grouping Data by Key Fields ............................................................................................................. 7-25 xiii 8 Upgrading XQuery Code Upgrading Inline XQuery Code ............................................................................................................ 8-1 Upgrading XQuery Files ......................................................................................................................... 8-2 Part III Format Builder 9 Introduction Overview................................................................................................................................................... 9-1 10 Format Builder Main Window Using the Menu Bar .............................................................................................................................. 10-1 Using the Toolbar ................................................................................................................................. 10-1 Using the Tree Pane.............................................................................................................................. 10-2 Using the Shortcut Menus................................................................................................................... 10-3 Using Drag and Drop ........................................................................................................................... 10-3 Valid Names .......................................................................................................................................... 10-4 11 Message Format Detail Window 12 Field Detail Window 13 Group Detail Window 14 Reference Detail Window 15 Comment Detail Window 16 Format Builder Options 17 Importing Metadata Importing a Guideline XML File........................................................................................................ 17-1 Importing an XML Schema ................................................................................................................. 17-1 Importing a COBOL Copybook ......................................................................................................... 17-2 Importing C Structures........................................................................................................................ 17-3 Starting the C Structure Importer ...................................................................................................... 17-3 Generating MFL Data........................................................................................................................... 17-4 Generating C Code............................................................................................................................... 17-4 Importing an FML Field Table Class ................................................................................................ 17-5 FML Field Table Class Importer Prerequisites .......................................................................... 17-5 Sample FML Field Table Class Files ............................................................................................ 17-6 Creating XML with the FML Field Table Class Importer ........................................................ 17-6 18 Format Tester Format Tester Window ......................................................................................................................... 18-1 xiv Format Tester Menus ............................................................................................................................ 18-1 File Menu ............................................................................................................................................... 18-1 Edit Menu .............................................................................................................................................. 18-2 Display Menu........................................................................................................................................ 18-2 Generate Menu ..................................................................................................................................... 18-3 Transform Menu................................................................................................................................... 18-3 Shortcut Menu ...................................................................................................................................... 18-3 Using the Non-XML Window............................................................................................................. 18-3 Using the Data Offset Feature............................................................................................................. 18-4 Using the Text Feature .......................................................................................................................... 18-4 Using the XML Window ...................................................................................................................... 18-4 Using the Debug Window................................................................................................................... 18-4 Using the Resize Bars ........................................................................................................................... 18-5 Debugging Format Definitions .......................................................................................................... 18-5 Searching for Values ............................................................................................................................. 18-5 Searching for Offsets ............................................................................................................................ 18-5 Using the Debug Log............................................................................................................................ 18-6 19 Format Builder Menus File Menu ............................................................................................................................................... 19-1 Edit Menu .............................................................................................................................................. 19-1 Insert Menu ........................................................................................................................................... 19-2 View Menu ............................................................................................................................................ 19-3 Tools Menu ............................................................................................................................................ 19-3 Help Menu............................................................................................................................................. 19-3 Shortcut Menu ...................................................................................................................................... 19-3 20 How Do I? Create a Message Format ..................................................................................................................... 20-1 Create a Group ...................................................................................................................................... 20-1 Create a Field......................................................................................................................................... 20-2 Create a Comment ................................................................................................................................ 20-2 Create a Reference................................................................................................................................ 20-3 Save a Document .................................................................................................................................. 20-3 Use Format Tester ................................................................................................................................. 20-4 Debug Format Definitions .........................................................................
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值