Copyright (c) 2016-2024 Linagora This program/library is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or (at your option) any later version. This program/library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program/library; If not, see http://www.gnu.org/licenses/ for the GNU Lesser General Public License version 2.1. ################################################################################### ====================== BUILD THE SAMPLE ====================== The Talend part of the sample is in directory 'PETALS_SAMPLE'. To edit the job or the Talend project: - launch Talend Open Studio 5.2.3, - create a new project, - open the project, - import items through a right click into the view 'Repository', - select the directory 'PETALS_SAMPLE', - select all items, - and finish the import Now, you can edit the Talend project. When all your modifications are ok, you must export these items as the directory 'PETALS_SAMPLE': - export items through a right click into the view 'Repository', - select the parent directory of 'PETALS_SAMPLE', - select the jobs to export, - verify that dependencies are also exported, - and finish the export As no way exists to build a Talend job with Maven, it is needed to: - to export manually the Talend job as Petals Service Assembly: - in TOS, select the job to export ('ArticleImporterJob'), - export the job - select the export type 'Petals ESB' - select the archive file - check: 'job singleton', 'endpoint generation' - uncheck: 'source files', 'validate Petals messages' - edit exposed contexts: - 'fileToLoad' exported as 'In-Attachment' - 'fileResult' exported as 'Out-Attachment' - FIX THE EXPORT: - in the SU part included in the SA, move all files of directory 'ArticleImporterJob' in the root directory of the SU. - don't forget to add legal information (files COPYRIGHT and LICENSE) - to deploy manually the generated Petals Service Assembly in the Maven repository use a Maven CLI command as (from a directory containing no POM file): mvn deploy:deploy-file -DrepositoryId=ow2.snapshot -Durl=http://repository.ow2.org/nexus/content/repositories/snapshots -Dpackaging=zip -DpomFile=sa-talend-ArticleImporterJobService-provide.pom -Dfile= where a sample of the POM file is given with 'sa-talend-ArticleImporterJobService-provide.pom' DON'T FORGET TO REDEPLOY THE SA 'sa-talend-ArticleImporterJobService-provide' EACH TIME IT IS CHANGED ==================== SAMPLE DEPLOYMENT ==================== Create following directories: - mkdir -p /tmp/import-articles/results - mkdir -p /tmp/import-articles/to-import Following artifacts must be deployed: - Petals BC SOAP - Petals SE Talend - Petals BC FileTransfer - Petals SE XSLT - Petals SE EIP - sa-talend-ArticleImporterJobService-provide - sa-talend-sample ==================== RUN THE SAMPLE ==================== You can use SoapUI to import a file of articles. A file example is 'articleImporter.csv'. Use the web-service 'ArticleImporterService' to import the file. A sample request is available into the SOAP UI project 'SE-Talend-Sample-soapui-project.xml'. Just import this XML file into your SOAPUI. Before to invoke the web-service 'ArticleImporterService', you must start the web-service mock 'ArticleSoapBinding MockService'. When invoking the web-service 'ArticleImporterService', caution to your request parameters: - Enable MTOM support, - at attachment level: - 'part': select the same value as the one defined in the XML payload, - 'content ID': should be the same value as the one defined in the XML payload without "cid:"