Web Services Development: Using WebLogic Web Services Annotations View

This document describes the following:

You use the WebLogic Web Services Annotation view to add new and edit existing annotations of a Java Web service within projects configured with WebLogic Web Services or WebLogic Web Service Clients facet. This view allows you to add annotations and their attributes without knowing the detailed information about which annotations and attributes are supported.

1. Activating the WebLogic Web Services Annotations View

To activate the WebLogic Web Services Annotation view, follow this procedure:
  • In the Project Explorer, open one of the source Java files from your project that contains a Web service. Use the Java code editor to open the file.

  • Select Window > Show View > Other from the top menu to open the Show View dialog that Figure 1 shows. Select WebLogic Web Services > WebLogic Web Service Annotations from the list, and then click OK to open the view.

    Figure 1.
    Show View Dialog

  • Figure 2 shows the activated WebLogic Web Service Annotations view that makes the annotation selected in the Java source available for editing.

    Figure 2.
    WebLogic Web Service Annotations View

2. Using the WebLogic Web Services Annotations View

You use the WebLogic Web Services Annotations view as you would any other editor.

When using the WebLogic Web Services Annotations view, consider the following features:

  • When you select a valid Java element in the Java editor, a set of tabs is displayed, with each tab representing a supported annotation (see Figure 2).

  • When you select an annotation in the Java editor, the corresponding tab is activated.

  • Each tab provides a property editor pertaining to the attributes for that particular annotation:
    • Each tab displays a link action to either Add or Remove the annoation from the Java source.
    • Annotations are automatically added when you start to edit an attribute on the property editor.
    • Annotations are automatically removed if all attributes are cleared from the property editor.

  • When you edit an attribute, the changes are immediately reflected in the Java source editor.

  • Edits in the Java source editor are immediately reflected in the WebLogic Web Services Annotations view's property editor.

  • You can clear the value or return to a default value by using the light bulb icon next to a field.

  • Default values are displayed in grey.

3. Supported Annotations

You can use the WebLogic Web Services Annotations view to edit the following annotations:
  • Class-level annotations:

    • WebService

    • SOAPBinding

    • HandlerChain

    • WebFault

    • ServiceMode

    • WebServiceClient

    • WebServiceProvider

    • WebServiceRefs

  • Field-level annotations:

    • WebServiceRef
    • HandlerChain

  • Method-level annotations:

    • SOAPBinding

    • WebMethod

    • Oneway

    • WebResult

    • WebEndpoint

    • RequestWrapper

    • ResponseWrapper

  • Parameter-level annotations:

    • WebParam

Note that you can use some annotations, such as WebService, WebMethod, and Oneway, as marker annotations (no attributes are required when the annotation is specified).

4. Related Information