Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag...
Transcript of Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag...
![Page 1: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/1.jpg)
ESB Lesson02 Page 1
Oracle ESBLesson02: CustomerData Batch CSV File Adapter
Oracle Integration Product Management
![Page 2: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/2.jpg)
ESB Lesson02 Page 2
Scenario Overview
FunctionalityAdd inbound file adapter to the CustomerData that processes a multiple record CSV file 1 record at a time.
Features- JDeveloper ESB Diagrammer- File Adapter- Native File Translator- Transformation
Steps- Install CustomerData Tutorial- Build File Adapter- Add Routing Rule- Add Transformation- Test and View Results
Customer Data Sync CSV File
![Page 3: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/3.jpg)
ESB Lesson02 Page 3
Start SOA Suite
Wait until you seeStatus = “Alive”
Go to Start Menu“Start -> Oracle (SOA) -> Start SOA Suite”
![Page 4: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/4.jpg)
ESB Lesson02 Page 4
JDeveloper: Open CustomerData Project
- Start JDeveloper- Open the “ESBSamples/CustomerData” project that wa s built from the ESB QuickStart Guide.
![Page 5: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/5.jpg)
ESB Lesson02 Page 5
Select Adapter Services Palette
- Select Adapter Services- Drag a “File Adapter” to the central work space
![Page 6: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/6.jpg)
ESB Lesson02 Page 6
Create File Adapter
- Enter Name “CustomerCSV”- Click Browse- Browse “ESB” -> “Systems/Groups in Project“- Select “CustomerData””- Click “OK”- Click “Configure File Adapter”
![Page 7: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/7.jpg)
ESB Lesson02 Page 7
File Adapter Welcome and Service Name
Click “Next” - Accept defaulted Service Name- Click “Next”
![Page 8: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/8.jpg)
ESB Lesson02 Page 8
File Adapter Operation and Physical Path
- Check “Read File”- Enter “Operation Name” “ReadCustomerCSV”- Click “Next”
- Enter “Directory” C:\Custom\In”- Click “Next”
![Page 9: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/9.jpg)
ESB Lesson02 Page 9
File Adapter Filtering and Polling Frequency
- Enter “Include Files Name Pattern” “*.csv”- Check “Files contain Multiple Messages”- Set Publish Message in Batches of:” to “1”- Click “Next”
- Set “Polling Frequency” to “1” Second- Click “Next”
![Page 10: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/10.jpg)
ESB Lesson02 Page 10
File Adapter Initiate Native Format Builder
Click “”Define Schema for Native Format” Click “Next”
![Page 11: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/11.jpg)
ESB Lesson02 Page 11
File Adapter NFB Type and Sample File
- Browse and select “File name” to“C:\Customer\CustomerBatch.csv”
- Notice the Field Names in first row- Click “Next”
- Keep default of Fields Delimited by CSV- “Click “Next”
![Page 12: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/12.jpg)
ESB Lesson02 Page 12
File Adapter NFB Records and XSD Info
- Set “Namespace”“http://MyNameSpace.com/CustomerCSV”
- Set “Element name containing multiple records““CustomerCSV”
- Set “Element name that will represent the record”“Customer”
- Click “Next”
- Keep defaults- File contains multiple record instances- Multiple records are of single type- Click “Next”
![Page 13: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/13.jpg)
ESB Lesson02 Page 13
File Adapter NFB Delimiter and First Record
- Click “Use the first record as the field names”- Notice fields names from the CSV set in schema- Click “Next”
- Keep defaults- Records Delimited by “End of Line($eol)”- Optionally enclosed by “- Click “Next”
![Page 14: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/14.jpg)
ESB Lesson02 Page 14
File Adapter NFB XSD Name and Finish
Click “Finish”- Set “File name” “CustomerBatch.xsd”- Notice 100% compliant XSD created - Click “Next”
![Page 15: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/15.jpg)
ESB Lesson02 Page 15
File Adapter Accept and Finish
- Keep defaults- Schema Location “CustomerBatch.xsd”- Schema Element “CustomerCSV”- Click “Next”
Click “Finish”
![Page 16: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/16.jpg)
ESB Lesson02 Page 16
Review and Create the Service
- Review WSDL File settings- Name “CustomerCSV”- System/Groups “CustomerData”- WSDL File “CustomerCSV.wsdl”- Port Type “ReadCustomerCSV_ptt”- Click “OK”
- See the new Services in the diagrammer- File Adapter Service “CustomerCSV”- Generated Routing Service “CustomerCSV_RS”- Select and Double Click “CustomerCSV_RS”
![Page 17: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/17.jpg)
ESB Lesson02 Page 17
Add a Routing Rule to CustomerCSV_RS
- Click to Expand the Services “Routing Rules”
![Page 18: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/18.jpg)
ESB Lesson02 Page 18
Add a Routing Rule to CustomerCSV_RS
- Expand Window to Right to See - Click to add a new routing rule
![Page 19: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/19.jpg)
ESB Lesson02 Page 19
Select the Target Service Operation
- Expand“ESB->Services in project->CustomerData->CustOut_RS ”
- Select “MapCustomerData”
- Click “OK”
![Page 20: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/20.jpg)
ESB Lesson02 Page 20
Create a Transformation Map
- Click to create a transformation map
- Click “Create New Mapper File”- Accept default XSLT file name- Click “OK”
![Page 21: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/21.jpg)
ESB Lesson02 Page 21
Use Auto Map to Build XSLT Map
- Click “imp1:CustomerCSV” in source schema element o n left- Select and drag to target schema element “inp1:Cust omer” on right- Let go and View the “Auto Map Preferences” dialogue- Uncheck “Match Elements Considering their Ancestor Types”- Click “OK” to view completed Map
![Page 22: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/22.jpg)
ESB Lesson02 Page 22
View the Completed XSLT
- Click “Save”- Click “X” to close the map
![Page 23: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/23.jpg)
ESB Lesson02 Page 23
View the Completed Routing Service
- Click “Save”- Click “X” to close the map
![Page 24: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/24.jpg)
ESB Lesson02 Page 24
View the Completed Diagram
- See the updated diagram- Click “Save”- See the new routing rule CustomerCSV_RS” to “CustOu t_RS”
![Page 25: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/25.jpg)
ESB Lesson02 Page 25
Register Service with ESB Server Service
- Go to Applications tab- Right click “CustomerData->Register with ESB”- Left Click on “LocalIntegrationServerConnection”- See the Registration Summary- Click “OK”
![Page 26: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/26.jpg)
ESB Lesson02 Page 26
View Update Diagram in the ESB Control
- Go to the ESB Control- http://localhost:8888/esb/esb/EsbConsole.html- Click the “CustOut_RS” to see new service relations hips
![Page 27: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/27.jpg)
ESB Lesson02 Page 27
Test CSV File
- Copy “C:\Customer\CustomerBatch.csv” to “C:\Custome r\In”
![Page 28: Oracle ESB€¦ · -Click “imp1:CustomerCSV” in source schema element o n left-Select and drag to target schema element “inp1:Customer” on right-Let go and View the “Auto](https://reader035.fdocuments.net/reader035/viewer/2022071219/6054a661f4b14c04b54c5d29/html5/thumbnails/28.jpg)
ESB Lesson02 Page 28
View Results in ESB Control
- Click “ Instances” to see 2 new instancesNote the records in the file were treated as separa te transactions
- Click top instance to see the services executed Notice “CustDBOut was not executed due to filter cr iteria
- Click the 2 nd or lower instance to it’s execution pathNotice that it did execute the “CustDBOut” service