ANT Deploy Task  Locate

Overview  Locate

The Deploy ANT Task is for launching the Deploy command-line tool in Apache ANT. Deploy performs remote deployment of Web services. More details on this tool are given in Deploy Tool.

[Note]Note

Examples You can find usage examples of ANT tasks in WASP_HOME/src/example/tools/ant and in the build.xml files in Demos. See also Example 218.

Task NameTask Class
DeployTaskcom.idoox.wasp.tools.ant.DeployTask

Example 218. Deploy ANT Task

<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="main" name="test">
    <taskdef classname="com.idoox.wasp.tools.ant.DeployTask" 
    name="Deploy"/>
    <target name="main">
        <!-- you can either deploy JAR file made by WaspPackager ... -->
        <Deploy Class="demo.basic.hello.server.HelloService"
         Package="http://wso2.com/package/demo/basic/hello/server:HelloDemo"
            Redeploy="true" Target="http://localhost:6060" 
            Uri="/demo/basic/HelloService">
            <classpath path="${COMPILE_SERVER_CLASSPATH}"/>
        </Deploy>
        <!-- ... or you can let the deploy task to generate package for you
             from the java class file -->
        <Deploy Jarfile="/build/hellopackage.jar" Redeploy="true" 
        Target="http://localhost:6060">
            <classpath path="${COMPILE_SERVER_CLASSPATH}"/>
        </Deploy>
    </target>
</project>

Required Attributes of DeployTask  Locate

Attribute NameDescriptionCommand-line Option
jarfileSets the name of the service JAR file 
Or, alternatively:
uriSets the path of the service on the WSO2 SOA Enablement Server --uri
classSets the service class name --class

Optional Attributes of DeployTask  Locate

Attribute NameDescriptionCommand-line Option
attachmentTypeSets attachment type as MIME or DIME. Default setting is mime.--attachment-type (mime/dime)
classPathRefSets a reference to the classpath element. Used when deploying a class.--classpath
targetSets the URL of the WSO2 SOA Enablement Server that will host the service. Default value is http://localhost:6060.--target
contextSets the context of the package--context
packageSets the name of the service package when deploying class--package
serviceNameSets the name of the service package when deploying class--service-name
redeployIf set, the package will be redeployed--redeploy
forceSets forced Undeploy when redeploying--force
generateWSDLWhen set to false, disables generation of WSDL on client side (allowing server to generate WSDL). Default value is true.--generate-wsdl
disabledIf set, the service will be deployed in the disabled state--disabled
soapBindingStyleSets the SOAP binding style (document (default), rpc or wrapped)--sbs
soapEncodingStyleSets the SOAP encoding style (literal (default) or encoded)--ses
protocolSets SOAP version protocol: soap11, soap12 or soap11 soap 12 (both). Default value is determined by the clientconf.xml--protocol
securityProviderSets the security provider--security-provider
usernameSets the username that is used for authentication--username
passwordSets the password that is used for authentication--password

verbose

Additional information during processing will be printed to stderr. Value is a level from 0-10. Default is 0

--verbose

Sub-elements of the Deploy Task  Locate

<classpath>   Locate

Sets the classpath that the task will use to find other classes.

Attribute of classpathDescription
pathPathname. Syntax is $PATHNAME
refidReference to the id attribute of a path defined elsewhere in the buildfile. Syntax is simply PATH_ID. Useful when using the same path for several tasks.