createWebServiceApplication

createWebServiceApplication(applicationName:      String;
                            applicationType:      String;
                            applicationVersion:   String;
                            localeName:           String;
                            initializeMethodName: String;
                            finalizeMethodName:   String;
                            connectionName:       String;
                            numberOfCopies:       Integer;
                            sessionTimeout:       Integer;
                            minimumResponseTime:  Integer;
                            disableMessages:      Boolean;
                            urlScheme:            String;
                            urlMachineName:       String;
                            urlVirtualDirectory:  String;
                            urlSupportLibrary:    String;
                            exposureNames:        String);

The createWebServiceApplication method of the Schema class creates a definition for a Web service provider application.

The createWebServiceApplication method parameters are listed in the following table.

Parameter Description
applicationName The name of the application to be created. The name must not conflict with the name of an exposure list.
 

If an application with this name already exists, the application is updated with the new values.

applicationType Valid values for this parameter are GUI and NON-GUI. When the value is GUI, the Web application monitor is displayed at application startup. The monitor is not displayed when the value is NON-GUI.
applicationVersion The application version number. The value of this parameter can be null (""). The version number cannot exceed 30 characters.
localeName The name of the locale. The value of this parameter can be null (""). If a locale is specified, it must be one of the locales defined for the schema.
initializeMethodName The method to be invoked when the application starts. The value of this parameter can be null (""). The format is:
 
method-name or class-name::method-name
  If a method name only is specified, the method had to exist on the Application subclass (or one of its superclasses) for the schema. If a class name and method name are specified, the class has to be the Application class or one of it subclasses that exist in this schema or one of its superschemas and the method has to exist on the class. In addition, the method cannot have parameters or a return type.
finalizeMethodName The method to be invoked when the application terminates. The value of this parameter can be null (""). The format is:
 
method-name or class-name::method-name

If a method name only is entered, the method had to exist on the Application subclass (or one of its superclasses) for the schema. If a class name and method name are specified, the class has to be the Application class or one of it subclasses that exist in this schema or one of its superschemas and the method has to exist on the class. In addition, the method cannot have parameters or a return type.

connectionName The named pipe name or a TCP/IP connection. The value of this parameter can be null (""). For a TCP/IP connection, the format is machine name or ip-address:port-number.
 

This value is used only if the URL scheme is http

numberOfCopies The number of copies of the application to be started in the node. This parameter must have a value of one (1) or greater.
sessionTimeout The session timeout in minutes. The value of this parameter can be null (""). A value of zero (0) means that there is no session timeout.
minimumResponseTime The minimum response time in seconds for the Web service to respond. The value of this parameter can be null (""). A value of zero (0) means that there is no minimum response time.
disableMessages Set this parameter to true to disable messages from appearing when the Web application monitor is running. The default value is false.
urlScheme Valid values for this parameter are tcp or http. The value of this parameter can be null ("").
urlMachineName When using the tcp protocol the format is machine-name:port-number. The value of this parameter can be null ("").
urlVirtualDirectory The name of a virtual directory on the target Web server. The value of this parameter can be null ("").
urlSupportLibrary jadehttp.dll must be entered if the target Web server is IIS. The value of this parameter can be null ("").
exposureNames A list of exposures that the Web service can use with each exposure name separated from the next by a space. The exposures must already exist and must not require regeneration. You must specify at least one exposure name.

If the validation or update fails, an exception is raised. The extendedErrorText property contains details of the exception.

The following example shows the use of the createWebServiceApplication method.

currentSchema.createWebServiceApplication("CustomerServicesApp", "NON-GUI",
    "", "5129", "initialiseWebService","CustomerGlobal::finaliseWebService",
    "localhost:54000", 1, 10, 0, true, "http", "localhost", "jade", 
    "jadehttp.dll","ErewhonCustomer PrivateCustomer");

You can override some parameters at run time by runtime configuration settings. For details, see "Configuring Web Applications", in Chapter 3 of the JADE Web Application Guide.