Using the WSDL Editor

WSDL View

This section contains the following topics

In the WSDL view of the WSDL Editor, the WSDL file appears as a tree component or a series of columns.

Image shows the WSDL view for the sample file SynchronousSample.wsdl

The WSDL view has two subviews: tree view and column view. To switch between the subviews, use the buttons in the WSDL Editor toolbar.

The main nodes in the WSDL view correspond to the major elements in a WSDL file.

Some of the nodes in the WSDL view allow you to add extension attributes. Right-click the node and choose Add Extension Attribute. In the Add Extension Attribute dialog box, specify the name and namespace. Once you add the attribute, you can specify the value from the Properties window. To delete the attribute, right-click the node and choose Remove Attributes.

If you right-click a node and choose Go To -> Source, then the Source view appears with the cursor positioned at the beginning of the component's block.

Configuring the Root Element

The root element of a WSDL file contains properties for the name of the WSDL file, the target namespace, the default namespace, and namespace prefixes. You can use the WSDL Editor to edit these properties.

ProcedureTo configure the root element

  1. In the WSDL view, select the root node.

  2. If the Properties window is not visible, choose Window -> Properties.

  3. Edit the name, target namespace, and default namespace as necessary.

  4. Edit the values of the namespace prefixes as necessary.

Importing XML Schemas Using the WSDL View

You can use the WSDL Editor to import one or more XML schema files into a WSDL file.

If an XML schema file cannot be imported, then the file is crossed out in the Add Import dialog box.

The name can be striked-out for the following reasons:

The WSDL Editor allows you to import an XML schema file that is located in a different project. For more information, see the "About Cross-Project XML File References" topic in the IDE online help.

ProcedureTo import an XML schema

  1. In the WSDL view, right-click the Types node and choose Add -> Schema Import.

    The Add Import dialog box opens.

  2. Expand the By File or By Namespace node to navigate to and select the XML schema file.

  3. Click OK.

    The schema import node appears.

Adding Inline Schemas Using the WSDL View

The WSDL Editor provides support for the built-in simple types in W3C XML Schema. The built-in simple types include such types as string, date, and integer.

You can define your own data types by adding an inline schema. The WSDL Editor enables you to configure one or more schema elements and types, and to define the structure of the elements and types.

ProcedureTo add an inline schema

  1. In the WSDL view, right-click the Types node.

  2. Choose Add -> Inline Schema from the pop-up menu.

    The inline schema node appears.

ProcedureTo configure the global properties of the inline schema

  1. If the Properties window is not visible, choose Window -> Properties.

  2. Select the inline schema node.

  3. Perform one or more of the following optional tasks:

    • Specify a unique ID.

    • Specify whether locally declared attributes must be qualified with the namespace prefix.

    • Specify whether locally declared elements must be qualified with the namespace prefix.

    • Specify the default value of the block attribute, which controls the use of substitution.

    • Specify the default value of the final attribute, which controls the use of type derivation.

    • Specify the version of the schema.

    • Specify the target namespace of the schema.

To define the structure of the inline schema

To define the structure of the inline schema, add one or more of the following XML Schema components as necessary. The interface is the same as the Schema view that appears when you edit an XML schema.

Importing WSDL Files Using the WSDL View

You can use the WSDL Editor to import one or more other WSDL files into a WSDL file.

If a WSDL file cannot be imported, then the file and the file's namespace are crossed out in the Add Import dialog box. This situation can happen for the following reasons:

The WSDL Editor allows you to import a WSDL file that is located in a different project. For more information, see the "About Cross-Project XML File References" topic in the IDE online help.

ProcedureTo import a WSDL file

  1. In the WSDL view, right-click the Imports node and choose Add WSDL Import. The Add Import dialog box opens.

  2. Expand the By File or By Namespace node to navigate to and select the WSDL file.

  3. Click OK.

    The WSDL import node appears.

Configuring Messages Using the WSDL View

You can use the WSDL Editor to create, edit, and delete messages.

Each message contains one or more logical parts. For each part, you must specify the name and the type of content.

If you change the name of a message or part, then the WSDL Editor renames all occurrences in the same file. To rename all occurrences in associated XSD, WSDL, and BPEL files as well, right-click the component node and choose Refactor -> Rename.

ProcedureTo create a message

  1. In the WSDL view, right-click the Messages node and choose Add Message. A message node appears. The message contains one part. The part's type of content is undefined.

  2. If the Properties window is not visible, choose Window -> Properties.

  3. The Element or Type property specifies the type of content. To set the value, click the ellipsis (...) button. The Element or Type dialog box enables you to select any of the built-in types in W3C XML Schema. If you added an inline schema or imported a schema, then you can select an element or type from the schema.

