
Talend ESB Development Guide 6.5.1 Talend ESB Adapted for v6.5.1. Supersedes previous releases. Publication date: January 18, 2018 Copyright © 2018 Talend Inc. All rights reserved. Copyleft This documentation is provided under the terms of the Creative Commons Public License (CCPL). For more information about what you can and cannot do with this documentation in accordance with the CCPL, please read: http://creativecommons.org/licenses/by-nc-sa/2.0/ This document may include documentation produced at The Apache Software Foundation which is licensed under The Apache License 2.0. Notices Talend and Talend ESB are trademarks of Talend, Inc. Apache CXF, CXF, Apache Karaf, Karaf, Apache Cellar, Cellar, Apache Camel, Camel, Apache Maven, Maven, Apache Archiva, Archiva, Apache Syncope, Syncope, Apache ActiveMQ, ActiveMQ, Apache Log4j, Log4j, Apache Felix, Felix, Apache ServiceMix, ServiceMix, Apache Ant, Ant, Apache Derby, Derby, Apache Tomcat, Tomcat, Apache ZooKeeper, ZooKeeper, Apache Jackrabbit, Jackrabbit, Apache Santuario, Santuario, Apache DS, DS, Apache Avro, Avro, Apache Abdera, Abdera, Apache Chemistry, Chemistry, Apache CouchDB, CouchDB, Apache Kafka, Kafka, Apache Lucene, Lucene, Apache MINA, MINA, Apache Velocity, Velocity, Apache FOP, FOP, Apache HBase, HBase, Apache Hadoop, Hadoop, Apache Shiro, Shiro, Apache Axiom, Axiom, Apache Neethi, Neethi, Apache WSS4J, WSS4J are trademarks of The Apache Foundation. Eclipse Equinox is a trademark of the Eclipse Foundation, Inc. SoapUI is a trademark of SmartBear Software. Hyperic is a trademark of VMware, Inc. Nagios is a trademark of Nagios Enterprises, LLC. All other brands, product names, company names, trademarks and service marks are the properties of their respective owners. This product includes software developed at AOP Alliance (Java/J2EE AOP standards), ASM, AntlR, Apache ActiveMQ, Apache Ant, Apache Avro, Apache Axiom, Apache Axis, Apache Axis 2, Apache Batik, Apache CXF, Apache Camel, Apache Chemistry, Apache Common Http Client, Apache Common Http Core, Apache Commons, Apache Commons Bcel, Apache Commons JxPath, Apache Commons Lang, Apache Derby Database Engine and Embedded JDBC Driver, Apache Geronimo, Apache Hadoop, Apache Hive, Apache HttpClient, Apache HttpComponents Client, Apache JAMES, Apache Log4j, Apache Lucene Core, Apache Neethi, Apache POI, Apache Pig, Apache Qpid-Jms, Apache Tomcat, Apache Velocity, Apache WSS4J, Apache WebServices Common Utilities, Apache Xml-RPC, Apache Zookeeper, Box Java SDK (V2), CSV Tools, DataStax Java Driver for Apache Cassandra, Ehcache, Ezmorph, Ganymed SSH-2 for Java, Google APIs Client Library for Java, Google Gson, Groovy, Guava: Google Core Libraries for Java, H2 Embedded Database and JDBC Driver, HsqlDB, Ini4j, JClouds, JLine, JSON, JSR 305: Annotations for Software Defect Detection in Java, JUnit, Jackson Java JSON-processor, Java API for RESTful Services, Jaxb, Jaxen, Jettison, Jetty, Joda-Time, Json Simple, MetaStuff, Mondrian, OpenSAML, Paraccel JDBC Driver, PostgreSQL JDBC Driver, Resty: A simple HTTP REST client for Java, Rocoto, SL4J: Simple Logging Facade for Java, SQLite JDBC Driver, Simple API for CSS, SshJ, StAX API, StAXON - JSON via StAX, Talend Camel Dependencies (Talend), The Castor Project, The Legion of the Bouncy Castle, W3C, Woden, Woodstox : High-performance XML processor, XML Pull Parser (XPP), Xalan- J, Xerces2, XmlBeans, XmlSchema Core, Xmlsec - Apache Santuario, Zip4J, atinject, dropbox-sdk-java: Java library for the Dropbox Core API, google-guice. Licensed under their respective license. Table of Contents Chapter 1. Development Environment Setup .................................................................. 1 1.1. Download Java Development Kit (JDK) ........................................................................ 2 1.2. Download Eclipse IDE for Java EE Developers ................................................................ 2 1.3. Download Tomcat 7.x (optional) ................................................................................. 2 1.4. Download Maven 3 ................................................................................................ 3 1.5. Install Maven2Eclipse (m2e) Plugin (optional) ................................................................. 3 1.6. Install soapUI Plugin (optional) .................................................................................. 5 Chapter 2. Web Services .............................................................................................. 7 2.1. Contract-first development ....................................................................................... 9 2.1.1. Project Structure .......................................................................................... 9 2.1.2. Maven POM files ....................................................................................... 10 2.1.3. Creating the WSDL ..................................................................................... 14 2.1.4. Configuring Deployment Descriptors ................................................................... 16 2.1.5. Creating the Web Service Provider (WSP) ............................................................. 17 2.1.6. Deploying the WSP ..................................................................................... 18 2.1.7. Running the SOAP Client ............................................................................... 19 2.2. Code-first development .......................................................................................... 19 2.2.1. CXF Maven Archetypes ................................................................................ 21 2.2.2. Adding OSGi Capabilities to a Web Service ........................................................... 24 2.2.3. Making SOAP calls with soapUI ....................................................................... 25 2.3. REST Services .................................................................................................... 27 Chapter 3. Camel Routes Overview ............................................................................. 29 Chapter 4. Talend ESB Services Overview .................................................................... 35 4.1. Service Locator ................................................................................................... 36 4.1.1. Using the Service Locator in non-OSGi environments ................................................. 36 4.1.2. Service interface ......................................................................................... 36 4.1.3. Service implementation ................................................................................. 37 4.1.4. Service Consumer ....................................................................................... 40 4.1.5. ZooKeeper usage ........................................................................................ 42 4.1.6. Service Locator for RESTful services .................................................................. 45 4.2. Service Activity Monitoring ..................................................................................... 46 4.2.1. Run the Monitoring Server .............................................................................. 47 4.2.2. Prepare the sample ...................................................................................... 47 4.2.3. Test SAM Server ........................................................................................ 49 Talend ESB Development Guide Talend ESB Development Guide Chapter 1. Development Environment Setup Welcome to Talend ESB! This document looks at best practices in developing with Talend ESB, in particular using Eclipse and Maven as development tools. While development with the Eclipse IDE is covered within this guide, note the Eclipse-based Talend Studio can also be used instead, as it already includes the development components we'll be configuring below. Different types of web services (JAX-WS and JAX-RS based) will be covered in Web Services, and then we'll explore Camel development in Camel Routes Overview. Finally, developing with Talend ESB specific services such as Service Activity Monitoring and the Service Locator is covered in Talend ESB Services Overview. In this chapter we'll look in detail at installing our Eclipse development environment along with associated tools for development of web services and Camel routes. Note, if you're already working with the pre-configured Talend Studio, this process can be skipped. The following sections in this chapter give details of the software needed. Talend ESB Development Guide Download Java Development Kit (JDK) 1.1. Download Java Development Kit (JDK) Either Java SE versions 6 or 7 are acceptable and can be obtained from: http://www.oracle.com/technetwork/ java/javase/downloads/index.html. As we'll be compiling source files, be sure to download the JDK and not the JRE version. 1.2. Download Eclipse IDE for Java EE Developers From the Eclipse download page obtain your operating system's version of Eclipse IDE for Java EE Developers. Juno is the most recent Eclipse version as the time of this writing, but if you already have the previous Helios or Indigo versions of Eclipse on your machine that should work fine as well. After extracting the application, double- clicking the Eclipse icon located in the Eclipse root directory should bring up the IDE; note your specific operating system's version may provide additional convenient options (menu items, desktop icons)
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages56 Page
-
File Size-