Once the service is built, you can run it in an OSGi container, the Talend ESB Container. In this scenario, you will learn:
How to export the service and run it in a Talend ESB Container for development purposes. See Exporting the service and running it in a Talend ESB Container for details.
In this section, you will see how to export the Customer service to run it in an OSGi container, the Talend ESB Container, for development purposes.
Before exporting the service, first start a Talend ESB Container, and make sure all its Infrastructure Services have been started. For more information, see Launching Talend Runtime and its Infrastructure Services.
Under Services, right-click CustomerService 0.1 and select Export Service. In the [Save As] window, specify a folder. Click Finish.
This process builds and exports the service to the specified directory, as a
CustomerService-0.1.karfile, and paste it into the
deployfolder of the Talend ESB Container. The service starts directly.
Since this is a dynamic loading environment, the service starts running automatically. To see it in the Talend ESB Container window, type in the
listcommand at the console prompt.
To check if the service has correctly been deployed, go to
http://localhost:8040/services, and the CustomerService service will be listed.
Now check it is working, by starting the consumer.
The port that the service is running at has changed, and now uses the Talend ESB Container port, which is by default 8040. To update the port, under Job Designs, open the CustomerConsumer 0.1 Job. Click the middle of tESBConsumer_1. Then go to the Component tab.
Click the [...] button next to Service configuration, which opens a WSDL settings window.
Update the port number to use the Talend ESB Container port by changing 8090 to 8040, and click the refresh button.
Now run the consumer job as before from the Run tab, and you see the same output as before.