Example - 7.3

Talend ESB Service Developer Guide

Version
7.3
Language
English
Product
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
Module
Talend ESB
Talend Runtime
Content
Design and Development
Installation and Upgrade
Last publication date
2023-04-17

For example, an implementation class for a service that defined the operations sayHi and greetMe may look like the below example.

Implementation of the Greeter Service

package demo.hw.server;

import org.apache.hello_world_soap_http.Greeter;

@javax.jws.WebService(portName = "SoapPort", serviceName = "SOAPService",
targetNamespace = "http://apache.org/hello_world_soap_http",
endpointInterface = "org.apache.hello_world_soap_http.Greeter")
public class GreeterImpl implements Greeter {

   public String greetMe(String me) {
      System.out.println("Executing operation greetMe");
      System.out.println("Message received: " + me + "\n");
      return "Hello " + me;
   }

   public String sayHi() {
      System.out.println("Executing operation sayHi\n");
      return "Bonjour";
   }
}