Return-Path: Delivered-To: apmail-ws-axis-cvs-archive@www.apache.org Received: (qmail 36039 invoked from network); 27 Jan 2005 09:43:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 27 Jan 2005 09:43:07 -0000 Received: (qmail 93512 invoked by uid 500); 27 Jan 2005 09:43:02 -0000 Delivered-To: apmail-ws-axis-cvs-archive@ws.apache.org Received: (qmail 93420 invoked by uid 500); 27 Jan 2005 09:43:02 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 93401 invoked by uid 99); 27 Jan 2005 09:43:01 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Thu, 27 Jan 2005 01:43:00 -0800 Received: (qmail 35870 invoked by uid 1700); 27 Jan 2005 09:42:59 -0000 Date: 27 Jan 2005 09:42:59 -0000 Message-ID: <20050127094259.35869.qmail@minotaur.apache.org> From: toshi@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/site/src4forrest-060/java/src/documentation/content/xdocs/java/ant ant.xml axis-admin.xml axis-java2wsdl.xml axis-wsdl2java.xml foreach.xml runaxisfunctionaltests.xml X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N toshi 2005/01/27 01:42:59 Added: site/src4forrest-060/java/src/documentation/content/xdocs/java/ant ant.xml axis-admin.xml axis-java2wsdl.xml axis-wsdl2java.xml foreach.xml runaxisfunctionaltests.xml Log: Migration for Forrest 0.6 Revision Changes Path 1.1 ws-axis/site/src4forrest-060/java/src/documentation/content/xdocs/java/ant/ant.xml Index: ant.xml =================================================================== 
WebServices - Axis
Axis Ant Tasks

Axis comes with Ant tasks to automate aspects of the build process inside ant. To use these tasks, you need

  1. Apache Ant 1.5.1 or later
  2. The library axis-ant.jar which contains the tasks
  3. All the main Axis libraries
Declaring the Tasks

To declare the tasks, set up a classpath to include the axis task JAR and all the dependent libraries. Including everything in the axis lib directory should suffice

<path id="axis.classpath"> <fileset dir="${axis.home}/build/lib"> <include name="**/*.jar" /> </fileset> </path>

Then use the <taskdef> declaration to declare all the tasks listed in a properties file inside the axis-ant.jar file:

<taskdef resource="axis-tasks.properties" classpathref="axis.classpath" />
Creating Java files from WSDL

This uses the <axis-wsdl2java> task.

<axis-wsdl2java output="${generated.dir}" testcase="true" verbose="true" url="${local.wsdl}" > <mapping namespace="http://axis.apache.org/ns/interop" package="interop" /> </axis-wsdl2java>

The mapping elements are used to list the mappings from XML namespaces to Java packages; you can include as many as you need.

Creating WSDL files from Java

This uses the <axis-java2wsdl> task.

Talking to the admin service

This can be done with the <axis-admin> task.

<axis-admin port="${target.port}" hostname="${target.server}" failonerror="true" servletpath="${target.appname}/services/AdminService" debug="true" xmlfile="${endpoint-stub.wsdd}" />

Here the target.* properties are pulled from a properties file for the system being deployed to, so a single build file can deploy to different systems with ease.

Foreach Task

<axis-admin>

Runaxisfunctionaltests Task

<axis-admin>

1.1 ws-axis/site/src4forrest-060/java/src/documentation/content/xdocs/java/ant/axis-admin.xml Index: axis-admin.xml =================================================================== 
WebServices - Axis
Axis-admin Task

Task to administer a local or remote Axis server.

Description

Task to administer a local or remote Axis server. Remember, for remote admin, the server has to be accept remote management calls.

Parameters
Attribute Description Type
debug set a debug flag boolean
failonerror Whether or not the build should halt if this task fails. Defaults to true. boolean
fileprotocol specifies that a simple file protocol be used java.lang.String
hostname name the host to admin java.lang.String
newpassword set a new password; only valid if action=passwd java.lang.String
password the admin password java.lang.String
port the port to connect to int
servletpath the path to the AxisAdmin servlet java.lang.String
transportchain set the transport chain to use java.lang.String
url full url to the admin endpoint java.lang.String
username username to log in as java.lang.String
xmlfile the name of the XML file containing deployment information java.io.File
Parameters as nested elements
1.1 ws-axis/site/src4forrest-060/java/src/documentation/content/xdocs/java/ant/axis-java2wsdl.xml Index: axis-java2wsdl.xml =================================================================== 
WebServices - Axis
Axis-java2wsdl Task

