How To : Importing a WSDL File

Page Status: Beta

Back to Concepts and HOW TOs

Contents

[edit] Description

This document describes how to import a Web Services Description Language file (WSDL) into a project .

[edit] Prerequisites

Understanding WSDL Files

[edit] Procedure

To import a WSDL into your project:

  1. Choose between path A or B:
    1. On the menu bar at the top of Bungee Builder, choose Solution > New,
      1. In the dialog that appears, from the Design Group drop down box, choose the design group in which you want to create the new solution.
      2. In the Soution Name text box, type the name you want to give your solution.
      3. In the Choose the Projects you would like to include in your Solution pane, select WSDL (Web Service Description Language)

        Note You may also want to keep the TypeLib and AppProject items selected as well, as you are likely to need both types of projects if you are creating a full-fledged application.

      4. Click Next.
      5. In the New Typelib Project Settings pane, in the Name text box, type the name you want to give your WSDL file.
      6. Click Next.
    2. At the top of the Solution Explorer on the root node of the solution tree, right-click and choose Add Project.
      1. From the Choose the Projects you would like to include in your Solution pane, select WSDL (Web Service Description Language).
      2. Click Next.
  2. In the New WSDL Project Settings pane that appears, in the Name text box, type the name you want to give your WSDL file.

    Note The name you provide must be unique, at least within the scope of the solution, or the Bungee system appends a number ensuring name uniqueness.

  3. In the WSDL URL text box, type the URL of the WSDL you want to import (for example: http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl).
  4. If you are importing your WSDL from a disk, select Upload WSDL from Disk, then click Upload.
    1. In the dialog that appears, click Upload, then browse to the disk location and click Open, then click Attach File.
  5. If you are wanting to import more than one WSDL into this project, click Import. When the Success! text appears, then type a new Name and new WSDL URL, then click Import again. Repeat for as many separate WSDLs as you are adding.
  6. Click Done.
  7. The new WSDL appears at the bottom of the Solution Explorer. If you want, you can expand the solution tree node for the imported service, and begin inspecting the structure of the WSDL.
  8. Note If a WSDL has more than one namespace, the Bungee system imports each namespace in the WSDL into a separate TypeLib. The naming convention of these TypeLibs is: <namespace>. Since most WSDLs only have one namespace, the entire WSDL will be imported into one project named <WSDL project name>.

[edit]  Updating a WSDL

When a WSDL is updated by the source that publishes the WSDL, your Bungee-powered application may "break." When this occurs, re-synchronize the WSDL, which updates the imported data.

To update a WSDL:

  1. Open your application in Bungee Builder.
  2. Either right-click on the WSDL project and choose Update project WSDL, or click the Update Project WSDL button at the top of the Solution Explorer
    1. If needed, in the Change WSDL Location text box, type the new location of the updated WSDL, or if you have a copy of the WSDL on disk, select Upload WSDL from Disk, then click Upload.
    2. In the dialog that appears, click Upload, then browse to the disk location and click Open, then click Attach File.
  3. In the dialog box that's displayed, click OK.

[edit] Error Handling

If there is a problem importing the WSDL, an error dialog appears containing information about the errors encountered. For example, in the image below, the URL supplied as the WSDL Location was for a web page that contains a link to the WSDL, and was not for the actual WSDL. This resulted in the error message details that appear in the image.

In addition, you can use the Event Viewer to view the actual XML received and sent. When an error occurs, the XML is automatically sent to the Event Viewer. However, if you want the XML to always be sent to the Event Viewer, you need to set a variable on the SOAP service. To set the variable, add an assignment statement, in Bungee Logic, and set the left side to servicename.throwDebugMessages (under Inherited : SoapService), and the right side to Data with the checkbox checked (this sets the Boolean to true), where servicename is the name of the SOAP service (see below).

[edit] Examples

The image below shows a WSDL that has been imported into Bungee Builder, and the resulting class structure in the Solution Explorer.

Click for a larger image

[edit] Next Steps

Adding a Class
Adding a Field to a Class
Adding a Function to a Class
Adding a Form to a Class

[edit] Tags


Log in if you would like to rate this page.
    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.