The .NET Web Service target wizard gives you the option of creating a target from scratch or from an existing PowerBuilder target.
The .NET Web Service target wizard shares the following fields in common with the .NET Assembly target: Project Name, Target Name, Library, Library Search Path, PowerBuilder Object Name, Description, Resource Files, and Win32 Dynamic DLLs. (Table 12-1 provides decriptions for these fields.) It does not include the Namespace and Assembly File Name fields, which are specific to the .NET Assembly wizard. Although it does include a Setup File Name field, in the .NET Web Service target wizard, this field is part of a deployment option selection.
Table 12-7 shows wizard fields that are unique to the .NET Web Service target with the “from scratch” option selected.
Wizard field |
Description |
---|---|
Web service virtual directory name |
The directory path you want to use as the current directory in the virtual file system on the server. By default, this is the full path name for the current PowerBuilder target. This field is similar to the “Initial current directory” field in the Web Forms wizard. |
Web service URL preview |
Address for accessing the .NET Web service from an application. |
Generate setup file |
Select this option to deploy the Web service in an MSI file. When you select this option, you must provide a name for the setup file. |
Directly deploy to IIS |
Select this option to deploy the Web service directly to an IIS server. When you select this option, you must provide an IIS server address. By default, the server address is “localhost”. |
When you click Finish in the wizard after selecting the option to create a target from scratch, the wizard generates an Application object, a project object, a target, and a nonvisual object. You must add and implement a public method in the nonvisual object generated by the wizard before you can deploy it as a Web service.
As with the other .NET target wizards (.NET Web Forms, .NET Windows Forms, and .NET Assembly), you can use the .NET Web Service target wizard to a target from an existing PowerBuilder target. The existing target must be added to the current workspace and must include a PBL with at least one nonvisual object having at least one public method. The public method must be implemented by the nonvisual object or inherited from a parent. The AutoInstantiate property of the nonvisual object must be set to false.
When you click Finish in the .NET Web Service target wizard, the wizard creates a .NET Web Service target and a .NET Web Service project. The .NET Web Service target uses the same library list as the existing target from which you select nonvisual user objects.
As with the .NET Assembly target wizard, the .NET Web Service target wizard has additional fields for selecting nonvisual user objects when you use the existing target option. Table 12-8 lists these additional fields.
Wizard field |
Description |
---|---|
Choose a target |
Select a target from the list of targets in the current workspace. |
Specify a project name |
Select a name for the project you want to create. You must create a project object to deploy nonvisual objects as .NET components. |
Choose a project library |
Specify a library from the list of target libraries where you want to store the new project object. |
Choose NVO objects to be deployed |
Expand the library node or nodes in the list box and select check boxes next to the nonvisual objects that you want to deploy. |
Use .NET nullable types |
Select this check box to map PowerBuilder standard datatypes to .NET nullable datatypes. Nullable datatypes are not Common Type System (CTS) compliant, but they can be used with .NET Generic classes if a component accepts or returns null arguments or if reference arguments are set to null. |