Generates a WSDL description from a Java class.

Description

Generates a WSDL description from a Java class.

Parameters
Attribute Description Type
bindingname The name to use use for the binding element. If not specified, the value of the servicePortName + "SoapBinding" is used. java.lang.String
classname the class name to import, eg. org.example.Foo. Required. The class must be on the classpath. java.lang.String
exclude Comma separated list of methods to exclude from the wsdl file. java.lang.String
extraclasses The setter for the "extraClasses" attribute java.lang.String
implclass Sometimes extra information is available in the implementation class file. Use this option to specify the implementation class. java.lang.String
input Optional attribute that indicates the name of the input wsdl file. The output wsdl file will contain everything from the input wsdl file plus the new constructs. If a new construct is already present in the input wsdl file, it is not added. This option is useful for constructing a wsdl file with multiple ports, bindings, or portTypes. java.io.File
location The url of the location of the service. The name after the last slash or backslash is the name of the service port (unless overridden by the -s option). The service port address location attribute is assigned the specified value. java.lang.String
locationimport the location of the interface WSDL when generating an implementation WSDL Required when outputImpl is set java.lang.String
methods If this option is specified, only the indicated methods in your interface class will be exported into the WSDL file. The methods list must be comma separated. If not specified, all methods declared in the interface class will be exported into the WSDL file java.lang.String
namespace the target namespace. Required. java.lang.String
namespaceimpl Namespace of the implementation WSDL. java.lang.String
output The name of the output WSDL file. If not specified, a suitable default WSDL file is written into the current directory. java.io.File
outputimpl Use this option to indicate the name of the output implementation WSDL file. If specified, Java2WSDL will produce separate interface and implementation WSDL files. If not, a single WSDL file is generated java.io.File
porttypename Indicates the name to use use for the portType element. If not specified, the class-of-portType name is used. java.lang.String
serviceelementname the name of the service element. If not specified, the service element is the portTypeNameService. java.lang.String
serviceportname service port name (obtained from location if not specified) java.lang.String
stopclasses Comma separated list of classes which stop the Java2WSDL inheritance search. java.lang.String
style The style of the WSDL document: RPC, DOCUMENT or WRAPPED. If RPC, a rpc/encoded wsdl is generated. If DOCUMENT, a document/literal wsdl is generated. If WRAPPED, a document/literal wsdl is generated using the wrapped approach. java.lang.String
typemappingversion the default type mapping registry to use. Either 1.1 or 1.2. Default is 1.1 org.apache.axis.tools.ant.wsdl.TypeMappingVersionEnum
use Set the use option java.lang.String
useinheritedmethods should inherited methods be exported too? Default=false boolean
Parameters as nested elements

mapping (org.apache.axis.tools.ant.wsdl.NamespaceMapping)
add a mapping of namespaces to packages

mappingset (org.apache.axis.tools.ant.wsdl.MappingSet)
add a mapping of namespaces to packages

1.1 ws-axis/site/src4forrest-060/java/src/documentation/content/xdocs/java/ant/axis-wsdl2java.xml Index: axis-wsdl2java.xml =================================================================== 
WebServices - Axis
Axis-wsdl2java Task

Create Java classes from local or remote WSDL.

Description

Create Java classes from local or remote WSDL. Mappings from namespaces to packages can be provided as nested <mapping> elements.

Proxy settings are taken from the java runtime settings of http.ProxyHost, http.ProxyPort, etc. The Ant task <setProxy> can set these. As well as the nested mapping elements, this task uses the file NStoPkg.properties in the project base directory for namespace mapping

This task does no dependency checking; files are generated whether they need to be or not. The exception to this is the Impl class, which is not overwritten if it exists. This is a safety measure. However, all other classes are generated overwriting anything that exists.

The safe way to use this task is to have it generate the java source in a build directory, then have a <copy> task selectively copy the files you need into a safe location. Again, copying into the source tree is dangerous, but a separate build/src tree is safe. Then include this separate tree in the <javac> task's src attribute to include it in the build. Implement your own implementation classes of the server stub and the test cases using the generated templates. If you want to add methods to autogenerated data types, consider subclassing them, or write helper classes.