ProcedureTo add a part to a message

  1. Right-click the message node.

  2. Choose Add -> Part.

    A part node appears. The type of content is undefined.

ProcedureTo change the name of a message or part

  1. If the Properties window is not visible, choose Window -> Properties.

  2. Select the message or part node.

  3. Set the Name property to the new name.

ProcedureTo delete a message or part

  1. Select the message or part node.

  2. Press Delete.

Configuring Port Types Using the WSDL View

You can use the WSDL Editor to create, edit, and delete port types.

In a WSDL file, a port type contains one or more related operations that the web service can perform. An example of an operation is GetQuote.

The WSDL Editor supports the following categories of operations:

Each message contains one or more logical parts. For each part, you must specify the name and the type of content.

If you change the name of a port type or operation, then the WSDL Editor renames all occurrences in the same file. To rename all occurrences in associated XSD, WSDL, and BPEL files as well, right-click the component node and choose Refactor -> Rename.

ProcedureTo create a port type

  1. In the WSDL view, right-click the Port Types node and choose Add Port Type. The Create New Port Type dialog box appears.

  2. Enter a name for the port type.

  3. Enter a name for the operation.

  4. Select the category of operation.

  5. Define the message that the operation receives as input. You can create a message from scratch by entering a new message name in the drop-down list, or you can select an existing message from the drop-down list. For a new message, the Add and Remove buttons enable you to add and remove message parts.

  6. If the operation is a request-response operation, then define the message that the operation sends as output.

  7. (Optional) If the operation is a request-response operation, then you can define a message that the operation sends as a fault.

  8. Click OK.

    A port type node appears. The port type node contains an operation node. If you created one or more messages, then the message nodes appear. In addition, a partner link type is automatically created.

ProcedureTo add an operation to an existing port type

  1. In the WSDL view, right-click the port type node and choose Add -> Operation.

    The Create New Operation dialog box appears.

  2. Enter a name for the operation.

  3. Select the category of operation.

  4. Define the message that the operation receives as input. You can create a message from scratch by entering a new message name in the drop-down list, or you can select an existing message from the drop-down list. For a new message, the Add and Remove buttons enable you to add and remove message parts.

  5. If the operation is a request-response operation, then define the message that the operation sends as output.

  6. (Optional) If the operation is a request-response operation, then you can define a message that the operation sends as a fault.

  7. Click OK.

    An operation node appears. If you created one or more messages, then the message nodes appear.

ProcedureTo add a fault to a request-response operation

  1. If the Properties window is not visible, choose Window -> Properties.

  2. Right-click the operation node and choose Add -> Fault.

    The fault node appears.

  3. Set the Message property to the fault message.

ProcedureTo change the name of a port type or operation

  1. If the Properties window is not visible, choose Window -> Properties.

  2. Select the port type or operation node.

  3. Set the Name property to the new name.

ProcedureTo change the parameter order of an operation

The parameter order is intended for use with RPC bindings.

  1. If the Properties window is not visible, choose Window -> Properties.

  2. Select the operation node.

  3. Click the ellipsis (...) button for the Parameter Order property.

    The Parameter Order dialog box appears.

  4. Move message parts from the Available Parameters list to the Current Parameters list.

  5. Arrange the parts in the desired order.

  6. Click OK.

ProcedureTo delete a port type or operation

  1. Select the port type or operation node.

  2. Press Delete.

Configuring Bindings Using the WSDL View

You can use the WSDL Editor to create, edit, and delete bindings.

Image shows the WSDL view as described in context

In a WSDL file, a binding contains protocol and data format information for the operations and messages of a port type.

The WSDL view provides the following approaches:

If you change the name of a binding, then the WSDL Editor renames all occurrences in the same file. To rename all occurrences in associated XSD, WSDL, and BPEL files as well, right-click the binding node and choose Refactor -> Rename.

ProcedureTo create a binding and service from a port type

  1. 1. In the WSDL view, right-click the port type node and choose Add -> Binding and Service Port.

    The Generate Binding and Service Port dialog box appears.

  2. Enter a name for the binding

  3. Select the type of binding.

  4. Select the binding subtype. The choices vary depending on the binding type.

  5. Add the binding to a service port. If this option is selected, do the following:

    1. Enter a name for the service.

    2. Enter a name for the port.

  6. Complete the binding configuration.

    When a binding type is selected, the Generate Binding and Service Port dialog box provides configuration parameters specific to that binding type.


    Note –

    The HTTP and SOAP bindings do not provide configuration parameters in the Generate Binding and Service Port dialog box.


  7. Click OK.

    A binding node and a service node appear. The binding node contains an extensibility element (for example, file:binding) that identifies the type of binding. The binding node also contains one or more operation nodes.

    The service node contains a port node. The port node contains an address extensibility element (for example, file:address).

