Documentation Center

Building and running the Toolkit sample

For detailed information about the prerequisite WorldServer test environment for running a sample, read its config.properties file.

In the ANT script samples/build.xml, the ANT targets that generate, build, deploy, and run the Web service are described below. See also ANT SDK Custom Web Services Build Targets, below.

  • build.webservice.toolkit

    Builds the original SDK application and generates the toolkit Web service; generates WSDL from Toolkit.java; generates Java service and client stubs from the WSDL; builds the toolkit Java service, client stubs, and test application.

    The resulting package, samples/dist/ToolkitWebServiceServer.zip, contains all of the server classes for subsequent deployment of the Web services on the application server.

  • run.app.toolkit

    Runs the original SDK application, and verifies its intended server-side standalone functionality without yet involving any Web services.

  • deploy.webservice.toolkit

    Required parameters: Specify ws.host and ws.context parameter values to customize the WorldServer URL.

    Deploys the toolkit Web service on the running application server; the application server may need to be restarted and must be running before you run this target.

    Prerequisite: Requires the WorldServer environment variable WS_HOME to be configured.

  • run.webservice.toolkit

    Runs the Java toolkit Web client application and verifies that its client-side functionality is identical to server-side SDK functionality.

    Required parameters: Specify ws.host and ws.context parameters to customize the WorldServer URL.

    Prerequisite: Requires the WorldServer environment variable WS_HOME to be configured.

    To run the Java Web client application, you must specify the WorldServer Axis servlet URL. This is the Web-service equivalent of a user typing the WorldServer URL in a Web browser to launch a WorldServer session on the application server.

    Example: Java Web client

    Using the run.webservice.toolkit target, specify ws.host and ws.context parameter values to customize the WorldServer Axis URL:
    samples> ant -Dws.host=localhost:8080 -Dws.context=ws-legacy run.webservice.toolkit
    If you are not using the run.webservice.toolkit target, you must specify the WorldServer Axis servlet URL, as shown in this example:
    toolkit>java -Dws.url=http://localhost:8080/ws-legacy/services com.idiominc.wssdk.samples.component.webservices.toolkit.test.ToolkitTest
  • build.dotnet.webservice.toolkit, run.dotnet.webservice.toolkit (.NET Web services build and run targets)

    Builds and runs the .NET toolkit Web client application and verifies that its client-side functionality is identical to server-side SDK functionality.

    Prerequisite: To build and run the Windows .NET Web client samples, you must first download the .NET Version 4.5.2 SDK (it's easy and free). Two downloads are required (in this order):
    • Microsoft .NET Framework Version 4.5.2 Redistributable Package
    • Microsoft .NET Framework SDK Version 4.5.2

    Then you simply configure your shell by running, for example, c:\Program Files\Microsoft.NET\SDK\v4.5.2\Bin\sdkvars

    ANT targets build.dotnet.webservice.toolkit and run.dotnet.webservice.toolkit are also available to build and run the .NET Web client proxy and tests.

    To build the .NET Web client:
    samples> ant build.dotnet.webservices.samples

    As with the Java Web client, to run the .NET Web client application you must specify the WorldServer Axis servlet URL.

    Example:.NET Web client

    Using the run.dotnet.webservice.toolkit target, specify ws.host and ws.context parameters to customize the WorldServer Axis servlet URL:
    samples> ant -Dws.host=localhost:8080 -Dws.context=ws-legacy run.dotnet.webservice.toolkit
    If you are not using the run.dotnet.webservice.toolkit target, you must specify the WorldServer Axis servlet URL, as shown in this example:
    cd src/com/idiominc/wssdk/samples/component/webservices/toolkit
    toolkit>set WS_URL=http://localhost:8080/ws-legacy/services
    toolkit> dist\Toolkit.exe