Previous Next vertical dots separating previous/next from contents/index/pdf

The web service Design View gives you a graphical overview and editing environment for web services.

Design View is synchronized with the web service Source View, Annotations View, and all other views of the web service: when you make changes in one view, the changes are reflected in all the others.

This topic describes how to use the graphical elements in Design View to create web services.

Design View Basics

The main areas of Design View are:

Client Interface

The Client Interface only shows those methods that are publicly accessible over the internet. These include the web service's "web methods" (those methods that are annotated with @WebMethod). Other methods are visible only in Source View. (An exception to this rule is when no methods are annotated with @WebMethod. In that case, all of the methods are displayed in Design View, because in this case all are assumed to be web methods.)

Methods and Callbacks

Each web method is represented by one or two arrows and a label.

Hovering over the arrows or label displays the method's return type, package, and class.

Holding down the Ctrl key and hovering over an element shows the corresponding source code.

Clicking the label brings you to the method's source code.

Edit the method signature by right-clicking and selecting Edit Signature.

Method and Callback Icons

Method and callback icons are constructed according to the following rules:

The table below shows some of the methods and callbacks represented on the client interface.

Client Interface Method Representations
Method Type Expects Data Parameters Returns Data Appearance Source Code Example
Inbound (client invokable) no no
@WebMethod
public void hello() {
}
Inbound (client invokable) yes no
@WebMethod
public void hello(String str) {
}
 
Inbound (client invokable) no yes
@WebMethod
public String hello() {
    return "Hello, World";
}
 
Inbound (client invokable) yes yes
@WebMethod
public String helloName(String str){
    return "Hello, " + str + "!";
}
 
Inbound (One Way, client expects no return value) no no
@Oneway()
@WebMethod
public void hello() {
}
 
Inbound (One Way, client expects no return value) yes no
@Oneway()
@WebMethod
public void hello(String str) {
}
Callback no no
@CallbackService
public interface CallbackSvc extends CallbackInterface {
    @WebMethod
    public void callback();
}
Callback yes no
@CallbackService
public interface CallbackSvc extends CallbackInterface {
    @WebMethod
    public void callback(String str);
}
 
Callback no yes
@CallbackService
public interface CallbackSvc extends CallbackInterface {
    @WebMethod
    public String callback();
}
 
Callback yes yes
@CallbackService
public interface CallbackSvc extends CallbackInterface {
    @WebMethod
    public String callback(String str);
}

Conversation Decorators

Conversation-related annotations are represented by decorator icons.

Conversation starting, continuing, and ending methods are represented by green, yellow, and red decorators, respectively.

The following table summarizes the conversation-related decorator icons.

Conversation Decorator Icons
Decorator Description Source Code
Indicates the method starts a conversation. @Conversation(Conversation.Phase.START)
Indicates the method continues a conversation. @Conversation(Conversation.Phase.CONTINUE)
Indicates the method finishes a conversation @Conversation(Conversation.Phase.FINISH)

You can set conversation properties on a method by right-clicking on the method and choosing Conversation Start, Conversation Continue, or Conversation Finish.

For more information on conversations see Creating Conversational Web Services in the WebLogic Server documentation.

Method Buffer Decorators

Method buffers are represented by the following icon:

You can place message buffer on a method by right-clicking on the method and choosing Message Buffer or Message Buffer and Oneway.

The following table summarizes the buffer-related decorator icons.

Buffer Decorator Icons
Decorator Description Source Code
Indicates a buffer is enabled on a method. @MessageBuffer() is present on the method declaration.
Indicates a buffer is enabled at the class level. @MessageBuffer() is present on the class declaration

For more information on message buffers see Creating Buffered Web Services in the WebLogic Server documentation.

Referenced Controls

Controls referenced by the web service are represented on the right side of Design View.

You can also add controls to the referenced controls area by dragging and dropping from the Package Explorer view.

The follow example depicts a control declaration

The following control declaration...

    @Control
    private HelloMessage helloMessage;

...is depicted in Design View as shown below.

Note that the variable name helloMessage is shown in the Design View, not the Control class name.

All methods in the controls interface file are shown in Design View.

Generating Client Interface Methods

To generate a client interface method that calls a referenced control method, right-click the control method and select Generate Delegate Method.

The corresponding method is created in the client interface.

Event Handlers

Event handler methods in the web service are shown in Referenced Controls area. Event handlers are displayed with clickable link text. Clicking on the link text will take you to the event handler source code in the web service.

Unhandled events in controls are shown in plain text.

To add an event handler to the web service, right-click on the unhandled event, and select Create Event Handler.

An event handler signature is added to the web service, for example:

    @EventHandler(field = "helloMessage", eventSet = HelloMessage.NewEventSet.class, eventName = "onEvent")
    protected void helloMessage_NewEventSet_onEvent(String msg) {
        
    }

Design View Palette

When the Design View is active it is accompanied by the Design View Palette.

You can add items to the Design View by dragging and dropping items from the Design View Palette (or by double-clicking on those same items).

You can add new control references, methods, and callbacks.

Common Tasks

Keyboard Shortcuts

Keyboard Shortcuts
Key Stroke Event
Shift-F10 Shows context menu on selected item
Tab / Shift-Tab Moves forwards/backwards through referenced controls and the web service class. (Note that pressing Tab will also move focus to the Eclipse toolbar, but focus will eventually return to the Design View elements, provided that the Tab key is pressed a sufficient number of times.)
Up and down arrow keys Cycles through the selectable elements including: individual methods, callbacks, event handlers, referenced controls, and the entire Design View canvas.
Left and right arrow keys When a referenced control is selected, the left and right arrows expand and collapse the referenced control.

Setting Preferences

You can set Design View preferences using the Service Design Views dialog available at Windows > Prefs > Workshop > Service Design Views.

For more information on this dialog see Service Design Views Preferences.

Related Topics

Designing Asynchronous Interfaces

Working with Controls

Creating Conversational Web Services

 

Skip navigation bar   Back to Top