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.toolkitBuilds 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.toolkitRuns the original SDK application, and verifies its intended server-side standalone functionality without yet involving any Web services.
deploy.webservice.toolkitRequired parameters: Specify
ws.hostandws.contextparameter 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_HOMEto be configured.run.webservice.toolkitRuns the Java toolkit Web client application and verifies that its client-side functionality is identical to server-side SDK functionality.
Required parameters: Specify
ws.hostandws.contextparameters to customize the WorldServer URL.Prerequisite: Requires the WorldServer environment variable
WS_HOMEto 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 therun.webservice.toolkittarget, specifyws.hostandws.contextparameter values to customize the WorldServer Axis URL:samples> ant -Dws.host=localhost:8080 -Dws.context=ws-legacy run.webservice.toolkitIf you are not using therun.webservice.toolkittarget, 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.ToolkitTestbuild.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.samplesAs with the Java Web client, to run the .NET Web client application you must specify the WorldServer Axis servlet URL.
Example:
.NET Web clientUsing therun.dotnet.webservice.toolkittarget, specifyws.hostandws.contextparameters to customize the WorldServer Axis servlet URL:samples> ant -Dws.host=localhost:8080 -Dws.context=ws-legacy run.dotnet.webservice.toolkitIf you are not using therun.dotnet.webservice.toolkittarget, 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