ServiceMethod Annotation

The Java Service editor adds a special annotation in Java source code for public methods.

These annotations include values that indicate additional information about the methods than the source code can normally provide, such as which public Java methods are exposed in the service interface. The format of the annotation is:

@ServiceMethod(value-list)

Where property-list is a comma-separated list of name-value pairs of property assignments, for example:

@ServiceMethod(visible=true, returnName="operation1Return", faultNames={"MyExceptionFaultName=MyException"})

The following table describes the properties that can appear in service method annotations:

Table 1. Valid service method annotations
Property name Description
expose Specifies whether the Java method is part of the service interface. A value of true indicates that the method translates to an equivalent operation in the service interface. A value of false or no value indicates the method is not exposed in the service interface.
visible This property takes values of true and false and corresponds to the visible property for the translated operation in the service interface, which specifies whether the operation is included in the service's WSDL interface after deployment.
returnName If the method has a return type, specifies the name of the service operation parameter that corresponds to the return value.
style Specifies the operation style.

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.