Tip: if you <get> the wsdl, and use the <filesmatch> condition to compare the fetched wsdl with a catched copy, you can make the target that calls the axis-wsd2ljava task conditional on the WSDL having changed. This stops spurious code regeneration and follow-on rebuilds across the java source tree.

Parameters
Attribute Description Type
all flag to generate code for all elements, even unreferenced ones default=false; boolean
debug flag for debug output; default=false boolean
deployscope add scope to deploy.xml: "Application", "Request", "Session" optional; java.lang.String
factory name of the Java2WSDLFactory class for extending WSDL generation functions java.lang.String
helpergen Turn on/off Helper class generation; default is false boolean
namespacemappingfile set the mapping file. This is a properties file of package=namespace order. Optional, default is to look for a file called NStoPkg.properties in the project directory. java.io.File
noimports only generate code for the immediate WSDL document, and not imports; default=false; boolean
output output directory for emitted files java.io.File
serverside emit server-side bindings for web service; default=false boolean
skeletondeploy deploy skeleton (true) or implementation (false) in deploy.wsdd. Default is false. Assumes server-side="true". boolean
testcase flag for automatic Junit testcase generation default is false boolean
timeout timeout in milliseconds for URL retrieval; default is 45 seconds. Set this to -1 to disable timeouts altogether: other negative values are not allowed) long
typemappingversion the default type mapping registry to use. Either 1.1 or 1.2. Default is 1.1 org.apache.axis.tools.ant.wsdl.TypeMappingVersionEnum
url URL to fetch and generate WSDL for. Can be remote or a local file. java.lang.String
verbose flag for verbose output; default=false boolean
Parameters as nested elements

mapping (org.apache.axis.tools.ant.wsdl.NamespaceMapping)
add a mapping of namespaces to packages

mappingset (org.apache.axis.tools.ant.wsdl.MappingSet)
add a mapping of namespaces to packages

1.1 ws-axis/site/src4forrest-060/java/src/documentation/content/xdocs/java/ant/foreach.xml Index: foreach.xml =================================================================== 
WebServices - Axis
Foreach Task

Call a target foreach entry in a set of parameters based on a fileset.

Description

Call a target foreach entry in a set of parameters based on a fileset.

For Axis development; there is no support or stability associated with this task

<target name="target1"> <foreach target="target2"> <param name="param1"> <fileset refid="fset1"/> </param> <param name="param2"> <item value="jar" /> <item value="zip" /> </param> </foreach> </target> <target name="target2"> <echo message="prop is ${param1}.${param2}" /> </target>

Really this just a wrapper around "AntCall"
Added a "type" attribute that works precisely like its equivalent in ExecuteOn. It allows the user to specify whether directories, files, or both directories and files from the filesets are included as entries in the parameter set.

Parameters
Attribute Description Type
fork If true, forks the ant invocation. boolean
inheritall If true, pass all properties to the new Ant project. Defaults to true. boolean
inheritrefs If true, pass all references to the new Ant project. Defaults to false boolean
target Target to execute, required. java.lang.String
verbose Enable verbose output when signing ; optional: default false boolean
Parameters as nested elements

param (org.apache.axis.tools.ant.foreach.ParamSet)

1.1 ws-axis/site/src4forrest-060/java/src/documentation/content/xdocs/java/ant/runaxisfunctionaltests.xml Index: runaxisfunctionaltests.xml =================================================================== 
WebServices - Axis
Runaxisfunctionaltests Task

Ant task for starting / stopping servers and running junit in the middle.

Description

Ant task for starting / stopping servers and running junit in the middle. Based on the Cactus org.apache.commons.cactus.ant package, heavily munged and cruftily dumped into one file.

For Axis development; there is no support or stability associated with this task

Parameters
Attribute Description Type
httpservertarget Sets the target to call to start server 2. java.lang.String
httpstoptarget Sets the stop target. This is the target which does a HTTP admin shutdown on the simple server. java.lang.String
tcpservertarget Sets the target to call to start server 1. java.lang.String
testtarget Sets the target to call to run the tests. java.lang.String
url Sets the target URL (just http://host:port) java.lang.String
Parameters as nested elements