You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by to...@apache.org on 2002/10/17 22:41:10 UTC

cvs commit: xml-axis/java/test/wsdl/filegen build.xml

tomj        2002/10/17 13:41:10

  Modified:    java/xmls targets.xml
               java/src/org/apache/axis/enum Style.java
               java/tools/org/apache/axis/tools/ant/axis
                        RunAxisFunctionalTestsTask.java
               java/src/org/apache/axis/i18n resource.properties
               java/docs reference.html
               java/tools/org/apache/axis/tools/ant/wsdl
                        Java2WsdlAntTask.java
               java/src/org/apache/axis/wsdl Java2WSDL.java
               java/src/org/apache/axis/wsdl/fromJava Emitter.java
               java     buildTest.xml
               java/test build_functional_tests.xml
               java/test/functional build.xml
               java/test/wsdl/filegen build.xml
  Added:       java/test/wsdl/extra MyService.java
                        ExtraClassesTestCase.java Extra.java build.xml
  Log:
  Enhancement 9393:
    http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9393
  
  Add the --extraClasses (-e) option to Java2WSDL.
  
  Add the setExtraClasses(String) and setExtraClasses(Class[])
  APIs to the Emitter class.
  
  Update the reference documentation to include the --use
  and --extraClasses switches.
  
  Reworked the Style.java enumeration class which is refered
  to in the docs to a) have the comments be in the Javadoc for
  the class and b) escape the angle-brackets so thing show up
  in the Javadoc correctly.
  
  Add the extraClasses option to the Java2WSDL ant task.
  
  Add a test case to test the new option (test/wsdl/extra)
  
  In the process, clean up the functional test targets so
  they do not start the TCP server, which is only needed for
  the test.function tests.  This required some surgery on the
  RunAntFunctionTests.java ant thingy.  The attributes were
  changed from startTarget1/2 to tcpServerTarget and httpServerTarget.
  stopTarget was changed to httpStopTarget.
  
  I fixed up the test/function/build.xml file to not deploy
  the whole world.
  
  The test/wsdl/filegen test no longer needs to start
  up ANY servers, as all its is doing is testing for file
  existence.
  
  NOTE: Any ant guru's out there, if we could prevent the AdminClient from
  getting run when there are no deploy/undeploy files, that would be great.
  
  Revision  Changes    Path
  1.45      +23 -6     xml-axis/java/xmls/targets.xml
  
  Index: targets.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/xmls/targets.xml,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- targets.xml	16 Oct 2002 21:50:39 -0000	1.44
  +++ targets.xml	17 Oct 2002 20:41:08 -0000	1.45
  @@ -472,11 +472,13 @@
     </target>
   
     <target name="component-junit-functional" if="junit.present" depends="component-junit-functional-prepare">
  +
  +    <!-- FIXME - How do we prevent this from running if deploy.xml.propery is empty? -->
       <java classname="org.apache.axis.client.AdminClient" fork="yes">
         <classpath refid="classpath" />
         <arg line="${deploy.xml.property}"/>
       </java>
  -
  +   
      <junit dir="${axis.home}" printsummary="yes" haltonfailure="${test.functional.fail}" fork="yes">
         <classpath refid="classpath" />
         <formatter type="xml" usefile="${test.functional.usefile}"/>
  @@ -491,22 +493,37 @@
         </batchtest>
      </junit>
   
  +   <!-- FIXME - how do we prevent this from running if undeploy.xml.property is empty? -->
       <java classname="org.apache.axis.client.AdminClient" fork="yes">
         <classpath refid="classpath" />
         <arg line="${undeploy.xml.property}"/>
       </java>
     </target>
   
  -  <target name="execute-Component"  depends="transport-layer" >
  +  <target name="execute-Component" depends="setenv" >
  +    <mkdir dir="${test.functional.reportdir}" />
       <runaxisfunctionaltests
         url="http://localhost:${test.functional.TCPListenerPort}"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  +      httpServerTarget="start-functional-test-http-server"
         testTarget="component-test-run"
  -      stopTarget="stop-functional-test-http-server" />
  +      httpStopTarget="stop-functional-test-http-server" />
     </target>
   
  -  <target name="transport-layer" depends="setenv" >
  +  <target name="execute-Component-noServer" depends="setenv">
  +    <mkdir dir="${test.functional.reportdir}" />
  +    <runaxisfunctionaltests testTarget="component-test-run"/>
  +  </target>
  +
  +  <target name="execute-Component-with-tcp"  depends="transport-layer" >
       <mkdir dir="${test.functional.reportdir}" />
  +    <runaxisfunctionaltests
  +      url="http://localhost:${test.functional.TCPListenerPort}"
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
  +      testTarget="component-test-run"
  +      httpStopTarget="stop-functional-test-http-server" />
  +  </target>
  +
  +  <target name="transport-layer" depends="setenv" >
       <ant inheritAll="false" dir="${axis.home}/samples/transport" antfile="build.xml" target="compile" />
     </target>
  
  
  
  1.7       +55 -52    xml-axis/java/src/org/apache/axis/enum/Style.java
  
  Index: Style.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/enum/Style.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Style.java	9 Oct 2002 19:06:31 -0000	1.6
  +++ Style.java	17 Oct 2002 20:41:08 -0000	1.7
  @@ -62,60 +62,63 @@
   
   
   /**
  - * @author rsitze
  + * Description of the different styles
  + * <br>
  + * <b>style=rpc, use=encoded</b><br>
  + *   First element of the SOAP body is the
  + *   operation.  The operation contains
  + *   elements describing the parameters, which 
  + *   are serialized as encoded (possibly multi-ref)
  + * <pre>
  + *   &lt;soap:body&gt;
  + *      &lt;operation&gt;
  + *         &lt;arg1&gt;...&lt;/arg1&gt;
  + *         &lt;arg2&gt;...&lt;/arg2&gt;
  + *      &lt;/operation&gt;
  + * </pre>
  + * <br>
  + * <b>style=RPC, use=literal</b><br>
  + *   First element of the SOAP body is the 
  + *   operation.  The operation contains elements
  + *   describing the parameters, which are serialized
  + *   as encoded (no multi-ref)\
  + * <pre>
  + *   &lt;soap:body&gt;
  + *      &lt;operation&gt;
  + *         &lt;arg1&gt;...&lt;/arg1&gt;
  + *         &lt;arg2&gt;...&lt;/arg2&gt;
  + *      &lt;/operation&gt;
  + * </pre>
  + * <br>
  + * <b>style=document, use=literal</b><br>
  + *   Elements of the SOAP body are the names of the parameters
  + *   (there is no wrapper operation...no multi-ref)
  + * <pre>
  + *   &lt;soap:body&gt;
  + *         &lt;arg1&gt;...&lt;/arg1&gt;
  + *         &lt;arg2&gt;...&lt;/arg2&gt;
  + * </pre>
  + * <br>
  + * <b>style=wrapped</b><br>
  + *    Special case of DOCLIT where there is only one parameter
  + *    and it has the same qname as the operation.  In
  + *    such cases, there is no actual type with the name...the
  + *    elements are treated as parameters to the operation
  + * <pre>
  + *   &lt;soap:body&gt;
  + *      &lt;one-arg-same-name-as-operation&gt;
  + *         &lt;elemofarg1&gt;...&lt;/elemofarg1&gt;
  + *         &lt;elemofarg2&gt;...&lt;/elemofarg2&gt;
  + * </pre>
  + * <br>
  + * <b>style=document, use=encoded</b><br>
  + *    There is not an enclosing operation name element, but
  + *    the parmeterss are encoded using SOAP encoding
  + *     This mode is not (well?) supported by Axis.
  + *
  + * @author Richard Sitze
    */
   public class Style extends Enum {
  -
  -    /**
  -     * Description of the different styles
  -     * 
  -     * style=rpc use=encoded
  -     *   First element of the SOAP body is the
  -     *   operation.  The operation contains
  -     *   elements describing the parameters, which 
  -     *   are serialized as encoded (possibly multi-ref)
  -     *   <soap:body>
  -     *      <operation>
  -     *         <arg1>...</arg1>
  -     *         <arg2>...</arg2>
  -     *      </operation>
  -     *
  -     * style=RPC use=literal
  -     *   First element of the SOAP body is the 
  -     *   operation.  The operation contains elements
  -     *   describing the parameters, which are serialized
  -     *   as encoded (no multi-ref)
  -     *   <soap:body>
  -     *      <operation>
  -     *         <arg1>...</arg1>
  -     *         <arg2>...</arg2>
  -     *      </operation>
  -     *
  -     * style=document use=literal
  -     *   Elements of the SOAP body are the names of the parameters
  -     *   (there is no wrapper operation...no multi-ref)
  -     *
  -     *   <soap:body>
  -     *         <arg1>...</arg1>
  -     *         <arg2>...</arg2>
  -     *
  -     * 
  -     * style=wrapped
  -     *    Special case of DOCLIT where there is only one parameter
  -     *    and it has the same qname as the operation.  In
  -     *    such cases, there is no actual type with the name...the
  -     *    elements are treated as parameters to the operation
  -     *
  -     *   <soap:body>
  -     *      <one-arg-same-name-as-operation>
  -     *         <elemofarg1>...</elemofarg1>
  -     *         <elemofarg2>...</elemofarg2>
  -     * 
  -     * style=document use=encoded
  -     *    This mode doesn't seem to make any sense...
  -     *    Like DOCLIT but the parms are encoded?
  -     *
  -     */
   
       private static final Type type = new Type();
       
  
  
  
  1.3       +43 -26    xml-axis/java/tools/org/apache/axis/tools/ant/axis/RunAxisFunctionalTestsTask.java
  
  Index: RunAxisFunctionalTestsTask.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/tools/org/apache/axis/tools/ant/axis/RunAxisFunctionalTestsTask.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RunAxisFunctionalTestsTask.java	5 Sep 2002 21:06:10 -0000	1.2
  +++ RunAxisFunctionalTestsTask.java	17 Oct 2002 20:41:08 -0000	1.3
  @@ -73,11 +73,11 @@
    */
   public class RunAxisFunctionalTestsTask extends Task
   {
  -    private String startTarget1;
  -    private String startTarget2;
  +    private String tcpServerTarget = null;
  +    private String httpServerTarget = null;
       private String testTarget;
  -    private String stopTarget;
  -    private URL url;
  +    private String httpStopTarget = null;
  +    private URL url = null;
   
       /**
        * Executes the task.
  @@ -85,8 +85,8 @@
       public void execute() throws BuildException
       {
           try {
  -            callStart(startTarget1);
  -            callStart(startTarget2);
  +            callStart(tcpServerTarget);
  +            callStart(httpServerTarget);
               callTests();
           } finally {
               // Make sure we stop the server
  @@ -99,8 +99,17 @@
        */
       private void callStart(String startTarget)
       {
  +        if (startTarget == null) {
  +            return;
  +        }
  +
  +        // Execute the ant target
           new Thread(new TaskRunnable(startTarget)).start();
  -        // try a ping
  +
  +        if (! startTarget.equals(tcpServerTarget))
  +            return;
  +        
  +        // try a ping for the TCP server
           while (true) {
               try {
                   Thread.currentThread().sleep(500);
  @@ -134,24 +143,29 @@
       {
           try {
               // first, stop the tcp server
  -            sendOnSocket("quit\r\n");
  -
  +            if (tcpServerTarget != null) {
  +                sendOnSocket("quit\r\n");
  +            }
  +            
  +            
               // second, and more involvedly, stop the http server
               // Try connecting in case the server is already stopped.
  -            URL url = new URL("http://localhost:8080/");
  -            try {
  -                HttpURLConnection connection = (HttpURLConnection)url.openConnection();
  -                connection.connect();
  -                this.readFully(connection);
  -                connection.disconnect();
  -            } catch (IOException e) {
  -                // Server is not running. Make this task a no-op.
  -                System.out.println("Error from HTTP read: " + e);
  -                return;
  +            if (httpServerTarget != null) {
  +                URL url = new URL("http://localhost:8080/");
  +                try {
  +                    HttpURLConnection connection = (HttpURLConnection)url.openConnection();
  +                    connection.connect();
  +                    this.readFully(connection);
  +                    connection.disconnect();
  +                } catch (IOException e) {
  +                    // Server is not running. Make this task a no-op.
  +                    System.out.println("Error from HTTP read: " + e);
  +                    return;
  +                }
               }
   
               // Call the target that stops the server
  -            antcall(stopTarget);
  +            antcall(httpStopTarget);
   
               // Wait a few ms more (just to make sure)
               try {
  @@ -213,6 +227,9 @@
        * Make a socket to the url, and send the given string
        */
       private void sendOnSocket (String str) throws Exception {
  +        if (url == null)
  +            return;
  +        
           Socket sock = null;
           try {
               sock = new Socket(url.getHost(), url.getPort());
  @@ -250,9 +267,9 @@
        *
        * @param theStartTarget the Ant target to call
        */
  -    public void setStartTarget1(String theStartTarget)
  +    public void setTcpServerTarget(String theStartTarget)
       {
  -        startTarget1 = theStartTarget;
  +        tcpServerTarget = theStartTarget;
       }
   
       /**
  @@ -260,9 +277,9 @@
        *
        * @param theStartTarget the Ant target to call
        */
  -    public void setStartTarget2(String theStartTarget)
  +    public void setHttpServerTarget(String theStartTarget)
       {
  -        startTarget2 = theStartTarget;
  +        httpServerTarget = theStartTarget;
       }
   
       /**
  @@ -279,9 +296,9 @@
        * Sets the stop target.  This is the target which does
        * a HTTP admin shutdown on the simple server.
        */
  -    public void setStopTarget (String theStopTarget)
  +    public void setHttpStopTarget (String theStopTarget)
       {
  -        stopTarget = theStopTarget;
  +        httpStopTarget = theStopTarget;
       }
   
       /**
  
  
  
  1.19      +2 -0      xml-axis/java/src/org/apache/axis/i18n/resource.properties
  
  Index: resource.properties
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/i18n/resource.properties,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- resource.properties	17 Oct 2002 19:12:47 -0000	1.18
  +++ resource.properties	17 Oct 2002 20:41:08 -0000	1.19
  @@ -1041,4 +1041,6 @@
   noMsg=No symbol table entry found for message {0}
   j2woptUse00=The use of items in the binding, either LITERAL or ENCODED
   j2woptBadUse00=The value of the use option must be LITERAL or ENCODED
  +j2woptExtraClasses00=A space or comma separated list of class names to be added to the type section.
  +j2woptBadClass00=Invalid class provided for --extraClasses option: {0}
   operationAlreadySet=Can't modify settings on a Call whose OperationDesc was set by setOperation()
  
  
  
  1.13      +92 -132   xml-axis/java/docs/reference.html
  
  Index: reference.html
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/docs/reference.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- reference.html	2 Oct 2002 13:06:34 -0000	1.12
  +++ reference.html	17 Oct 2002 20:41:08 -0000	1.13
  @@ -240,134 +240,81 @@
   
   <h3><a name="Java2WSDL"></a>Java2WSDL Reference</h3>
   <p>Here is the help message generated from the current tool: </p>
  -<p><tt><font color="#993366">Java2WSDL emitter</font></tt> <br>
  -  <tt><font color="#993366">Usage: java org.apache.axis.wsdl.Java2WSDL [options] 
  -  class-of-portType</font></tt> <br>
  -  <tt><font color="#993366">Options:</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -h, --help</font></tt> 
  -  <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  print this message and exit</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -I, --input 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  input WSDL filename</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -o, --output 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  output WSDL filename</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -l, --location 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  service location url</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -P, --portTypeName 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  portType name (obtained from class-of-portType if not specified)</font></tt> 
  -  <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -b, --bindingName 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  binding name ((--servicePortName value + "SOAPBinding" if not specified)</font></tt> 
  -  <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -S, --serviceElementName 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  service element name (defaults to servicePortName value + "Service")</font></tt> 
  -  <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -s, --servicePortName 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  service port name (obtained from --location if not specified)</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -n, --namespace 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  target namespace</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -p, --PkgtoNS 
  -  &lt;argument>=&lt;value></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  package=namespace, name value pairs</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -m, --methods 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  space or comma separated list of methods to export</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -a, --all</font></tt> 
  -  <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  look for allowed methods in inherited class</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -w, --outputWsdlMode 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  output WSDL mode: All, Interface, Implementation</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -L, --locationImport 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  location of interface WSDL</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -N, --namespaceImpl 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  target namespace for implementation WSDL</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -O, --outputImpl 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  output Implementation WSDL filename, setting this causes</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  --outputWsdlMode to be ignored</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -i, --implClass 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  optional class that contains implementation of methods in</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  class-of-portType.&nbsp; The debug information in the class is used</font></tt> 
  -  <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  to obtain the method parameter names, which are used to set</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  the WSDL part names.</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -x, --exclude 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  space or comma separated list of methods not to export</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -c, --stopClasses 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  space or comma separated list of class names which stop inheritance search </font></tt> 
  -  <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  if --all switch is enabled</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -T, --typeMappingVersion 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  indicate 1.1 or 1.2. The default is 1.2 (SOAP 1.2 JAX-RPC compliant)</font></tt> 
  -  <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -A, --soapAction 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  -  value of the operations soapAction field. Values are DEFAULT,</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  OPERATION or NONE. OPERATION forces soapAction to the name</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  of the operation.  DEFAULT causes the soapAction to be set</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  according to the operations meta data (usually "").  NONE</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  forces the soapAction to "".  The default is DEFAULT.</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -y, --style 
  -  &lt;argument></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  -  the style of the wsdl document: RPC, DOCUMENT or WRAPPED</font></tt> <br>
  -  <tt><font color="#993366">Details:</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp; portType element name= &lt.portTypeName 
  -  value> OR &lt;class-of-portType name></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp; binding element&nbsp; name= &lt;--bindingName value> OR 
  -  &lt;--servicePortName value>SoapBinding</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp; service element&nbsp; name= &lt;--serviceElementName 
  -  value> OR &lt;portTypeName value>Service</font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp; port element &nbsp;&nbsp;&nbsp; name= 
  -  &lt;--servicePortName value></font></tt> <br>
  -  <tt><font color="#993366">&nbsp;&nbsp; address location&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;= 
  -  &lt;--location value></font></tt> <br>
  -  &nbsp; 
  +<p><font color="#993366">
  +<pre>
  +Java2WSDL emitter
  +Usage: java org.apache.axis.wsdl.Java2WSDL [options] class-of-portType
  +Options:
  +        -h, --help
  +                print this message and exit
  +        -I, --input <argument>
  +                input WSDL filename
  +        -o, --output <argument>
  +                output WSDL filename
  +        -l, --location <argument>
  +                service location url
  +        -P, --portTypeName <argument>
  +                portType name (obtained from class-of-portType if not specified)
  +        -b, --bindingName <argument>
  +                binding name (--servicePortName value + "SOAPBinding" if not specified)
  +        -S, --serviceElementName <argument>
  +                service element name (defaults to --servicePortName value + "Service")
  +        -s, --servicePortName <argument>
  +                service port name (obtained from --location if not specified)
  +        -n, --namespace <argument>
  +                target namespace
  +        -p, --PkgtoNS <argument>=<value>
  +                package=namespace, name value pairs
  +        -m, --methods <argument>
  +                space or comma separated list of methods to export
  +        -a, --all
  +                look for allowed methods in inherited class
  +        -w, --outputWsdlMode <argument>
  +                output WSDL mode: All, Interface, Implementation
  +        -L, --locationImport <argument>
  +                location of interface wsdl
  +        -N, --namespaceImpl <argument>
  +                target namespace for implementation wsdl
  +        -O, --outputImpl <argument>
  +                output Implementation WSDL filename, setting this causes --outputWsdlMode to be ignored
  +        -i, --implClass <argument>
  +                optional class that contains implementation of methods in class-of-portType.  
  +				The debug information in the class is used
  +                to obtain the method parameter names, which are used to set
  +                the WSDL part names.
  +        -x, --exclude <argument>
  +                space or comma separated list of methods not to export
  +        -c, --stopClasses <argument>
  +                space or comma separated list of class names which will stop
  +                inheritance search if --all switch is given
  +        -T, --typeMappingVersion <argument>
  +                indicate 1.1 or 1.2.  The default is 1.1 (SOAP 1.1 JAX-RPC 
  +				 compliant  1.2 indicates SOAP 1.1 encoded.)
  +        -A, --soapAction <argument>
  +                value of the operations soapAction field. Values are DEFAULT,
  +                OPERATION or NONE. OPERATION forces soapAction to the name
  +                of the operation.  DEFAULT causes the soapAction to be set
  +                according to the operations meta data (usually "").  NONE forces
  +				the soapAction to "".  The default is DEFAULT.
  +        -y, --style <argument>
  +                The style of binding in the WSDL, either DOCUMENT, RPC, or WRAPPED.
  +        -u, --use <argument>
  +                The use of items in the binding, either LITERAL or ENCODED
  +        -e, --extraClasses <argument>
  +                A space or comma separated list of class names to be added tO
  +                The type section.
  +Details:
  +   portType element name= <--portTypeName value> OR <class-of-portType name>
  +   binding  element name= <--bindingName value> OR <--servicePortName value>Soap
  +Binding
  +   service  element name= <--serviceElementName value> OR <--portTypeName value>
  +Service
  +   port     element name= <--servicePortName value>
  +   address location     = <--location value>
  +</pre>
  +</font>
  +<br>
  + 
   <p><b>-h , --help</b> <br>
     Prints the help message. 
   <p><b>-I, --input &lt;WSDL file></b> <br>
  @@ -441,10 +388,23 @@
   <p><b>-A, --soapAction &lt;argument></b> <br>
     The value of the operations soapAction field. Values are DEFAULT, OPERATION or NONE. OPERATION forces soapAction to the name of the operation.  DEFAULT causes the soapAction to be set according to the operation's meta data (usually "").  NONE forces the soapAction to "".  The default is DEFAULT.
   <p><b>-y, --style &lt;argument></b> <br>
  -  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.
  +  The style of the WSDL document: RPC, DOCUMENT or WRAPPED. The default is RPC.
  +  If RPC is specified, an rpc wsdl is generated. 
  +  If DOCUMENT is specified, a document wsdl is generated. 
  +  If WRAPPED is specified, a document/literal wsdl is generated using the wrapped approach.  
  +  Wrapped style forces the use attribute to be literal.
  +<p><b>-u, --use &lt;argument&gt;</b><br>
  +  The use of the WSDL document: LITERAL or ENCODED. If LITERAL is specified, the 
  +  XML Schema defines the representation of the XML for the request. If ENCODED 
  +  is specified, SOAP encoding is specified in the generated WSDL. 
  +<p><b>-e, --extraClasses &lt;argument&gt;</b><br>
  +  Specify a space or comma seperated list of class names which should be included in the <b>types</b>
  +  section of the WSDL document.  This is useful in the case where your service interface references
  +  a base class and you would like your WSDL to contain XML Schema type defintions for these other
  +  classes.  The -extraClasses option can be specified duplicate times.  
  +  Each specification results in the additional classes being added to the list.
  +
  +
   <h2><a name="Deployment"></a>Deployment (WSDD) Reference</h2>
   Note : all the elements referred to in this section are in the WSDD namespace, 
   namely &quot;http://xml.apache.org/axis/wsdd/&quot;. 
  
  
  
  1.1                  xml-axis/java/test/wsdl/extra/MyService.java
  
  Index: MyService.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package test.wsdl.extra;
  
  /**
   * Test service for Extra Classes test case which verifys that
   * Java2WSDL include the extra classes specified.
   */ 
  public class MyService {
     
      public String myop(String in) {
          return "out";
      }
  }
  
  
  
  
  1.1                  xml-axis/java/test/wsdl/extra/ExtraClassesTestCase.java
  
  Index: ExtraClassesTestCase.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package test.wsdl.extra;
  
  import java.io.File;
  import java.io.IOException;
  import java.util.HashSet;
  import java.util.Set;
  import java.util.Vector;
  
  /**
   * This tests the file generation of only the items that are referenced in WSDL
   * This should extend FileGenTestCase, but we have a dependancy problem as
   * "extra" comes before "filegen".  Oh well.
   * 
   */
  public class ExtraClassesTestCase  extends junit.framework.TestCase {
      public ExtraClassesTestCase(String name) {
          super(name);
      }
  
      /**
       * List of files which should be generated.
       */
      protected Set shouldExist() {
          HashSet set = new HashSet();
          set.add("Extra.java");  // this is the important one
          set.add("MyService.java");
          set.add("MyServiceService.java");
          set.add("MyServiceServiceLocator.java");
          set.add("MyServiceSoapBindingStub.java");
          set.add("MyService.wsdl");
          set.add("ExtraClassesTestCase.java");
          return set;
      } // shouldExist
  
      /**
       * List of files which may or may not be generated.
       */
      protected Set mayExist() {
          HashSet set = new HashSet();
          return set;
      }
  
      /**
       * The directory containing the files that should exist.
       */
      protected String rootDir() {
          return "build" + File.separator + "work" + File.separator +
                  "test" + File.separator + "wsdl" + File.separator +
                  "extra";
      } // rootDir
  
          public void testFileGen() throws IOException {
          String rootDir = rootDir();
          Set shouldExist = shouldExist();
          Set mayExist = mayExist();
  
          // open up the output directory and check what files exist.
          File outputDir = new File(rootDir);
          
          String[] files = outputDir.list();
  
          Vector shouldNotExist = new Vector();
  
          for (int i = 0; i < files.length; ++i) {
              if (shouldExist.contains(files[i])) {
                  shouldExist.remove(files[i]);
              } 
              else if (mayExist.contains(files[i])) {
                  mayExist.remove(files[i]);
              }
              else {
                  shouldNotExist.add(files[i]);
              }
          }
  
          if (shouldExist.size() > 0) {
              fail("The following files should exist but do not:  " + shouldExist);
          }
  
          if (shouldNotExist.size() > 0) {
              fail("The following files should NOT exist, but do:  " + shouldNotExist);
          }
      }
  } // class AllOptionTestCase
  
  
  
  1.1                  xml-axis/java/test/wsdl/extra/Extra.java
  
  Index: Extra.java
  ===================================================================
  /*
   * The Apache Software License, Version 1.1
   *
   *
   * Copyright (c) 2002 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Axis" and "Apache Software Foundation" must
   *    not be used to endorse or promote products derived from this
   *    software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache",
   *    nor may "Apache" appear in their name, without prior written
   *    permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  package test.wsdl.extra;
  
  import java.util.Calendar;
  
  /**
   * Extra class which is provided to Java2WSDL but not referenced in the service
   * class.  A complex type should be generated for the class in the WSDL
   */ 
  public class Extra {
      private String item1;
      private int    item2;
      private Calendar stamp;
  
      public String getItem1() {
          return item1;
      }
  
      public void setItem1(String item1) {
          this.item1 = item1;
      }
  
      public int getItem2() {
          return item2;
      }
  
      public void setItem2(int item2) {
          this.item2 = item2;
      }
  
      public Calendar getStamp() {
          return stamp;
      }
  
      public void setStamp(Calendar stamp) {
          this.stamp = stamp;
      }
  }
  
  
  
  1.1                  xml-axis/java/test/wsdl/extra/build.xml
  
  Index: build.xml
  ===================================================================
  <?xml version="1.0" ?>
  <!DOCTYPE project [
          <!ENTITY properties SYSTEM "file:../../../xmls/properties.xml">
          <!ENTITY paths  SYSTEM "file:../../../xmls/path_refs.xml">
          <!ENTITY taskdefs SYSTEM "file:../../../xmls/taskdefs.xml">
          <!ENTITY taskdefs_post_compile SYSTEM "file:../../../xmls/taskdefs_post_compile.xml">
          <!ENTITY targets SYSTEM "file:../../../xmls/targets.xml">
  ]>
  
  <!-- ===================================================================
  <description>
     Test/Sample Component file for Axis
  
  Notes:
     This is a build file for use with the Jakarta Ant build tool.
  
  Prerequisites:
  
     jakarta-ant from http://jakarta.apache.org
  
  Build Instructions:
     To compile
          ant compile
     To execute
          ant run
  
  Author:
    Matt Seibert mseibert@us.ibm.com
  
  Copyright:
    Copyright (c) 2002-2003 Apache Software Foundation.
  </description>
  ==================================================================== -->
  
  <project default="compile">
  
  <property name="axis.home" location="../../.." />
  <property name="componentName" value="test/wsdl/extra" />
          &properties;
          &paths;
          &taskdefs;
          &taskdefs_post_compile;
          &targets;
  
  <target name="clean">
      <echo message="componentName is ${componentName}"/>
      <echo message="Removing ${build.dir}/**/test/wsdl/extra" />
      <delete dir="${build.dir}/classes/test/wsdl/extra"/>
      <delete dir="${build.dir}/work/test/wsdl/extra"/>
  </target>
  
  <!-- main target, always start from scratch -->
  <target name="compile" depends="clean">
    <echo message="Compiling test.wsdl.extra"/>
    
      <!-- Compile the test classes for Java2WSDL -->
      <javac srcdir="${axis.home}/test/wsdl/extra" 
             destdir="${build.dest}" 
             fork="${javac.fork}"
             debug="${debug}">
        <classpath refid="classpath" />
        <include name="MyService.java" />
        <include name="Extra.java" />
      </javac>
      
      <mkdir dir="${build.dir}/work/test/wsdl/extra"/>
      
      <!-- Generate WSDL from java -->
      <java2wsdl output="${build.dir}/work/test/wsdl/extra/MyService.wsdl"
                 className= "test.wsdl.extra.MyService"
                 extraClasses="test.wsdl.extra.Extra"
                 namespace="http://test.com/extraClasses"
                 location="http://localhost:8080/axis/services/MyService">
          <mapping package="test.wsdl.extra" namespace="http://test.com/extraClasses" />
      </java2wsdl>
      
      <!-- Verify files generated based on everything in WSDL -->
      <wsdl2java url="${build.dir}/work/test/wsdl/extra/MyService.wsdl"
                 output="${axis.home}/build/work"
                 all="yes"
                 verbose="no"
                 testcase="no">
          <mapping namespace="http://test.com/extraClasses" package="test.wsdl.extra"/>
      </wsdl2java>
  
      <!-- Copy the test case -->
      <copy file="ExtraClassesTestCase.java" overwrite="true"
            todir="${build.dir}/work/test/wsdl/extra"/>
  
      <!-- Compile the test case -->
      <javac srcdir="${build.dir}/work" destdir="${build.dest}" fork="${javac.fork}"
             debug="${debug}">
        <classpath refid="classpath" />
        <include name="test/wsdl/extra/*.java" />
      </javac>
  
  </target>
  
  <target name="run" >
    <antcall target="execute-Component-noServer" />
  </target>
  
  </project>
  
  
  
  1.7       +11 -1     xml-axis/java/tools/org/apache/axis/tools/ant/wsdl/Java2WsdlAntTask.java
  
  Index: Java2WsdlAntTask.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/tools/org/apache/axis/tools/ant/wsdl/Java2WsdlAntTask.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Java2WsdlAntTask.java	10 Oct 2002 20:48:05 -0000	1.6
  +++ Java2WsdlAntTask.java	17 Oct 2002 20:41:08 -0000	1.7
  @@ -92,6 +92,7 @@
       private String tm = "1.1";
       private String style = null;
       private String use = null;
  +    private String extraClasses = null;
   
       // The method executing the task
       public void execute() throws BuildException {
  @@ -116,6 +117,7 @@
               log("\toutputImpl:" + outputImpl, Project.MSG_VERBOSE);
               log("\tnamespaceImpl:" + namespaceImpl, Project.MSG_VERBOSE);
               log("\tlocationImport:" + locationImport, Project.MSG_VERBOSE);
  +            log("\textraClasses:" + extraClasses, Project.MSG_VERBOSE);
               
               // Instantiate the emitter
               Emitter emitter = new Emitter();
  @@ -143,6 +145,9 @@
               if (stopClasses != null) {
                   emitter.setStopClasses(stopClasses);
               }
  +            if (extraClasses != null) {
  +                emitter.setExtraClasses(extraClasses);
  +            }
   
               if (tm.equals("1.1")) {
                   emitter.setDefaultTypeMapping(DefaultTypeMappingImpl.getSingleton());
  @@ -274,7 +279,12 @@
       // The setter for the "typeMappingVersion" attribute
       public void setTypeMappingVersion(String parameter) {
           this.tm = parameter;
  -    } 
  +    }
  +
  +    // The setter for the "extraClasses" attribute
  +    public void setExtraClasses(String extraClasses) {
  +        this.extraClasses = extraClasses;
  +    }
   
       /**
        * Used for nested package definitions.
  
  
  
  1.31      +17 -6     xml-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java
  
  Index: Java2WSDL.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/Java2WSDL.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- Java2WSDL.java	10 Oct 2002 17:22:54 -0000	1.30
  +++ Java2WSDL.java	17 Oct 2002 20:41:09 -0000	1.31
  @@ -100,6 +100,7 @@
       protected static final int SOAPACTION_OPT = 'A';
       protected static final int STYLE_OPT = 'y';
       protected static final int USE_OPT = 'u';
  +    protected static final int EXTRA_CLASSES_OPT = 'e';
   
       /**
        *  Define the understood options. Each CLOptionDescriptor contains:
  @@ -202,7 +203,11 @@
           new CLOptionDescriptor("use",   
                   CLOptionDescriptor.ARGUMENT_REQUIRED,
                   USE_OPT,
  -                Messages.getMessage("j2woptUse00"))
  +                Messages.getMessage("j2woptUse00")),
  +        new CLOptionDescriptor("extraClasses",
  +             CLOptionDescriptor.DUPLICATES_ALLOWED + CLOptionDescriptor.ARGUMENT_REQUIRED,
  +             EXTRA_CLASSES_OPT, 
  +             Messages.getMessage("j2woptExtraClasses00"))
           
       };
   
  @@ -386,18 +391,24 @@
                       emitter.setStyle(value);
                   } else {
                       System.out.println(Messages.getMessage("j2woptBadStyle00"));                }
  -            break;
  +                break;
           case USE_OPT:
                   value = option.getArgument();
                   if (value.equalsIgnoreCase("LITERAL") ||
  -                    value.equalsIgnoreCase("ENCODED")) {
  +                        value.equalsIgnoreCase("ENCODED")) {
                       emitter.setUse(value);
                   } else {
                       System.out.println(Messages.getMessage("j2woptBadUse00"));
                   }
  -            break;
  -
  -                
  +                break;
  +        case EXTRA_CLASSES_OPT:
  +                try {
  +                    emitter.setExtraClasses(option.getArgument());
  +                } catch (ClassNotFoundException e) {
  +                    System.out.println(Messages.getMessage("j2woptBadClass00", e.toString()));
  +                }
  +                break;
  +            
           default: 
               break;
           }
  
  
  
  1.74      +69 -3     xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
  retrieving revision 1.73
  retrieving revision 1.74
  diff -u -r1.73 -r1.74
  --- Emitter.java	14 Oct 2002 20:01:36 -0000	1.73
  +++ Emitter.java	17 Oct 2002 20:41:09 -0000	1.74
  @@ -135,9 +135,8 @@
       public static final int MODE_INTERFACE = 1;
       public static final int MODE_IMPLEMENTATION = 2;
   
  -    // Style Modes
  -  
       private Class cls;
  +    private Class[] extraClasses;           // Extra classes to emit WSDL for
       private Class implCls;                 // Optional implementation class
       private Vector allowedMethods = null;  // Names of methods to consider
       private Vector disallowedMethods = null; // Names of methods to exclude
  @@ -169,6 +168,7 @@
       private ServiceDesc serviceDesc2;
       private String soapAction = "DEFAULT";
   
  +    // Style Modes
       /** DEPRECATED - Indicates style=rpc use=encoded */
       public static final int MODE_RPC = 0;
       /** DEPRECATED - Indicates style=document use=literal */
  @@ -215,6 +215,9 @@
           // Write out the interface def
           Document doc = WSDLFactory.newInstance().
               newWSDLWriter().getDocument(intf);
  +        for (int i = 0; extraClasses != null && i < extraClasses.length; i++) {
  +            types.writeTypeForPart(extraClasses[i], null);
  +        }
           types.insertTypesFragment(doc);
           prettyDocumentToFile(doc, filename1);
   
  @@ -264,12 +267,18 @@
                   def = getWSDL();
                   doc = WSDLFactory.newInstance().
                       newWSDLWriter().getDocument(def);
  +                for (int i = 0; extraClasses != null && i < extraClasses.length; i++) {
  +                    types.writeTypeForPart(extraClasses[i], null);
  +                }
                   types.insertTypesFragment(doc);
                   break;
               case MODE_INTERFACE:
                   def = getIntfWSDL();
                   doc = WSDLFactory.newInstance().
                       newWSDLWriter().getDocument(def);
  +                for (int i = 0; extraClasses != null && i < extraClasses.length; i++) {
  +                    types.writeTypeForPart(extraClasses[i], null);
  +                }
                   types.insertTypesFragment(doc);
                   break;
               case MODE_IMPLEMENTATION:
  @@ -1788,9 +1797,10 @@
        * If the value is not a know style, the default setting is used.
        * See org.apache.axis.enum.Style for a description of the interaction between
        * Style/Use
  +     * <br>NOTE: If style is specified as "wrapped", use is set to literal.
        */
       public void setStyle(String value) {
  -        style = Style.getStyle(value);
  +        setStyle(Style.getStyle(value));
       }
   
       /**
  @@ -1799,6 +1809,9 @@
        */
       public void setStyle(Style value) {
           style = value;
  +        if (style.equals(Style.WRAPPED)) {
  +            setUse(Use.LITERAL);
  +        }
       }
   
       /**
  @@ -1870,4 +1883,57 @@
       public void setServiceDesc(ServiceDesc serviceDesc) {
           this.serviceDesc = serviceDesc;
       }
  +
  +    /**
  +     * Return the list of extra classes that the emitter will produce WSDL for.
  +     */ 
  +    public Class[] getExtraClasses() {
  +        return extraClasses;
  +    }
  +
  +    /**
  +     * Provide a list of classes which the emitter will produce WSDL
  +     * type definitions for.
  +     */ 
  +    public void setExtraClasses(Class[] extraClasses) {
  +        this.extraClasses = extraClasses;
  +    }
  +    
  +    /**
  +     * Provide a comma or space seperated list of classes which 
  +     * the emitter will produce WSDL type definitions for.
  +     * The classes will be added to the current list.
  +     */ 
  +    public void setExtraClasses(String text) throws ClassNotFoundException {
  +        ArrayList clsList = new ArrayList();
  +        if (text != null) {
  +            StringTokenizer tokenizer = new StringTokenizer(text, " ,");
  +            while (tokenizer.hasMoreTokens()) {
  +                String clsName = tokenizer.nextToken();
  +                // Let the caller handler ClassNotFoundException
  +                Class cls = ClassUtils.forName(clsName);
  +                clsList.add(cls);
  +            }
  +        }
  +        // Allocate the new array
  +        Class[] ec;
  +        if (extraClasses != null) {
  +            ec = new Class[clsList.size() + extraClasses.length];
  +            // copy existing elements
  +            for (int i = 0; i < extraClasses.length; i++) {
  +                Class c = extraClasses[i];
  +                ec[i] = c;
  +            }
  +        } else {
  +            ec = new Class[clsList.size()];
  +        }
  +        // copy the new classes
  +        for (int i = 0; i < clsList.size(); i++) {
  +            Class c = (Class) clsList.get(i);
  +            ec[i] = c;
  +        }
  +        // set the member variable
  +        this.extraClasses = ec;
  +    }
  +    
   }
  
  
  
  1.43      +15 -15    xml-axis/java/buildTest.xml
  
  Index: buildTest.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/buildTest.xml,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- buildTest.xml	30 Sep 2002 14:44:54 -0000	1.42
  +++ buildTest.xml	17 Oct 2002 20:41:09 -0000	1.43
  @@ -221,18 +221,18 @@
   
       <runaxisfunctionaltests
         url="http://localhost:8088"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
         testTarget="junit-functional"
  -      stopTarget="stop-functional-test-http-server" />
  +      httpStopTarget="stop-functional-test-http-server" />
   
       <!-- now run security test -->
       <runaxisfunctionaltests
         url="http://localhost:8088"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server-secure"
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server-secure"
         testTarget="junit-functional-secure"
  -      stopTarget="stop-functional-test-http-server-secure" />
  +      httpStopTarget="stop-functional-test-http-server-secure" />
   
     </target>
   
  @@ -243,10 +243,10 @@
   
       <runaxisfunctionaltests
         url="http://localhost:8088"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
         testTarget="junit-functional-secure"
  -      stopTarget="stop-functional-test-http-server-secure" />
  +      httpStopTarget="stop-functional-test-http-server-secure" />
   
     </target>
   
  @@ -256,10 +256,10 @@
     <target name="simple-tests" depends="setenv" if="junit.present" >
       <runaxisfunctionaltests
         url="http://localhost:8088"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
         testTarget="printEnv"
  -      stopTarget="stop-functional-test-http-server" />
  +      httpStopTarget="stop-functional-test-http-server" />
     </target>
   
     <!-- =================================================================== -->
  @@ -300,10 +300,10 @@
     <target name="batchTest" depends="transport-layer">
       <runaxisfunctionaltests
         url="http://localhost:${test.functional.TCPListenerPort}"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
         testTarget="batch-junit-functional"
  -      stopTarget="stop-functional-test-http-server" />
  +      httpStopTarget="stop-functional-test-http-server" />
   
       <ant inheritAll="${ant.inheritAll}" inheritRefs="${ant.inheritRefs}" dir="${axis.home}/test/functional" antfile="build.xml" target="run"/>
      </target>
  
  
  
  1.58      +15 -15    xml-axis/java/test/build_functional_tests.xml
  
  Index: build_functional_tests.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/build_functional_tests.xml,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- build_functional_tests.xml	19 Sep 2002 15:58:00 -0000	1.57
  +++ build_functional_tests.xml	17 Oct 2002 20:41:09 -0000	1.58
  @@ -297,18 +297,18 @@
       <!-- This pattern taken from Cactus, http://jakarta.apache.org/commons/cactus -->
       <runaxisfunctionaltests
         url="http://localhost:8088"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
         testTarget="junit-functional"
  -      stopTarget="stop-functional-test-http-server" />
  +      httpStopTarget="stop-functional-test-http-server" />
   
       <!-- now run security test -->
       <runaxisfunctionaltests
         url="http://localhost:8088"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  -      testTarget="junit-functional-secure"
  -      stopTarget="stop-functional-test-http-server-secure" />
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
  +      testTarget="junit-functional"
  +      httpStopTarget="stop-functional-test-http-server" />
   
       <delete file="GetQuote.wsdl"/>
     </target>
  @@ -322,10 +322,10 @@
       <!-- This pattern taken from Cactus, http://jakarta.apache.org/commons/cactus -->
       <runaxisfunctionaltests
         url="http://localhost:8088"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  -      testTarget="junit-functional-tests-only"
  -      stopTarget="stop-functional-test-http-server" />
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
  +      testTarget="junit-functional"
  +      httpStopTarget="stop-functional-test-http-server" />
     </target>
   
     <!-- =================================================================== -->
  @@ -335,10 +335,10 @@
   
       <runaxisfunctionaltests
         url="http://localhost:8088"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  -      testTarget="junit-functional-secure"
  -      stopTarget="stop-functional-test-http-server-secure" />
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
  +      testTarget="junit-functional"
  +      httpStopTarget="stop-functional-test-http-server" />
     </target>
   
     <!-- =================================================================== -->
  
  
  
  1.14      +6 -7      xml-axis/java/test/functional/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/build.xml,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- build.xml	19 Sep 2002 15:58:00 -0000	1.13
  +++ build.xml	17 Oct 2002 20:41:09 -0000	1.14
  @@ -63,16 +63,16 @@
   </target>
   
   <target name="junit-functional-prepare" if="junit.present">
  -   <mkdir dir="${axis.home}/${test.functional.reportdir}" />
  +   <mkdir dir="${test.functional.reportdir}" />
      <path id="deploy.xml.files">
          <fileset dir="${build.dir}">
  -          <include name="work/**/deploy.wsdd"/>
  +          <include name="work/samples/**/deploy.wsdd"/>
          </fileset>
      </path>
   
      <path id="undeploy.xml.files">
          <fileset dir="${build.dir}">
  -          <include name="work/**/undeploy.wsdd"/>
  +          <include name="work/samples/**/undeploy.wsdd"/>
          </fileset>
      </path>
   
  @@ -100,16 +100,15 @@
         <classpath refid="classpath" />
         <arg line="${undeploy.xml.property}"/>
       </java>
  -
   </target>
   
   <target name="run"  depends="setenv" >
       <runaxisfunctionaltests
         url="http://localhost:8088"
  -      startTarget1="start-functional-test-tcp-server"
  -      startTarget2="start-functional-test-http-server"
  +      tcpServerTarget="start-functional-test-tcp-server"
  +      httpServerTarget="start-functional-test-http-server"
         testTarget="junit-functional"
  -      stopTarget="stop-functional-test-http-server" />
  +      httpStopTarget="stop-functional-test-http-server" />
   </target>
   
   </project>
  
  
  
  1.8       +4 -3      xml-axis/java/test/wsdl/filegen/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/filegen/build.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- build.xml	10 Sep 2002 16:06:53 -0000	1.7
  +++ build.xml	17 Oct 2002 20:41:10 -0000	1.8
  @@ -47,11 +47,12 @@
       <echo message="componentName is ${componentName}"/>
       <delete dir="${build.dir}/classes/test/wsdl/filegen"/>
       <delete dir="${build.dir}/work/test/wsdl/filegen"/>
  +    <delete dir="${build.dir}/classes/test/wsdl/filegenAll"/>
  +    <delete dir="${build.dir}/work/test/wsdl/filegenAll"/>
   </target>
   
  -<target name="copy" depends="setenv"/>
   
  -<target name="compile" depends="copy">
  +<target name="compile" depends="clean">
     <echo message="Compiling test.wsdl.filegen"/>
       <!-- Verify files generated based on what is referenced in WSDL -->
       <wsdl2java url="${axis.home}/test/wsdl/filegen/FileGen.wsdl"
  @@ -89,7 +90,7 @@
   </target>
   
   <target name="run" >
  -  <antcall target="execute-Component" />
  +  <antcall target="execute-Component-noServer" />
   </target>
   
   </project>