Skip to main content Skip to complementary content

Service endpoint interface

About this task

For every port type defined in the original WSDL contract, you can generate a corresponding service endpoint interface in Java. A service endpoint interface is the Java mapping of a WSDL port type. Each operation defined in the original WSDL port type maps to a corresponding method in the service endpoint interface. The operation's parameters are mapped as follows:

Procedure

  1. The input parameters are mapped to method arguments.
  2. The first output parameter is mapped to a return value.
  3. If there is more than one output parameter, the second and subsequent output parameters map to method arguments (moreover, the values of these arguments must be passed using Holder types).

Results

The next example shows the Greeter service endpoint interface, which is generated from the Greeter port type defined in the WSDL above. For simplicity, this example omits the standard JAXB and JAX-WS annotations.

The Greeter Service Endpoint Interface

/* Generated by WSDLToJava Compiler. */

package org.objectweb.hello_world_soap_http;
  ...
public interface Greeter {
   public java.lang.String sayHi(); 
   public java.lang.String greetMe(java.lang.String requestType);
   public void greetMeOneWay(java.lang.String requestType);
   public void pingMe() throws PingMeFault;
}

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!