delete (2)  deploy (2)

Chapter 8: Using wstool, wstkeytool, wstant, and wstkeytoolant

deploy (1)

Description

Creates and deploys a Web service using an implementation class file. This command creates a Web service in the Web service collection name provided by you, or uses “ws” as the default. This command creates the Web service collection if it does not already exist.

Syntax

Command line:

deploy 
[-overwrite true | false] 
[-collection collectionName] 
[-include directory] 
[-classpath path] 
entity

Ant build file:

<taskdef name="wst_antTask" classname="com.sybase.wst.wstool.ant.AntTask"/>
<target name="deploy" > <wst_antTask command="deploy"
[overwrite=“true | false”] 
[collection=“collectionName”] 
[include=“directory”] 
[classpath= “path”] 
entity =“className” >

Where:

Option

Description

overwrite

If set to true, overwrites an existing Web service if it has the same service name. The default is false.

collection

Specifies the collection name. ws is the default Web collection.

include

Specifies the directory that contains any dependent classes. For example:

d:\foo

This option must be in quotes.

classpath

Specifies additional JARs/classes to set in classpath.

NoteJARs must be specified in quotes.

entity

The file that you are deploying. entity should be located in the current directory, or provide the full path. If deploying from an implementation class file, entity is in the format of foo.bar.myclass or foo.bar.myclass.class.

Examples

Example 1

This example deploys the Web service from the com.sybase.mytest class file to MyServiceCollection:

wstool deploy -overwrite true -collection MyServiceCollection -include “d:\classes;d:\moreclasses” com.sybase.mytest

Ant build example:

<wst_antTask command="deploy" collection="CollectionName"
include=”d:\moreclasses”
entity="com.sybase.myTest"/>

NoteYou cannot deploy a class that uses “DefaultNamespace” as the package name. For example: wstool deploy -include “d:\mytest” DefaultNamespace.myTest is not valid.





Copyright © 2005. Sybase Inc. All rights reserved. deploy (2)