Condividi tramite


Web Service Publishing

The Visual FoxPro Web Service extensions make it possible for you to publish Visual FoxPro COM servers as Web Services to be accessed anywhere on the Web. These extensions provide Web Service publishing capabilities using various objects from the Toolkit.

To publish a Web Service

  1. Right-click the COM server project, and select the Builder menu item.

  2. Choose the Web Services Publisher list item from the Wizard Selection dialog box.

    -or-

  3. From the Tools menu, point to Wizards, and then select Web Services.

    -or-

  4. From the Tools menu, point to Wizards, and then select All Wizards.

  5. Choose the Web Services Publisher list item from the Wizard Selection dialog box.

    -or-

  • Launch the Web Services Publisher dialog box programmatically with the following code:

       DO (_wizard) WITH "project",,"Web"
    

Web Services Publisher Dialog Box

You can use the basic Web Services Publisher dialog box to expedite the process of publishing a Web Service. This dialog box uses the default URL location (virtual directory) for its settings. The Advanced dialog box displays these default settings and makes it possible for you to make more changes. Settings are persisted so that you can republish your Web Service later with newly generated support files.

Name Description
COM Server combo box Displays the file name of the COM server to be published. By default, a COM server associated with an active project is displayed. The combo box contains a list of all COM servers associated with open projects as well as previously published COM servers.
Select Class combo box Makes it possible for you to specify an individual class (OLEPUBLIC) of the COM server to be published. This combo box includes all classes contained in the COM server. Click the () button to display the open file dialog box so you can select a COM server (DLL/EXE).
Advanced button Displays a dialog box that provides more control of support files generated for the Web Service. Any settings made in the Advanced dialog box are used when you click the Generate button.
Generate button Generates all the Web Service support files necessary to publish your COM server as a Web Service including an ASP listener and the WSDL files.

Advanced Web Services Publisher Dialog Box

The Advanced dialog box makes it possible for you to override the default settings for the Web Service you want to publish. Settings are persisted so you can republish your Web Service later with newly generated support files.

Name Description
WSDL URL combo box Specifies the URL for the WSDL file. This combo box contains a list of suggested locations based on the set of virtual directories on your default Web server. Click the () button to display the Web Services URL Location dialog box so you can choose an existing or new virtual directory.
WSDL File text box Displays the WSDL file name. Click the () button to display the Save As file dialog box so you can change the file name for the WSDL file.
Listener ISAPI radio button When clicked, this button specifies that the listener used is an ISAPI listener. This is the default option and offers the fastest performance.
Listener ASP radio button When clicked, specifies that an ASP file is used as the listener for your Web service.
ASP listener URL combo box Specifies the URL for the ASP listener file. This combo box contains a list of suggested locations based on the set of virtual directories on your default Web server.
ASP listener File text box Displays the ASP listener file name. Click the () button to display the Save As file dialog box, so you can change the file name for the ASP listener file.
ASP listener Application Application name used in the ASP script of the listener file.
VBScript radio button When clicked, VBScript is the scripting language used in the ASP listener file.
JScript radio button When clicked, JScript is the scripting language used in the ASP listener file.
IntelliSense scripts check box If selected, an IntelliSense entry will be added (replaced) for your Web Service when you click the Generate button in the Web Services Publisher dialog box.
IntelliSense scripts name Specifies the friendly name that appears in the IntelliSense type list (for example, LOCAL oWS AS).
Automatically generate check box If selected, sets up a project hook with the COM server project so that Web Service support files are automatically generated when the COM server is rebuilt.
Generate with UTF-16 check box If selected, uses UTF-16 Unicode encoding when generating WSDL files.

Note   The Visual FoxPro Web Services Publishing wizard only supports generation of WSDL files containing a single service and port (class). Additionally, all methods for that selected class are included. If you desire to select multiple classes or filter the specific methods, you should use the SOAP Toolkit 2.0 wizard that is available with the Toolkit.

See Also

Web Services Overview | Web Service Registration | Calling Web Services | Specifying a Web Service Default Location | Web Service Deployment | Using the Web Services Project Hook