Skip to main content

Using the Web Service Wizard

Using the Web Service Wizard

The Web Service Wizard generates a simple stub.

  1. Click File > New.

    This displays the New dialog box.

  2. Click the General tab.

  3. Click New Web Service and then click OK.

    This displays a wizard.

  4. Enter values for the package name, class name, and web service name. These are required.

  5. Optionally edit the namespace URI (or change this initial value later). This is the XML namespace, not the InterSystems IRIS namespace.

  6. Optionally type a list of method names, on separate lines.

  7. Click OK.

Now, you have a new web service class that contains stubs for the web methods. For example:

/// MyApp.StockService
Class MyApp.StockService Extends %SOAP.WebService 
{

/// Name of the WebService.
Parameter SERVICENAME = "StockService";

/// TODO: change this to actual SOAP namespace.
/// SOAP Namespace for the WebService
Parameter NAMESPACE = "https://tempuri.org";

/// Namespaces of referenced classes will be used in the WSDL.
Parameter USECLASSNAMESPACES = 1;

/// TODO: add arguments and implementation.
/// Forecast
Method Forecast() As %String [ WebMethod ]
{
   ;Quit "Forecast"
}

}
FeedbackOpens in a new tab