Adding a Service Operation to a Java Service

To add an operation:

  1. Use the Java Service Editor to open the service file that you want to edit.

  2. Select the Service Interface tab.

  3. Right-click in the interface box outside of any operation box. Choose one of the following from the context menu:

    • Browse for New Operation, to choose from public methods that are defined in the source or class file but not exposed in the interface. Choose the method to expose. If the service is bound to a Java source file, the Java Service editor adds the appropriate SWS Javadoc comment to expose the method in the service interface.

    • Create New Method, to 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. The editor creates a new method based on a default naming scheme, with no return type or input parameters. You can:

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.

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