Generated service class - 8.0

Talend ESB Service Developer Guide

Version
8.0
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-11-06

The next example shows the typical outline a generated service class, ServiceName , which extends the javax.xml.ws.Service base class.

Outline of a Generated Service Class

public class ServiceName extends javax.xml.ws.Service {
   ...
   public ServiceName(URL wsdlLocation, QName serviceName) { } 
   public ServiceName() { }
   public Greeter getPortName() { }
   ...
}

The ServiceName class above defines the following methods:

  • Constructor methods - the following forms of constructor are defined:

    • ServiceName(URL wsdlLocation, QName serviceName) constructs a service object based on the data in the serviceName service in the WSDL contract that is obtainable from wsdlLocation .

    • ServiceName() is the default constructor, which constructs a service object based on the service name and WSDL contract that were provided at the time the stub code was generated (for example, when running the CXF wsdl2java command). Using this constructor presupposes that the WSDL contract remains available at its original location.

  • get_PortName_() methods - for every PortName port defined on the ServiceName service, CXF generates a corresponding get_PortName_() method in Java. Therefore, a wsdl:service element that defines multiple ports will generate a service class with multiple get_PortName_() methods.