In this section, you will see how to export the Customer service to run
it in an OSGi container, the Talend Runtime Container, for
development purposes.
Before exporting the service, first start a Talend Runtime Container, and
make sure all its Infrastructure Services have been started. For more
information, see Launching Talend Runtime and its Infrastructure Services.
Procedure
-
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.kar
file.
-
Copy the CustomerService-0.1.kar file, and paste it
into the deploy folder of the Talend Runtime Container. The service starts directly.
-
Since this is a dynamic loading environment, the
service starts running automatically. To see it in the
Talend Runtime Container window, type in the
list
command 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 Runtime 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 Runtime 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.