The Operation Element

The Operation element typically consists of an Input element and an Output element, though they can be used individually and in different orders to support different types of operations. For example, if you are describing

  • A request-response Operation (a user provides a stock quote ticker, and the Web service returns information about that stock, for example), the Operation would contain both Input (the stock ticker) and Output (the Web service response) elements.
  • A one-way Operation (a user submits information to the Web service, without a response from the Web service), the Operation would contain an Input element.
  • A solicit-response Operation (the Web service contacts a client, who provides the requested input), the Operation would contain both Output (the Web service request) and Input (the client response) elements.
  • A notification Operation (the Web service emits output, with no response required or expected), the Operation would have a single Output element.

An optional Fault element can be used for error handling in both request-response and solicit response Operation models.

Operation Element Code Sample

The structure of an Operation element might look like this:

     <wsdl:operation name="Operation-0">
               
        <wsdl:input/>
               
        <wsdl:output/>
               
        <wsdl:fault/>
               
    </wsdl:operation>
               

            

How to Create an Operation Element

To create an Operation element:
1. Select the PortType element.
2. Select Diagram > Add > Operation from the Stylus Studio menu.

Alternative: Right-click the PortType element and choose Add > Operation from the shortcut menu.

Stylus Studio adds an Operation element to the WSDL as a child of the PortType element. The default name is Operation-0, but you can change it. Operation names are not required to be unique.

How to Rename an Operation Element

To rename an Operation element:
1. Double-click the Operation element in the WSDL diagram.

The name becomes editable.

2. Type a new name and press enter.

Alternative: Using the Properties window

1. Display the Properties window if it is not already open. ( View > Properties).
2. Change the Operation name in the Value field in the Properties window.

Alternative: You can change the Operation name directly in the WSDL text.

Operation Element Properties

The following table describes the properties of the Operation element.

Name
Description
Name
The Operation name.
Table 107. Operation Element Properties

EDIFACT Sample Converted to XML

A sample EDIFACT document before and after conversion to XML, showing markup and full automatically-generated internal documentation.

Text File to XML

Stylus Studio provides several easy-to-use document wizards that allow you to quickly convert text files to XML. Create XML from text and EDI, create XML Schema from EDIFACT, and more!

Updating Relational Data Using Stylus Studio

Updating Relational Data Using Stylus Studio

Using Stylus Studio's Database-to-XML Editor to Query and Update Relational Databases using SQL/XML

Watch and learn how easy it is to define relational-to-XML mappings for getting XML out of relational databases and updating databases from XML using industry-standard SQL/XML extensions and Stylus Studio's DB-to-XML data-source editor.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member