How to edit a WSDL file - 6.5

Talend Data Fabric Studio User Guide

EnrichVersion
6.5
EnrichProdName
Talend Data Fabric
task
Data Quality and Preparation
Design and Development
EnrichPlatform
Talend Studio

Talend Studio provides a graphical way to browse and edit your WSDL file in the WSDL editor. Each type of top level WSDL object is shown within a tabular view (for example, service, binding, port type). Each tabular view contains one or more rows that represent the structure of the object. The service, binding, and port type objects are linked. A line is displayed to denote a reference (or association) between these objects.

The screenshot above gives a basic WSDL skeleton which contains:

  • a service, used to aggregate a set of related ports which specify addresses for bindings, thus defining a single communication endpoint.

  • a binding, specifies concrete protocol and data format specifications for the operations and messages defined by a particular port type.

  • a port type, a set of abstract operations that each refer to an input message and output messages.

The WSDL editor allows you to edit a WSDL file in the Properties view.

The Properties view is located on the lower part of the designing editor of Talend Studio and displays a list of attributes and editable attribute values of a selected WSDL object and contains the following tabs to edit:

  • General tab, displays a list of object attributes.

  • Documentation tab, specifies the information you want the user to read.

  • Extensions tab, used to add extension components.

How to add a Service

The service object is a collection of related ports and specifies the location of the Service.

To create a new Service, complete the following steps:

  1. Right click in the blank area of the design workspace to show the contextual menu and select Add Service.

    A new service object is added in the design workspace with a port.

  2. Click the service object to show its Properties view.

  3. In the Properties view, click the General tab. In the Name field, type in the name of the Service. The name of the Service provides it with a unique name among all the Services defined within in the enclosing WSDL file.

  4. Type in any information about the Service you want the user to read in the Documentation tab.

  5. To manage extensions, click the Extensions tab. You can either add, sort, or remove extensions.

You can add ports to your Service. A port defines an individual endpoint by specifying a single address for a binding. For more information, see How to add a port to a Service.

How to add a port to a Service

A port defines an individual endpoint by specifying a single address for a binding. The port contains a Binding attribute that references a binding and an address element that provides a specification for the endpoint.

Services are used to group sets of related ports together. Ports within a Service have the following relationship:

  • None of the ports communicate with each other (for example, the output of one port is not the input of another).

  • If a Service has several ports that share a port type, but employ different bindings or addresses, the ports are alternatives. Each port provides semantically equivalent behavior (within the transport and message format limitations imposed by each binding).

  • You can determine a Service's port types by examining its ports. Using this information, a user can determine if a given machine supports all the operations needed to complete a given task.

To add a port to a Service, complete the following steps:

  1. In the design workspace, right click the Service you want to add a port to and select Add Port in the contextual menu.

  2. The [Port Wizard] displays. Fill in the Name for the port. The name of the port should provide it with a unique name among all the ports defined within the Service.

  3. Select a Binding for the port. For more information on how to set a binding, see How to set a binding.

  4. Select a Protocol for the port from the Protocol list and enter the address of the port into the Address field that appears.

  5. Click Finish to validate the creation. The port is added to the Service and its Properties view displays.

  6. To select the new port, click the port in the service object. You can change the information you entered about this port any time in the General tab of its Properties view.

  7. Type any information about the port you want the user to read in the Documentation tab of the Properties view.

  8. To manage extensions, click the Extensions tab. You can either add, sort, or remove extensions.

You can create a new binding for your port or re-use an existing one. A binding defines the message format and protocol details for operations and messages defined by a particular port type. For more information, see How to set a binding.

How to set a binding

A binding is a top level WSDL object that provides a concrete specification regarding the transmission of messages to and from a Web service. A binding references exactly one port type. The structure of a binding corresponds very closely to that of the port type. The binding contains extensibility elements (for example, SOAP, HTTP, and MIME) that specify protocol specific details. Each port within a Service references exactly one binding.

You can create a binding by right clicking in any blank area in the design workspace and selecting Add Binding in the contextual menu. You can create a new binding or reuse an existing one.

How to create a new binding
  1. Right-click the port and select Set Binding>New Binding.

  2. The [New Binding] dialog box is displayed. Type in the name of the binding in the Name field . The name should be unique among all bindings defined within the enclosing WSDL file. Click OK.

    The new binding is created in the design workspace and connected to the port.

  3. Click the binding you just created in the design workspace to show its Properties view.

  4. To specify the name of the binding, type it in the Name field or click the bulb icon beside the Name field to invoke the rename refactoring.

    When clicking on the bulb icon, a [Save All Modified Resources] dialog box displays prompting you to save all modified resources before proceed.

    Click OK and the [Rename wizard] appears.

    Type in a new name in the New name field. Select the Update references check box to propagate this change to the enclosing WSDL file. Click Preview to have a look at the original source and the refactored source.

    Click OK to validate the change and close the dialog box.

  5. Click the PortType field to set the port type of the binding. You can select the port type you want from the list which contains the port types in your current file, select New... to open the [New PortType] wizard and create a new port type, or select Browse... to open the [Specify Port Type] wizard. For more information, see How to set a port type.

  6. Click the Generate Binding Content... button to show the [Binding Wizard] and specify the details of the binding.

    The Name field shows the name of the binding to be specified. The PortType field shows the port type that the binding references. You can also select the port type you want from the list which contains the port types in your current file. Select the binding options you want to use in the Protocol list. The options are SOAP and HTTP. Use the SOAP protocol when you want to exchange structured and typed information. Use the HTTP protocol when you want your application client to just request or update information.

    If you select SOAP you can then select the encoding style you want to use:

    • document literal. Document style messages, literal encoding. Use this style of binding when you want to send SOAP messages that can be validated by an XML validator. All the data types in the SOAP message body are defined in a schema, so the WSDL parts must point to schema elements.

    • rpc literal. RPC style messages, literal encoding. Use this style of binding when you want to specify the operation method names in your SOAP messages so a server can dispatch the specified methods. Data types must be defined, so the WSDL parts must point to XSD types.

    • rpc encoded. RPC style messages and SOAP encoding. Use this style of binding when you want to encode data graphs in your SOAP messages so a server can deserialize the object data. Data types must be defined, so the WSDL parts must point to XSD types.

    If you select HTTP you can select whether to create an HTTP getter or setter.