Professional Documents
Culture Documents
TALEND ESB 6.0 Cours 1444874212 - 00 - Course - LessonTOC - 13 Files Merged
TALEND ESB 6.0 Cours 1444874212 - 00 - Course - LessonTOC - 13 Files Merged
0
All Presentations
1
All Presentations
Introduction
• Talend Overview
• ESB Introduction
Lessons (and Detours)
1. Developing Routes
- Technical Detour – Apache Camel
2. Message Processing Routes
- Technical Detour – Apache ActiveMQ
3. Connecting Routes
4. Developing Routes with DI Jobs
5. Developing SOAP Web Services
6. Developing REST Web Services
• Talend Products
• Unified Platform highlights
• Talend Modules
• Talend Course View
• Curriculum logical progress
BIG DATA
DATA QUALITY
Data profiling, standardization, enrichment
DATA INTEGRATION
Access and delivery of data
• Real-time transactions
DATA QUALITY
Data profiling, standardization, enrichment
DATA INTEGRATION
Access and delivery of data
DATA QUALITY
Data profiling, standardization, enrichment
DATA INTEGRATION
Access and delivery of data
DATA QUALITY
Data profiling, standardization, enrichment
DATA INTEGRATION
Access and delivery of data
DATA QUALITY
Data profiling, standardization, enrichment
DATA INTEGRATION
Access and delivery of data
DATA INTEGRATION
Basics / Advanced / Administration
MDM Advanced –
Integration &
Workflow
MDM Basics
DI DI Component
DQ Basics ESB Basics TDM Basics BD Basics
Administration Development
DI Advanced
DI Basics
1
What is an ESB?
Industry View
2
What is ESB?
Practical View
3
When to use ESB? When to use DI?
• Generally speaking
- ESB for real-time messaging
- DI (ETL/ELT) for high volume batch jobs
- ESB if format is unknown
- DI for highly complex data transformations
4
ESB Features
• Location transparency
• Transport protocol conversion
• Message transformation
• Message routing (static and dynamic)
• Security
• Monitoring and management
5
Legacy vs. ESB
Point-to-point vs. Enterprise Service Bus
HR
In the Cloud
Shipping
ERP CRM
ERP CRM HR Shipping
On Premises
• Only realistic for small numbers of applications • Applications connected using service
• Integrations is costly to maintain and more interfaces through a common bus
fragile and brittle over time • Resulting architecture becomes much
more agile and flexible
6
ESB High Level View
NEW
COBOL ERP
APPLICATION
7
Talend ESB Studio
- 450+ components
Business Applications: SAP, Salesforce, Sugar CRM, Sage X3, etc.
Databases: Oracle, MySQL, DB/2, LDAP, Teradata, AS/400, etc.
Content & Mapping: P ositional, delimited, Excel, EDIFACT, XML, etc.
8
Course Objectives
9
Additional Information
• Documentation
- http://help.talend.com
- Talend ESB Getting Started Guide
• Webinar - Talend Open Studio for ESB for Dummies
- https://www.talend.com/resources/webinars/talend-open-studio-for-
esb-for-dummiesForum
10
© Talend Inc. 2015
11
Navigation
LMS Navigation guidelines
1
A few general thoughts before you get started
2
Primary Display
Previous Section (in this course) Next Section
Drop-down
• Navigate to any part of
any lesson
• Example on next slide
Scroll-bar
3
Drop-down Navigation
Lesson Headings
4
Continue Button
5
Suggested Navigation (between Presentation & Labs)
Suggested Navigation Tip
• Gold footer
• Familiar compass icon
• Includes brief instructions
Why?
• Some Lessons have more than
one lab exercise
• Tip allows for flexibility
• Follow suggestion or…
• … Complete entire
Presentation then all Labs
• … Switch back and forth
between Presentation & Labs
Example Tips
6
Context Switching (Presentation & Labs)
• Why? Some Lessons have more than one lab
1. Step through the Presentation until directed to the Lab exercises
2. Open the Lab exercise
• Right-click > Open Frame in new Tab (varies slightly by browser)
• Leave this second Tab open with the Lab exercises
• Complete one or more labs (as originally suggested in the Navigation Tip)
3. Return to the Presentation you were on in the original tab
4. You now have a Tab for the Presentation and another Tab for the Lab exercises for
the current Lesson
• Free to advance by page or scroll through, mark as completed (√), etc.
• Single click between Presentation and Labs as desired (or directed)
7
© Talend Inc. 2015
8
Developing Routes
11
Lesson Overview
• Talend Studio
- Basic preparation for future (more in-depth) Lab exercises
• ESB Routes
- Develop two basic routes
- Preparation for more involved Routes and Services
22
Lesson Objectives
33
Lesson Labs
44
Studio and ESB Basics
55
Talend Studio
66
Talend Studio Mediation Perspective
77
Terminology (1 of 2)
• Job
- Components connected to setup and run dataflow management processes
• Data Service Job
- Components connected to combine data integration processes with web
services (e.g. SOAP and/or REST)
• Route
- Components connected to run routing and mediation rules,
- Define how messages are moved from one service or endpoint to another
- Based on the Apache Camel framework
• Service
- WSDL objects that set up and implement Web services (SOAP)
- Associated with data service Jobs as service provider and consumer
- REST web services also supported (Representational State Transfer)
88
Terminology (2 of 2)
99
Lab Overview & Goal
Creating a Project
• Goals
- Start Talend
- Create a Project
- Switch Projects
- Switch Perspectives
Perform the Creating a Project Lab exercise before continuing with slides
10
10
Routes
11
11
Studio Components
Integration and Mediation Perspectives
• Talend components
- Begi ith a t
- tESBConsumer
- tRESTResponse, …
• Camel components
- Begi ith a
- cLog
- cFile All three used in upcoming Lab exercises
in this Lesson
- cFileDestination
- cMessagingEndpoint,… Used in later Lessons
- http://camel.apache.org/components.html
12
12
Camel Components in Talend
13
13
cFile
• Purpose
- Provide read/write access to the local file system
- Used by other Camel components
• Common Configuration
- Path – Path to file(s) that will be read/written
- Noop – Keep files in the original folder (or not)
- Autocreate – Create directories in <Path> that do ’t e ist
- Encoding – “et file e odi g UTF8, I“O, …
- fileName – File to be processed
• la k – Process all files in <Path>
• Otherwise only process individual files
• Supports Simple Expression language syntax
• http://camel.apache.org/file2.html
14
14
cMessagingEndpoint
• Purpose
- Send or receive messages
- Must o figure to se d or re ei e si gle e dpoi t a ’t do oth
• Common Configuration
- URI – URI of the message to send or receive
• file:/FolderNa e?optio = alue&optio = alue
- Advanced Setting > Dependencies > Camel Component
• jetty:http://localhost:8556/myapp/myservice Jett URI e a ple
• Supports Camel core and many others A…) ampq, o , ftp, … zookeeper)
- Supported URIs
• https://camel.apache.org/uris.html
15
15
Lab Overview & Goal
Send a File (using cFile)
• Goal
- Develop a Route to copy a file from one directory to another
• Create
- Context Group
- Route
• Configure
- Key component: cFile (Messaging family)
• Provide access to file systems
• Saves output to disk
• Run and verify output
Continue to the next slide before performing the Send File Labs.
16
16
Lab Overview & Goal
Send a File (using cMessagingEndpoint)
• Goal
- De elop a Route to op a file fro o e dire tor to a other…
- …usi g a ore ge eri o po e t
• Create
- Route
• Configure
- Key component: cMessagingEndpoint (Messaging family)
• Allows applications to communicate by sending or receiving messages
• Lab copies a file (but many formats are supported))
– http://camel.apache.org/components.html
– See ESB Mediation Component Reference Guide for commonly used components
• Run and verify output
Perform both Send a File Lab exercises before continuing with the slide Presentation
17
17
Lesson Summary / Q&A
• Talend
- Start and create a new local Project
- Create Context Groups (and Context Variables) for use in ESB Routes
- Talend ESB Routes are based upon Apache Camel
• ESB Routes – Rule that specifies:
- Which sources to accept messages from
- How to process messages
- Where to send messages to (destination endpoints)
• Routes to send (copy) files
- Using cFile (specific Camel component)
- Using cMessagingEndpoint (generic Camel component)
18
18
Additional Information
• Talend Documentation
- Product online help
- http://help.talend.com
- Talend ESB Getting Started Guide
• Apache Camel
- http://camel.apache.org
- Apache Camel Technical Detour
19
19
© Talend Inc. 2015
20
20
Apache Camel
Technical Detour
11
Apache Camel
• A routing engine
• A mediation engine
• An integration framework
• Highly portable
• Java object-based
33
Domain-Specific Language
Routing defined in DSL
• Java
- Fluent API that allows code completion by your IDE
• Spring
- Custom namespace with XML tags for routing
• Scala
- Adding some Scala features on top of the Java DSL
44
Domain-Specific Language for Integration
Java:
from(„file://test“)
.choice()
.when(xpath(„//order/type=‚widget‘“))
.to(„jms:widgetOrderQueue“)
.otherwise()
.to(„jms:gadgetOrderQueue“);
XML:
<route>
<from uri=„file://test“>
<choice>
<when>
<xpath>//order/type=‚widget‘</xpath>
<to uri=„jms:widgetOrderQueue “/>
</when>
<otherwise><to uri=„jms:gadgetOrderQueue “/></otherwise>
</from>
</route>
55
Message Model
Abstractions in Camel
• Message (org.apache.camel.Message)
• Exchange (org.apache.camel.Exchange)
66
Message
77
Message Structure
88
Message Exchange
• Exchange ID
• Message exchange patterns
(MEP)
• Exception
• Properties
• In Message
• Out Message
99
Architecture
10
10
Endpoints
1. Camel component
2. data/inbox refers to the root directory
3. delay=5000 files looked for every 5 seconds (polling consumer)
12
12
Producer/Consumer Endpoints
Two Basic Examples
Event
Event
example.txt
Route
File:C:/temp/data File:D:/receive
example.txt
13
13
Camel Context
14
14
Camel components in Talend
http://camel.apache.org/components.html
Note: Talend supports many (but not all) Camel components in the within the Studio.
15
15
© Talend Inc. 2015
16
16
Message Processing
Routes
22
Lesson Objectives
33
Lesson Labs
44
Content Based Routing
55
Overview
Content Based Routing
66
cMessageRouter
• Purpose
- Route messages based on specified conditions
• Common Configuration
- When Trigger - Whe spe ified o ditio o urs, route this a …
• Rt-click component > Trigger > When
– Rt-click When link > Settings
• Select Type (XPath, Ruby, Python, JavaScript, …
• E ter Co ditio /E plo ee/ID=
• Can have > 1 When Trigger
- Otherwise Trigger - Route all messages not meeting When condition
• Can have exactly 0 or 1 (optional)
• Warning! Do t perfor additio al essage ha dli g after a When
or Otherwise link! (best practice)
77
Lab Overview & Goal
Content Based Routing
Perform the Content Based Routing Lab exercise before continuing with the presentation.
99
Routing Slip
10
10
Overview
Routing Slip
Follows
Route messages through series of processing steps cRoutingSlip
Log message exchanges cLog
11
11
cDirect
• Purpose
- Produce (or consume) messages synchronously within a single Camel
context
- Can be used as a start, middle or end component
• Common Configuration
- Name (if a starting component)
12
12
cSetHeader
• Purpose
- Set or customize headers on all messages sent to it
- Precedes a cRoutingSlip component
• “et Header = o sta t – Static route (e.g. A, B, C no matter what)
• Header ot o sta t – Dynamic route e.g. A, B, C , the A, C, the A, B…
• Common Configuration
- Headers
• Name – Message header name
• Language – Language to use for the expression
– E a ples: Ja a“ ript, Bea , XPath, ‘u , P tho , Groo , …
• Value – Expression to set the header value to
13
13
cRoutingSlip
• Purpose
- Route one or more messages consecutively to a series of endpoints
- Middle or end component
- Always follows a cSetHeader
• Common Configuration
- Header name
• Name of header as defined in previous cSetHeader
- URI delimiter
• Character that separates multiple endpoints URIs in the message header
• Default: comma (,)
14
14
Lab Overview & Goal (1 of 2)
Routing Slip
Perform the Routing Slip Lab exercise before continuing with the presentation
RoutingSlip Billing
Discount
Receipt
17
17
Multicast
18
18
Overview
Multicast
Review
Send or receive messages cMessagingEndpoint
Sets headers on each message sent to component cSetHeader
Route messages to multiple endpoints (at same time) cMulticast Key!
Generate message exchanges based on timer trigger cTimer
Invoke a Java Bean from the repository cBean
New
Replace content of the message payload cSetBody
Quick way to implement basic Java DSL cJavaDSLProcessor
19
19
cMulticast
• Purpose
- Route message simultaneously to several endpoints
- Message can be processed differently
- Differs from cSplitter in that the original request message is unaltered
• Common Configuration
- URIs – Specify all endpoints for message routing
- Use Parallel Processing
• Set timeout - In milliseconds, only available if parallel processing
- Stop on exception
20
20
cTimer
• Purpose
- Generate a message exchange when a timer triggers
- Must be a staring component
• Common Configuration
- Period – Period (in milliseconds) to generate messages
- Repeat – Max number of messages to generate (0 = unlimited)
- Delay – Number of ms to wait before generating 1st message
- Daemon – Run timer thread as a daemon or not
- Set Schedule Time – Set time/date for the first message to trigger
21
21
cSetBody
• Purpose
- Replaces the payload of every message sent to it
- Content replaced is based on what an expression evaluates to
• Common Configuration
- Language – Ja a“ ript, XPath, XQuer , ‘u , P tho , “i ple, “QL…
- Expression – Expression to evaluate (for payload replacement)
- If Language = XPath - Can add namespaces for the expression
22
22
Lab Overview & Goal
Multicast
Perform the Multicast Lab exercise now before continuing with this presentation.
24
24
WireTap
25
25
cWireTap
• Purpose
- Wiretaps a message, sending it to both the original endpoint and
another endpoint
• Common Configuration
- URI – Endpoint to send the wiretapped message
• E a ples: direct:log , direct:A
• Common use case
- Assist with logging (easily determine what a Route does, when and
where…
- Listen in on original Route, output to a log file (or console) for
examination
26
26
cSplitter
• Purpose
- Splits a message into several sub-messages
- Split is performed based on a condition you specify
• Common Configuration
- Language – Language of the expression. Many supported:
• Examples: Xpath, Ruby, Python, SQL, Groovy, Simple
- Expression – How to split the messages
- Stop on Exception – Stop processing immediately on error
- Timeout – Specify in milliseconds
27
27
Lab Overview & Goal
WireTap
• Goal: Use WireTap EIP to tap into a message and send it to multiple
endpoints simultaneously
• Steps
- Configure input message endpoint (cFile)
- Wiretap the message (cWireTap)
- Split the message (cSplitter)
- Log output (cLog)
• Original content unaltered
• Set INFO and WARN debug levels
• Log original message
• Log Wiretap message
• Run Route and examine results
Perform the WireTap Lab exercise before completing this presentation.
29
29
Lesson Summary / Q&A
30
30
Additional Information
• Apache Camel
- Components - http://camel.apache.org/components.html
- EIPs - http://camel.apache.org/enterprise-integration-patterns.html
• http://www.enterpriseintegrationpatterns.com/
• XML and XPath
- http://www.w3.org/xml
- W3schools (http://www.w3schools.com/xml)
- W3schools (http://www.w3schools.com/xpath)
• Online Help (each component)
- Place component in the workspace
- Select component & click F1
- Click Component Documentation link
31
31
© Talend Inc. 2015
32
32
Connecting Routes
Routes that communicate with other Routes
1
Lesson Overview
• Create a Route
- Read an XML file
- Split the file into multiple messages
Routes that communicate with each other
- Connect to an input queue
- Place messages on the queue
• Create another Route
- Connect to the input queue
- Read messages from the queue
- Process/transform the messages (via series of components)
• Connection Route
Routes communicate and work together
• Process Route
• Multiple Headers
• ESB Resources
• ActiveMQ
- Open source messaging broker
- Includes a full JMS client
- Apache Camel uses ActiveMQ for messaging
- See also
• http://www.activemq.apache.org
• Technical Detour - Apache ActiveMQ (and Camel)
• Talend ESB
- Uses ActiveMQ as a Java Messaging Service (JMS) for Routes
- ActiveMQ must be running as a service (for Routes to work)
6
Connection Routes
7
Overview
Connection Routes
• Create first of two Routes that will communicate with another Route
Review
Sets headers on each message sent to component cSetHeader*
Splits file into multiple messages (individual orders) cSplitter*
Deposit messages into queue cJMS
XML
order
Log-start
XML XML
orders
XML
order
Queue order
Archive
XML
order Use the header : Validate
• ArchivePath
Add a header : • OrderId Output
• archivePath
• Routing_Slips
• orderId
File_to_JMSqueue Msg_from_JMS_Q_to_Processor
9
cMQConnectionFactory
• Purpose
- Store connection information to connect to a MQ Server
- Used by other components (e.g. cJMS)
• Common Configuration
- MQ Server - Specify type of MQ Server
• Examples: ActiveMQ, Websphere
- Broker URI – URI of the message broker
- Authentication – User/password information
10
cJMS
• Purpose
- Producer – Send messages to a JMS queue*
- Consumer – Read messages from a JMS queue*
• Common Configuration
- URI Destination – Name for the queue*
- Connection Factory – Contains connection info for the queue
(cMQConnectionFactory settings)
*Topics are also supported. (But queues are used throughout this Lesson and associated Labs.)
11
Lab Overview & Goal
Connection Route
• Goal: Create a Route that produces messages for a queue that will
be read and processed by another Route
• Steps
- Connect to a JMS (ActiveMQ) queue
- Create Context Group
- Read an XML file with customer order information
- Split the file into individual orders
• Path to archive
- Set headers on the messages • Order ID number
• Specify next processing steps
- Write to the queue
• Run the Route
• Examine the queue
Perform the Connection Route Lab exercise before continuing with slides
13
Process Route
14
Overview
15
Review - Process an XML file via JMS Queue
Customer order validation using two Routes
XML
order
Log-start
XML XML
orders
XML
order
Queue order
Archive
XML
order Use the header : Validate
• ArchivePath
Add a header : • OrderId Output
• archivePath
• Routing_Slips
• orderId
File_to_JMSqueue Msg_from_JMS_Q_to_Processor
16
cRecipientList
• Purpose
- Route messages to a list of recipients
• Common Configuration
- Language – Set the language type for the expression (Simple, Xpath, …)
- Expression – Expression that returns the endpoints
- Parallel Processing – Send to all recipients simultaneously
- Stop on Exception
- Ignore Invalid Endpoints
- Timeout – Tim (in ms) for recipients to receive and process messages
17
cTry
• Purpose
- Exception (error) handling
- Implements Java Try/Catch/Finally blocks
• Row Connections
- Try – Part of route that likely needs error handling
- Catch – Type of exceptions to catch (e.g. Exception.class to catch all)
- Finally – Final instructions to execute
- Route – Route all messages from sender to the next endpoint
18
cProcessor
• Purpose
- Quick/simple way to implement (java) code
- Great for basics and testing (not ideal for lengthy or complex code)
- Often used with cTry to catch exceptions and write to system console
• Common Configuration
- Code – Java code to execute
- Imports – Java code to import external libraries (if needed)
Note: Code should be basic. If too complex, it should be refactored or perhaps a JavaBean.
19
Lab Overview & Goal
Process Route
• Goal: Read messages from the queue, process and route them
based on Order validity
• Steps
- Connect to a JMS queue (contains Orders)
- Read messages from the queue
- Process the order based on message headers
• Initialize/start of the audit
• Archive to designated folder
• Validate the Orders (against an XSD)
• Log end of the audit
- Implement error handling for invalid customer orders
- Run Route (and confirm proper results)
Perform the Process Route Lab exercise before continuing with slides
Msg_from_JMS_Q_to_Processor
21
Multiple Headers
22
Overview
23
Lab Overview & Goal
Multiple Headers
Perform the Multiple Headers Lab exercise before continuing with the presentation
25
Overview
26
Lab Overview & Goal
ESB Resources
Perform the ESB Resources Lab exercise before finishing this Lesson’s presentation.
28
Additional Information
• http://www.activemq.apache.org
• Technical Detour - Apache ActiveMQ (and Camel)
• On line Help (Component Reference Guide)
29
© Talend Inc. 2015
30
Apache ActiveMQ
Technical Detour
11
Apache ActiveMQ (1 of 2)
• Based on standards
• Message-Oriented Middleware
• Multi-channel
• Multi-platform
• Multi-language (Client)
33
ActiveMQ Architecture
44
ActiveMQ - Message Oriented Middleware
55
ActiveMQ - Enterprise Messaging
66
ActiveMQ – Point to Point Queue
77
ActiveMQ – Publish/Subscribe
88
© Talend Inc. 2015
99
Developing Routes
that call DI Jobs
11
Lesson Overview
22
Lesson Objectives
33
Lesson Labs
• Creating DI Jobs
• Creating a Route to call DI Jobs
44
Common Use Cases
55
Creating DI Jobs
66
Overview
DI Job (called by a Route)
* Additional Key Component (Very powerful, commonly used component covered in DI Basics course)
77
tRouteInput
• Purpose
- Accept messages from a Mediation Route
- Must be launched from a Route using a cTalendJob component
• Common Configuration
- Input Schema – Built-in or Repository Similar to what is commonly
- Edit S he a… seen in DI and DQ
88
tRouteOutput
• Purpose
- Sends a message from a Job to a Route
- A Job using this component must be called by a Route using cTalendJob
(similar to tRouteInput)
• Common Configuration
- Output schema – Built-in or Repository
- Edit schema …
- Camel – Message parameters in accord with columns (defined by schema)
• Type – Body, Property, System or Header (default = Header)
• Name – Set the name for the parameter (ignored if Type = Body)
tRouteFault - Similar to tRouteOutput but message is marked as a “fault”. (Not used in upcoming lab exercise.)
99
Lab Overview & Goal
Creating DI Jobs
• Goal: Create two basic DI Jobs that are called by a Mediation Route
- Each Job clearly identifies itself (to make Route/Job communication
confirmation clear)
- Info will be exchanged between the Route and Jobs (next lab)
• Steps
- Create the 1st Job
- Use two key ESB Components
• tRouteInput & tRouteOutput
- Configure tMap to perform a basic transform between the input/output
data flows
- Duplicate the 1st Job and make minor modifications
Perform the Creating DI Jobs Lab exercise before completing this presentation.
11
11
Overview
Route that calls a Job
Note: Additional Key Components (previously discussed): cTimer, cSetBody, cDirect, cLog
12
12
cLoadBalancer
• Purpose
- Send message across multiple endpoints
- Supports many common algorithms (strategies)
• Common Configuration
- Strategy
• Round Robin – Distribute evenly among all endpoints
• Random
• Sticky – Calculation determines what endpoint to route to
• Failover – Use first endpoint. If it fails, try remaining endpoints.
13
13
cTalendJob
• Purpose
- Calls a Talend Job from a Mediation Route
- Enables Routes and Jobs to exchange messages
- Requires a tRouteInput be used in the Job
• Common Configuration
- Repository – Call a Job from the Repository
• Specify Context (Job, Route or Selected context)
- External – Job from an external bundle, specify:
• Library jar file
• Job – Specify package and job name (<PackageName>.<JobName>)
• Context name
14
14
Lab Overview & Goal
Creating a Route to Call Jobs
Perform the Creating Route to Call Jobs Lab exercise before completing this presentation.
Job A
Job B
16
16
Lesson Summary / Q&A
17
17
Additional Information
18
18
© Talend Inc. 2015
19
19
Developing SOAP
Web Services
1
Lesson Overview
• Introduction
- Web Services
- SOAP Web Services
- Apache CXF
- Talend ESB and Web Services
• SOAP Labs
- Create SOAP provider
- Test SOAP provider
- Develop SOAP consumer
- SOAP access to a database
- SOAP test via database access
- Additional SOAP tests
2
Lesson Objectives
3
Introduction
• Web Services, SOAP,
• Apache CXF, Talend
4
Web Services
5
SOAP Web Services
6
What is CXF?
7
Apache CXF
8
Talend ESB and Web Services
9
Talend ESB SOAP Web Service Components
11
Lab Overview & Goal
Create SOAP Provider
Proceed to the next Lab Overview slide before completing both Lab exercises.
• Goal: Use SoapUI tool to test the SOAP Provider just created
- Publish requests and view responses in a simple to use GUI
• Steps
- Invoke SmartBear SoapUI
- Create new Project
- Read in the WSDL (http://<Host>:<Port><PublishedURL>?wsdl)
- Change the request
- Submit the request
- View the response
Perform the Create SOAP Provider and Test SOAP Provider Lab exercises before continuing with the Presentation.
Perform the Database Access with SOAP Lab now before proceeding with the Presentation.
• Goal: Use SoapUI tool to test the SOAP Web Service just created
• Steps
- Start SoapUI
• Create Project
• Point it to new WSDL endpoint URL
• Issue several valid requests
Confirm correct responses
• Issue invalid requests
Perform the Test SOAP Web Service Lab now before proceeding with the Presentation.
Perform the Additional Test Options Lab now before proceeding with the Presentation.
• Talend Documentation
- http://help.talend.com
- Online Help
• Apache CXF
• http://cxf.apache.org
• SOAP and WSDL Tutorials
- http://www.w3schools.com/webservices/
18
© Talend Inc. 2015
19
Developing REST Web
Services
11
Lesson Overview
• Introduction
- REST Web Services
- REST vs. SOAP (at a glance)
• Lesson Lab
- Create REST Web Services
22
Lesson Objectives
33
Introduction
• RESTful Web Services,
• REST vs. SOAP
44
RESTful Web Services
55
REST and SOAP – Differences at a Glance
66
REST Labs
• Key Request/Response Components
77
Talend ESB and Web Services
• SOAP
- tESBProviderRequest
Covered in previous lesson
- tESBProviderResponse
- tESBConsumer
• REST
Description REST Components
Receives HTTP/s requests (GET, PUT, POST, DELETE) from a tRESTRequest
client
Sends HTTP/s responses to the client tRESTResponse
Send HTTP/s requests to a RESTful web service (and gets tRESTClient*
responses)
Like tRESTClient (but arguably simpler and less powerful) tREST*
• Purpose
- Receives HTTP/s requests (GET, POST, PUT, DELETE) from client
- Used with tRESTResponse to wrap a Talend Job as a web service
- Server side component
• Common Configuration
- REST Endpoint – Root URI the RESTful web service listens at
- REST API Mapping – Add multiple mappings for output flows (operations
such as GetEmployees to HTTP ethods GET, PUT, PO“T, … a d the
spe ifi URI Patter /Nu er
REST Endpoint
GetEmployees GET http://SomeHost.com:8088/employees/number
REST API Mapping
99
tRESTResponse
• Purpose
- Return HTTP/s responses to the client
• Common Configuration
- Return Body Type – Document, String or Byte
- Return Status Code – Standard HTTP response codes
• 200 OK; 400 Bad Request; 404 Not Found; 500 Internal Server Error
• Custom return code also supported
10
10
Lab Overview & Goal
Create REST Web Services
• Goal: Create a REST Web Service that looks up and returns product
information from a database
• Steps
- Create Job
- Add and configure components (tRESTRequest/Response, tXMLMap, …
- Add operation for getting all product information (getAllProducts)
- Configure database connection (talendstore)
- Configure mapping (input to output transformation)
• Input: Database
• Output: XML document
- Run Job and examine XML response
• Test against published URL (http://localhost:8088/products)
Perform the Create REST Web Service Lab exercise before continuing with slides
12
12
Additional Information
• Talend Documentation
- http://help.talend.com
- Online Help
• Apache CXF
- http://cxf.apache.org
• REST Tutorial
- http://www.restapitutorial.com/
13
13
© Talend Inc. 2015
14
14
Talend ESB Basics 6.0
Training
Wrap Up
1
Class Recap
2
Enterprise Integration Patterns
3
SOAP & REST Web Services
• SOAP components:
– tESBProviderRequest
– tESBProviderResponse
– tESBConsumer
• REST components:
– tRESTRequest
– tRESTResponse
4
What’s Next?
- ESB Training:
• Talend Enterprise ESB
– ESB Conductor, ESB Runtime, ESB Publisher and Talend Administration Center (TAC)
- Other Talend Training:
• Working with Apache Camel
• Working with Apache ActiveMQ
• Working with Apache CXF
5
Documentation
6
Additional Information
• Forum: www.talendforge.org/forum
• Talend Help: help.talend.com
• Talend Exchange: www.talendforge.org/exchange/
• On Demand Webinars: www.talend.com/resources/webinars
• Tutorials: www.talendforge.org/tutorials
• Talend YouTube: www.youtube.com/user/TalendChannel