Overview: Web services

 

+

Search Tips   |   Advanced Search

 

In this topic ...

Consume Web Services Overview
Create Web Services Overview
Publish Web Services

Related Topics ...

How to Consume Web Services
How to Create Web Services

The Designer allows you to consume any Web service whether local or remote, regardless of whether it is implemented with SOAP, CGI, or described by a WSDL document. We can also expose one or more methods in a model as SOAP services described by a WSDL document.

 

Consuming Web Services Overview

We can consume a Web service by adding a Service Call builder to your model and use other builder calls to display or interact with the data returned by the service. There are four general steps to consuming a Web service:

  1. Find the URL to the Web service.

  2. Add a Service Call builder call to a model.

  3. Invoke the service call.

  4. Access the outputs of the service.

The following sections describe each of these steps.

 

Finding a Web Service

We can find a Web service through public Web sites such as xmethods.org. This site lists a growing number of Web services implemented with a variety of tools such as .Net, Apache SOAP, Delphi, GLUE, and others. We can call any of these Web services by using their WSDL document to configure the Service Call builder call.

To find a service on xmethods.org:

  1. In a browser, navigate to http://www.xmethods.org.

  2. Scroll through the list of services and click the link on one you want to use.

  3. In the information page that the browser displays, copy the URL for the service's WSDL document. The following URL is for the WSDL document for a stock service implemented with .NET:

http://ws.cdyne.com/delayedstockquote/delayedstockquote.asmx?wsdl  

Once you have the URL for the service's WSDL document, you can add a service call to a model, so that we can call the service.

 

Calling a Web Service

With the URL to a service's WSDL document in hand, open a model in the Designer so that we can add a service call to it.

In the Builder Call Editor for the service call, you specify the URL to the WSDL document for the service and the Builder Call Editor displays input fields according to the information contained in the WSDL document. You select a method in the service and specify the input values to that method.

The Service Call builder also allows you to specify any basic authorization needed and configure other aspects of the service call such as logging the inputs and outputs and profiling individual inputs on the builder call itself.

Once you have the service call in your model, we can call the specified service by calling the serviceCallName_invoke() method that the Service Call builder adds to the model.

The serviceCallName_reply variable stores the output from the service call.

See the help topic "Consuming Web Services," for more information on how to use Web services in your models.

 

Create Web Services

We can create Web services by adding a Web Service Enable builder call to a model for each method in the model that you want to expose as a Web service.

If your method takes XML inputs (inputs of a complex type), we need to create a schema that defines the structure that your method expects to receive as an input. This schema gets included into the generated WSDL document and is used by other developers calling your service to structure the XML input to your service.

See the help topic "Creating Web Services," for more information on how to create your own Web services in the Designer.

 

Publishing Web Services

We can expose your Web services to other developers in the following way:

  • Distribute the URL to the getWSDL action for your model -- The getWSDL action is a special model action that returns a WSDL document for the Web-Service-enabled methods in a model. For example: http://acme.com/bowstreet/webengine/servicemodels/GetCustomerInfo/Action!getWSDL