Modifying a .NET Web Service project

You can modify a .NET Web Service project from the Project painter. The Project painter displays all the values you selected in .NET Web Service target or project wizards. However, you can also modify version, debug, and run settings from the Project painter. The Objects tab of the Project painter lets you select and rename functions of the nonvisual objects that you deploy to a .NET Web Service component.

.NET Web Service project tab pages

Each .NET Web Service project has the following tab pages: General, Deploy, Objects, Resource Files, Library Files, Version, Post-build, and Run.

General and Deploy tabs See Table 12-3 for a description of the debug fields available on the General tab of the Project painter. The fields on the Deploy tab are all available in the .NET Web Service project wizard. For descriptions of fields available on the Deploy tab, see Table 13-1.

Resource Files tab The Resource Files tab fields in the Project painter are the same as those in the project wizard. However, as for the .NET Assembly project, there is one additional field that is not included in the project or target wizard. This field is a Recursive check box next to each directory you add to the Resource Files list. By default, this check box is selected for each directory when you add it to the list, but you can clear the check box to avoid deployment of unnecessary subdirectory files.

Library Files tab The Library Files tab of the Project painter includes fields for the Win 32 dynamic libraries you want to deploy with your project. These fields are described in Table 12-1. The Library Files tab also includes a list of PBL files for the target. You can select a check box next to each of these PBL files to make sure they are compiled and deployed as PBD files, in addition to .NET assemblies, when the PBLs contain DataWindow or Query objects.

You can clear the check box next to each PBL that you do not want to deploy as a PBD with your project. You need to select only the PBLs containing DataWindow or Query objects that are used by the custom class objects you include in a Web service component. You can use the Select All button to select all the check boxes for the PBLs or the Unselect All button to clear all the check boxes.

Objects tab The Objects tab allows you to select the methods you want to make available for each nonvisual object you deploy as a Web service. You can rename the methods as Web service messages. Table 13-3 describes the Objects tab fields for a .NET Web Service project.

Table 13-3: Fields on the .NET Web Service Objects tab

Objects tab field

Description

Custom class

Select an object in this treeview list to edit its list of methods for inclusion in or exclusion from the Web service component. You can edit the list for all the objects you want to include in the component, but you must do this for one object at a time.

Object name

You can change the object name only by selecting a different object in the Custom Class treeview.

Web service name

Specifies the name for the Web service. By default, this takes the name of the current custom class user object.

Target namespace

Specifies the target namespace. The default namespace for an IIS Web service is: http://tempurl.org. Typically you change this to a company domain name.

Web service URL

Specifies the deployment location for the current custom class user object. This is a read-only field. The location combines selections on the General, Deploy, and Objects tabs for the current project.

Web service WSDL

Specifies the WSDL file created for the project. This is a read-only field. It appends the “?WSDL” suffix to the Web service URL.

Browse Web Service

If you have previously deployed the project to the named IIS server on the Deploy tab of the current project, you can click this button to display a test page for the existing Web service. If a Web service has not been deployed yet for the current custom class object, a browser error message displays. The button is disabled if you selected the option to deploy the current project to a setup file.

View WSDL

If you previously deployed the project to the named IIS server on the Deploy tab of the current project, you can click this button to display the existing WSDL file. If a Web service has not been deployed yet for the current custom class object, a browser error message displays. The button is disabled if you selected the option to deploy the current project to a setup file.

Message names and Function prototypes

Select the check box for each function of the selected custom class object that you want to deploy in a .NET Web service component. Clear the check box for each function you do not want to deploy. You can modify the message names in the Message Names column. The Function Prototype column is for descriptive purposes only.

Change message name

You enable this button by selecting a function in the list of message names. PowerBuilder allows overloaded functions, but each function you deploy in a component class must have a unique name. After you click the Change Message Name button, you can edit the selected function name in the Message Name column.

Select All and Unselect All

Click the Select All button to select all the functions of the current custom class object for deployment. Click the Unselect All button to clear the check boxes of all functions of the current custom class object. Functions with unselected check boxes are not deployed as messages for a Web service component.

Version, Post-build, and Run tabs See Table 12-5 for a description of the version, post-build, and run settings fields. These are the same fields that are available with .NET Assembly projects. They cannot be set in the target or project wizards.

The Run tab settings for a Web Service project typically have default values for the Application and Arguments fields. The Application field default is the path to the Internet Explorer browser on the development computer and the Arguments field default is the URL for a Web Service project test page that is created when you deploy the project.

Security tab The Security tab lets you configure CAS security zones for Web Service components, minimizing the amount of trust required before component code is run from a user application. A radio button group field on the Security tab allows you to select full trust (default) or a customized trust option. The list box below the radio button group is disabled when full trust is selected, but it allows you to select or display the permissions you want to include or exclude when the custom option is selected.

For more information on custom permission requirements, see “Security settings” and Appendix A, “Custom Permission Settings.”

Sign tab The Sign tab settings in the Project painter are the same as those available for other .NET projects, although the field that permits calls to strong-named assemblies from partially trusted code is available only for .NET Assembly and .NET Web Service projects. For descriptions of the fields on the Sign tab, see “Strong-named assemblies”.