See Also

For information on how to configure the extensibility elements of the binding and service, see the appropriate binding component user's guide.

ProcedureTo create a binding individually

  1. In the WSDL view, right-click the Bindings node and choose Add Binding.

    The Create New Binding dialog box appears.

  2. Select the port type.

  3. Enter a name for the binding.

  4. Select the type of binding.

  5. Select the binding subtype. The choices vary depending on the binding type.

  6. Add the binding to a service port. If this option is selected, do the following:

    1. Enter a name for the service.

    2. Enter a name for the port.

  7. Complete the binding configuration.

    When a binding type is selected, the Create New Binding dialog box provides configuration parameters specific to that binding type.


    Note –

    The HTTP and SOAP bindings do not provide configuration parameters in the Create New Binding dialog box.


  8. Click OK.

    A binding node and a service node appear. The binding node contains an extensibility element (for example, file:binding) that identifies the type of binding. The binding node also contains one or more operation nodes. The service node contains a port node. The port node contains an address extensibility element (for example, file:address).

See Also

For information on how to configure the binding's extensibility elements, see the appropriate binding component user's guide.

ProcedureTo delete a binding

  1. Select the binding node.

  2. Press Delete.

    The Safe Delete dialog box appears and shows you the name of the component you selected to delete.

  3. Click Refactor.

    The dialog box displays a list of warning or errors related to the component you are deleting and gives you the option to show usages of the XML schema component or cancel the delete.

  4. To continue with the delete, click Refactor.

    The XML schema component and all references to the component are deleted.

To undo a delete

You can undo refactoring changes by right-clicking any remaining binding component in and selecting Refactor ? Undo from the pop-up menu. The IDE roles back all canges made in the files that were affected by the refactoring.

Configuring Services Using the WSDL View

You can use the WSDL Editor to create, edit, and delete services.

Image shows the service example in WSDL view of WSDL
Editor

In a WSDL file, a service consists of one or more related ports. Each port associates a binding with a network address, thus defining an individual endpoint that clients can access.

The WSDL view provides the following approaches:

ProcedureTo create a binding and service from a port type

  1. In the WSDL view, right-click the port type node and choose Add -> Binding and Service Port.

    The Generate Binding and Service Port dialog box appears.

  2. Enter a name for the binding.

  3. Select the type of binding.

  4. Select the binding subtype. The choices vary depending on the binding type.

  5. Add the binding to a service port. If this option is selected, do the following:

    1. Enter a name for the service.

    2. Enter a name for the port.

  6. Complete the binding configuration.

    When a binding type is selected, the Generate Binding and Service Port dialog box provides configuration parameters specific to that binding type.


    Note –

    The HTTP and SOAP bindings do not provide configuration parameters in the Generate Binding and Service Port dialog box.


  7. Click OK.

    A binding node and a service node appear. The binding node contains an extensibility element (for example, file:binding) that identifies the type of binding. The binding node also contains one or more operation nodes. The service node contains a port node. The port node contains an address extensibility element (for example, file:address).

See Also

For information on how to configure the extensibility elements of the binding and service, see the appropriate binding component user's guide.

ProcedureTo create a service individually

  1. 1. In the WSDL view, right-click the Services node and choose Add Service.

    A service node appears.

  2. If the Properties window is not visible, choose Window -> Properties.

  3. Select the service node.

  4. (Optional) Change the value of the Name property.

  5. Right-click the service node and choose Add -> Service Port.

    A port node appears.

  6. Select the port node.

  7. (Optional) Change the value of the Name property.

  8. Set the Binding property to the desired binding.

  9. Right-click the port node and add the address extensibility element (for example, File Address).

  10. For information on how to configure the address extensibility element, see the appropriate binding component user's guide.

ProcedureTo delete a service or port

  1. Select the service or port node.

  2. Press Delete.

    The Safe Delete dialog box appears.

  3. Click Refactor.

    The service or port node is deleted.

Configuring Partner Link Types Using the WSDL View

A partner link type characterizes the conversational relationship between two services.

A partner link type can have one role or two roles.

A role describes the function that a partner has in the relationship. For example, in a procurement scenario, the partner link type could have two roles: Buyer and Seller.

A role must specify the port type that the service will use to receive messages.

