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.
The main areas of Design View are:
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.)
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 are constructed according to the following rules:
The table below shows some of the methods and callbacks represented on the client interface.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
|
|||||||||||||||||||
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 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.
|
||||||||||||||||
For more information on message buffers see Creating Buffered Web Services in the WebLogic Server documentation.
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.
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 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) { }
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.
|
||||||||||||||
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.