Adding a Service Operation to a Java Service

Add a service operation to a Java service using the Service Editor.

Service operations cannot be overloaded

Since WSDL does not support method overloading, you cannot expose overloaded Java methods in the service interface. That is, you cannot expose two Java methods that have the same name and differ in the parameter types they accept. If you need to call overloaded Java methods from the service interface, create Java wrapper methods in the implementation class that have different method names and code them to call the overloaded methods. Expose the wrapper methods in the service interface.

To add an operation to a Java service:

  1. Open the Java service you want to edit.

  2. Select the Service Interface tab in the service editor.

  3. Add a new one-way operation with no parameters to the service interface and also insert an equivalent public method in the Java source file. Right-click the service interface and choose Create a New Method from the context menu.

    The editor creates a new method based on a default naming scheme, with no return type or input parameters. You can also:

Editing Java Service Operation Properties

Editing Java Service Operation Parameter Lists

Editing the Java Source Code for a Service

Removing a Service Operation from a Java Service

Java Service Datatypes

Supported Java Exceptions

Send your feedback on this help topic to Sybase Tech Pubs: pubs@sybase.com