ProcedureTo add a partner link type automatically

  1. When you do either of the following tasks, a partner link type is automatically generated.

    • Create a WSDL file from scratch.

    • Create a port type.

  2. (Optional) To add a second role, do the following:

    • Right-click the partner link type node and choose Add -> role.

    • If the Properties window is not visible, choose Window -> Properties.

    • Select the role.

    • (Optional) Change the default name.

    • Specify the port type.

ProcedureTo add a partner link type manually

  1. In the WSDL view, right-click the Extensibility Elements node and choose Add -> PartnerLinkType.

    A partner link type node appears under the Extensibility Elements node. The partner link type has a default role.

  2. (Optional) To add a second role, right-click the partner link type node and choose Add -> role.

  3. If the Properties window is not visible, choose Window -> Properties.

  4. For each role, do the following:

    • Change the default name\role.

    • Specify the port type.

Configuring Properties and Property Aliases Using the WSDL View

The BPEL Service Engine uses a mechanism called correlation to track the multiple, stateful, long-running exchanges of messages that typically take place between a BPEL process and its partner services.

The procedure for enabling correlation in a BPEL process includes the following initial steps, which must be performed in the WSDL file:

Once you perform these steps in the WSDL file, you can create a correlation set in the BPEL process. The correlation set references one or more properties. The correlation set can then be used by message activities (Invoke, Reply, and Receive) and by the onMessage branches of Pick elements.

You can also use the BPEL Designer Navigator to add properties and property aliases to a WSDL file. For more information, see the "Adding Properties and Property Aliases to WSDL Files Using the Navigator" topic in the IDE online help.

ProcedureTo add a property to a WSDL file

  1. In the WSDL view, right-click the Extensibility Elements node and choose Add -> Property.

    A property node appears under the Extensibility Elements node.

  2. If the Properties window is not visible, choose Window -> Properties.

  3. Select the property node.

  4. Set the name property.

  5. You can set the ElementOrType property to a built-in simple type, such as string or date. If you added an inline schema or imported a schema, then you can select a type from the schema.

ProcedureTo add a property alias to a WSDL file

  1. In the WSDL view, right-click the Extensibility Elements node and choose Add -> Property Alias.

    A property alias node appears under the Extensibility Elements node.

  2. If the Properties window is not visible, choose Window -> Properties.

  3. Select the property alias node.

  4. Specify values for the propertyName and ElementOrTypeOrMessagePart properties.

    These properties enable you to map data from a message into a property value.

  5. To add a query, right-click the property alias node and choose Add -> query.

    A query node appears. The query node enables you to set the query language and the text of the query.

Finding Usages of WSDL Components

You can quickly determine where a WSDL component is used in the WSDL file.

ProcedureTo find usages of a WSDL component

  1. In the WSDL view, right-click the component and choose Find Usages.

    The Usages window opens in the lower part of the IDE. The window has three parts:

    • Toolbar. The toolbar buttons let you refresh information in the window, expand and collapse nodes in the tree pane, and cycle through the found usages.

    • Tree pane. The tree pane contains nodes for the results of the query.

    • Graph pane. The graph pane shows a graphical representation of the results.

  2. To zoom out, right-click in the graphic and drag up. To zoom in, right-click in the graphic and drag down.

  3. To pan, click and drag in any direction.

  4. To drag a node, click and drag the node.

Adding Documentation

You can add documentation to any WSDL language element.

ProcedureTo add documentation

  1. In the WSDL view, right-click an element and choose Add -> Documentation.

    A documentation node appears.

  2. If the Properties window is not visible, choose Window -> Properties.

  3. Select the documentation node.

  4. Enter the documentation text.

Using Find in the WSDL View

You can search for WSDL components in the current WSDL file.

You can define the type of find to be performed:

For more information about regular expressions, see the "Regular Expressions For Finding and Replacing Text" topic in the IDE online help.

ProcedureTo search for WSDL components

  1. From from the IDE's main menu, choose Edit -> Find. You can also press Ctrl-F.

    The Find bar opens at the bottom of the WSDL view.

  2. In the Find box, click the magnifying glass icon and select the type of search that you want to perform: Component Name, Component Kind, Attribute Declaration, or Attribute Value.

  3. If you want to find matches from a specific point, then select a component in the WSDL view, click the magnifying glass icon, and select Search Selection.

  4. If you want to use a regular expression, then click the magnifying glass icon and select Use regular expression.

  5. In the Find box, type the text or regular expression and press Enter.

    The IDE finds any matching components and highlights the matches in the WSDL view.

  6. To cycle through the matching components, use the Find Next and Find Previous buttons.

To clear highlights after a search

To clear the highlights after a search, click Clear in the Find bar. This removes highlights from the WSDL view.