oracle bus,Oracle Service Bus(OSB) Example

http://blog.csdn.net/zhaohuabing/article/details/50499264

Oracle Service Bus(OSB) Example

本文将使用JDeveloper12C创建一个简单的OSB程序。该程序在OSB中提供了一个天气查询的服务。通过该示例,可以帮助理解OSB中的Proxy Service,Business Service, Pipeline等基本概念,并学习如何创建OSB应用。

本文涉及到的工具和系统:

VirtualBox 5.0.12

Server 6.7

Oracle JDeveloper12C

Oracle SOA Suite12C

Oracle 网站有供开发人员学习使用的VM下载,VM中已经包含了安装好的SOA Suite和JDeveloper,可用VirtualBox打开直接使用。下载连接:

基本概念

Proxy Service

Proxy services are Oracle Service Bus definitions of intermediary Web services that Oracle Service Bus implements locally on Oracle WebLogic Server.

Business Service

Business services describe the enterprise services that exchange messages with business processes and which we want to virtualize using the OSB.

Proxy Service是在OSB中创建的一个web serverice,Business Service则代表了集成到OSB中的业务逻辑,Business Service会连接到一个外部的业务服务。客户端调用Proxy Service提供的服务接口,Prxoy则会通过Business Service调用到外部系统的服务接口中。

161ccadbcb5b1c816892a954758b8361.png 

在本例中,在OSB中提供了一个查询天气的Proxy Service,而真正提供查询业务逻辑的是Internet上的一个天气查询的Web Service.

创建一个新的Service Bus Project

打开JDeveloper 12C,选择菜单Application-New,在弹出的对话框中选择Service Bus Application with Service Bus Project.

bedba9dede9f2112549c9468fa1b5de7.png 

Application Name:WeatherServiceBusApplication

Project Name:WeatherServiceBusProject

下载Web Service的WSDL

这个网站提供了一些公共的web Service,这里我们就采用该网站的一个天气查询的web Service来创建我们的示例程序。该web Service的WSDL可以从该URL下载 。

首先在项目根目录文件夹下创建一个Wsdls目录。项目所有的WSDL文件都将放到该目录中。然后将下载下来的WSDL文件放到该目录中。

在JDeveloper中查看下载的WSDL文件,可以看到有两个Operation: GetCitiesByCountry和GetWeather。

3a482e959c750fff1815166f9ce02409.png

创建Proxy Service

创建一个Proxy目录。

双击打开根目录下的WeatherServiceBusProject,从右边的Components窗口中选择HTTP Service组件,拖动到Design面板的Prxoy Services泳道中,如下图。

b54cb9fd6cc422f84663910b1a0c2f9a.png

JDeveloper会弹出一个对话框,要求输入创建的Proxy Service的属性,Service Name取为WeahterProxyService,Location选择Proxy目录,其余用默认值。

e980c1f730d1ac6ff1c8cd6569581fb5.png

第二步选择我们刚才下载的WSDL文件,Port选择GlobalWeatherSoap

025c3251ee3d589a65eff45074348881.png 

第三步采用缺省值,完成Proxy Service创建

ec03fda74c3ace78f88e26bcecb41999.png 

可以看到,Proxy Service生成了,同时生成了一个PipeLine。创建一个Pipeline目录,通过Refactory把WeahterProxyServicePipeline.pipeline移动到Pipeline目录中。

eee9d2e6b92863ae45ff6bf4f57735a8.png

创建Business Service

OSB通过Business Service连接到外部服务。现在我们创建一个Business Service连连接到提供的天气查询服务中。

首先在根目录下创建一个存放Business Service的Business目录。

从右边的Components窗口中选择HTTP Service组件,拖动到Design面板的External Services泳道中。

69538f98a32620fe99e6f75211e31a82.png

JDeveloper会弹出一个对话框,要求输入创建的Business Service的属性。Service Name取为WeatherBusinessService,Location选择Business目录,其余取缺省值。

b6e4665d60b328644cbab6ea6511e829.png

这里也选择globalweather.wsdl。globalweather.wsdl,port选择GlobalWeatherSoap。

68e71c049fe841df93729830cbac5d50.png

第三步采用缺省值,可以看到这里已经从WSDL中自动提取出了Endpoint URI。

1b1df842635d76b3439f5ff1c221c567.png 

用鼠标拖动WeatherProxyServicePipeline右端的箭头,连接到WeatherBusinessService上。

7d70d51e0edc9a9803168feeb412ecaa.png 

打开WeahterProxyServicePipeline.pipeline的Design面板,可以看到Pipeline中增加了一个Route节点,连接到了WeatherBusinessService。如果Proxy Service 和 Business Service的消息格式不一致,还需要在Pipeline中进行消息格式转换。由于本例中的Proxy Service和Business Service采用了同一个WSDL,因此通过Route连接起来即可,不需进行消息转换。

3c7f48eb0bd0ee101ad98c7f2b2a3f97.png

测试

通过JDeveloper部署到到SOA Suite服务器中,然后通过servicebus的管理界面进行,在浏览器中打开 ,选择WeatherServiceBusProject-Proxy-WeatherProxyService,调用该Web Service。

查询北京的天气

d3b663373ce0f0f253364ab1375c236d.png 

查询结果

309c3bcd8ed95aa0708f9fedfb8a7c0a.png

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
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 .........................................................................
WITH RECURSIVE是一种在Oracle数据库中不存在的语法。它是一种用于在关系型数据库中执行递归查询的常见方法,在其他数据库系统(如PostgreSQL)中常见。在Oracle数据库中,您可以使用CONNECT BY子句来实现递归查询。CONNECT BY子句使用START WITH关键字指定起始行,并使用PRIOR关键字指定父行和子行之间的关联关系。在您提供的引用中,引用和引用中的查询是使用CONNECT BY子句进行递归查询的示例。因此,在Oracle数据库中,您可以使用CONNECT BY子句来实现递归查询,而不是使用WITH RECURSIVE语法。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [ORACLE OSB开发指南](https://download.csdn.net/download/liushaoyi0704/4379470)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* *3* [【5分钟搞懂递归查询】WITH recursive(MySQL)和start with(Oracle)](https://blog.csdn.net/weixin_43211480/article/details/126036768)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值