axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t...@apache.org
Subject cvs commit: xml-axis/java/test/wsdl/inheritance README.txt Parent_bean.java Parent.java Child_bean.java Child.java Baby_bean.java Baby.java InheritanceTestCase.java
Date Tue, 05 Feb 2002 19:36:32 GMT
tomj        02/02/05 11:36:32

  Modified:    java/test/wsdl Wsdl2javaTestSuite.xml Java2WsdlAntTask.java
               java/test/wsdl/inheritance InheritanceTestCase.java
  Added:       java/test/wsdl/inheritance README.txt Parent_bean.java
                        Parent.java Child_bean.java Child.java
                        Baby_bean.java Baby.java
  Log:
  Test case for Java2WSDL options stopClasses and exclude.
  The test validates the generated  WSDL file to insure methods are excluded,
  and the methods and member data in a stop class are not emitted.
  
  Revision  Changes    Path
  1.67      +20 -0     xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml
  
  Index: Wsdl2javaTestSuite.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/Wsdl2javaTestSuite.xml,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- Wsdl2javaTestSuite.xml	2 Feb 2002 15:23:06 -0000	1.66
  +++ Wsdl2javaTestSuite.xml	5 Feb 2002 19:36:31 -0000	1.67
  @@ -202,6 +202,26 @@
                  testcase="no">
           <mapping namespace="urn:InheritanceTest2" package="test.wsdl.inheritance"/>
       </wsdl2java>
  +    
  +    <!-- inheritance test (cont): Test the stopClass and exclude switches -->
  +    <!-- Compile class files -->
  +    <javac srcdir="${test.dir}/wsdl/inheritance" destdir="${build.dest}" debug="${debug}">
  +        <include name="Baby*.java"/>
  +        <include name="Child*.java"/>
  +        <include name="Parent*.java"/>
  +    </javac>
  +    <!-- Generate the WSDL file that the test will validate.-->
  +    <!-- We do not run WSDL2Java for this test -->
  +    <java2wsdl output="build/work/test/wsdl/inheritance/StopExclude.wsdl"
  +               className= "test.wsdl.inheritance.Baby"
  +               namespace="urn:InheritanceTest3"
  +               useInheritedMethods="true"
  +               stopClasses="test.wsdl.inheritance.Parent,test.wsdl.inheritance.Parent_bean"
  +               exclude="baby_excluded,child_excluded"
  +               location="http://localhost:8080/axis/services/StopExcludeTest">
  +        <mapping namespace="urn:InheritanceTest3" package="test.wsdl.inheritance"/>
  +    </java2wsdl>
  +    
   
       <!-- MArrayTests Test -->
       <wsdl2java url="test/wsdl/marrays/MArrayTest.wsdl"
  
  
  
  1.7       +18 -0     xml-axis/java/test/wsdl/Java2WsdlAntTask.java
  
  Index: Java2WsdlAntTask.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/Java2WsdlAntTask.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Java2WsdlAntTask.java	2 Feb 2002 17:19:47 -0000	1.6
  +++ Java2WsdlAntTask.java	5 Feb 2002 19:36:31 -0000	1.7
  @@ -79,6 +79,8 @@
       private String implClass = null;
       private String factory   = null;
       private boolean useInheritedMethods = false;
  +    private String exclude = null;
  +    private String stopClasses = null;
   
       // The method executing the task
       public void execute() throws BuildException {
  @@ -92,6 +94,8 @@
               log("\timplClass:" + implClass, Project.MSG_VERBOSE);
               log("\tfactory:"   + factory,   Project.MSG_VERBOSE);
               log("\tinheritance:" + useInheritedMethods, Project.MSG_VERBOSE);
  +            log("\texcluded:" + exclude, Project.MSG_VERBOSE);
  +            log("\tstopClasses:" + stopClasses, Project.MSG_VERBOSE);
               
               // Instantiate the emitter
               Emitter emitter = new Emitter();
  @@ -107,6 +111,10 @@
                   emitter.setImplCls(implClass);
               if (factory != null)
                   emitter.setFactory(factory);
  +            if (exclude != null)
  +                emitter.setDisallowedMethods(exclude);
  +            if (stopClasses != null)
  +                emitter.setStopClasses(stopClasses);
               emitter.setIntfNamespace(namespace);
               emitter.setLocationUrl(location);
               emitter.setUseInheritedMethods(useInheritedMethods);
  @@ -157,6 +165,16 @@
       // The setter for the "useInheritedMethods" attribute
       public void setUseInheritedMethods(boolean parameter) {
           this.useInheritedMethods = parameter;
  +    }
  +
  +    // The setter for the "exclude" attribute
  +    public void setExclude(String exclude) {
  +        this.exclude = exclude;
  +    }
  +
  +    // The setter for the "stopClasses" attribute
  +    public void setStopClasses(String stopClasses) {
  +        this.stopClasses = stopClasses;
       }
   
       /** the command arguments */
  
  
  
  1.3       +92 -4     xml-axis/java/test/wsdl/inheritance/InheritanceTestCase.java
  
  Index: InheritanceTestCase.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/inheritance/InheritanceTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InheritanceTestCase.java	5 Feb 2002 16:22:40 -0000	1.2
  +++ InheritanceTestCase.java	5 Feb 2002 19:36:31 -0000	1.3
  @@ -55,7 +55,22 @@
   
   package test.wsdl.inheritance;
   
  +import org.apache.axis.utils.XMLUtils;
  +import org.w3c.dom.Document;
  +import org.w3c.dom.Element;
  +import org.w3c.dom.Node;
  +import org.w3c.dom.NodeList;
  +
  +import javax.wsdl.Definition;
  +import javax.wsdl.Operation;
  +import javax.wsdl.PortType;
  +import javax.wsdl.WSDLException;
  +import javax.wsdl.factory.WSDLFactory;
  +import javax.wsdl.xml.WSDLReader;
   import javax.xml.rpc.ServiceException;
  +import java.io.File;
  +import java.util.Iterator;
  +import java.util.List;
   
   /**
    * This class contains the methods necessary for testing that the use inherited methods
  @@ -94,8 +109,7 @@
           test.wsdl.inheritance.InheritancePortType binding;
           try {
               binding = new InheritanceTestLocator().getInheritanceTest();
  -        }
  -        catch (ServiceException jre) {
  +        } catch (ServiceException jre) {
               throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
           }
           assertTrue("binding is null", binding != null);
  @@ -108,7 +122,7 @@
               float delta = 0.0F;
               assertEquals("The actual and expected values did not match.", expected, actual,
delta);
           } catch (java.rmi.RemoteException re) {
  -            throw new junit.framework.AssertionFailedError("Remote Exception caught: "
+ re );
  +            throw new junit.framework.AssertionFailedError("Remote Exception caught: "
+ re);
           }
   
           // The getRealtimeLastTradePrice method should return a value of 21.75 when sent
the 
  @@ -119,10 +133,84 @@
               float delta = 0.0F;
               assertEquals("The actual and expected values did not match.", expected, actual,
delta);
           } catch (java.rmi.RemoteException re) {
  -            throw new junit.framework.AssertionFailedError("Remote Exception caught: "
+ re );
  +            throw new junit.framework.AssertionFailedError("Remote Exception caught: "
+ re);
           }
   
       } // testInheritanceTest
  +
  +    /**
  +     * This test validates the WSDL generated by Java2WSDL 
  +     */
  +    public void testStopClasses() {
  +        String path = "build" + File.separator + "work" + File.separator +
  +                "test" + File.separator + "wsdl" + File.separator +
  +                "inheritance" + File.separator + "StopExclude.wsdl";
  +        Document doc = null;
  +        Definition def = null;
  +        try {
  +            doc = XMLUtils.newDocument(path);
  +            assertNotNull("Unable to locate WSDL file: " + path, doc);
  +            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
  +            //reader.setFeature("javax.wsdl.verbose", true);
  +            def = reader.readWSDL(path, doc);
  +            assertNotNull("unable to generate WSDL definition from document: " + path,
def);
  +        } catch (WSDLException e) {
  +            throw new junit.framework.AssertionFailedError("WSDL Exception caught: " +
e);
  +        }
  +        
  +        // Now check parts of the definition
  +        
  +        // types
  +        // The complex types Baby_bean and Child_bean should exist
  +        // The type Parent_bean should NOT exist
  +        NodeList typeList = doc.getElementsByTagName("types");
  +        Node typeNode = typeList.item(0);
  +        assertNotNull("types section of the WSDL document", typeNode);
  +        Element typeElem = (Element) typeNode;
  +
  +        boolean babyFound = false;
  +        boolean childFound = false;
  +        NodeList nodeList = typeElem.getElementsByTagName("complexType");
  +        for (int i = 0; i < nodeList.getLength(); i++) {
  +            Node n = nodeList.item(i);
  +            String name = nodeList.item(i).getAttributes().getNamedItem("name").getNodeValue();
  +            if (name.equals("Baby_bean"))
  +                babyFound = true;
  +            else if (name.equals("Child_bean"))
  +                childFound = true;
  +            else if (name.equals("Parent_bean"))
  +                assertTrue("Parent_bean found in WSDL types section", false);
  +            else
  +                assertTrue("Unknown node found in types section: " + name, false);
  +        }
  +        assertTrue("Baby_bean not found in WSDL types section", babyFound);
  +        assertTrue("Child_bean not found in WSDL types section", childFound);
  +            
  +        // operations
  +        // The only ones we shold find are baby_method and child_method
  +        boolean babyOpFound = false;
  +        boolean childOpFound = false;
  +        
  +        // we iterate the portTypes, but we check to make sure there is only one
  +        Iterator ip = def.getPortTypes().values().iterator();
  +        PortType portType = (PortType) ip.next();
  +        List operationList = portType.getOperations();
  +        for (int i = 0; i < operationList.size(); ++i) {
  +            String opName = ((Operation) operationList.get(i)).getName();
  +            if (opName.equals("baby_method"))
  +                babyOpFound = true;
  +            else if (opName.equals("child_method"))
  +                childOpFound = true;
  +            else if (opName.equals("parent_method"))
  +                assertTrue("parent_method operation found in WSDL", false);
  +            else
  +                assertTrue("Invalid operation found in WSDL: " + opName, false);
  +        }
  +        assertTrue("WSDL has more than one portType", !ip.hasNext());
  +        assertTrue("baby_method operation not found in WSDL", babyOpFound);
  +        assertTrue("child_method operation not found in WSDL ", childOpFound);
  +
  +    } // testStopClasses
   
   } // InheritanceTestCase
   
  
  
  
  1.1                  xml-axis/java/test/wsdl/inheritance/README.txt
  
  Index: README.txt
  ===================================================================
  This directory tests Java2WSDL generation with inheritance.
  
  Here are the steps executed in the WSDL test suite to perform
  the Java2WSDL inheritance test.
  
  1. WSDL2Java is executed on the InheritanceTest.wsdl in this (the source) 
  directory. This generates some Java files we will need in the build working
  directory.
     
  2. InheritancePortType.java is replaced with the version from this directory.
  The local version extends the StockQuoteProvider interface in 
  StockQuoteProvider.java, which is also copied over to the build working
  directory.
  
  3. The Java files in the working directory are compiled so that Java2WSDL will
  have class files to use.
  
  4. Java2WSDL is run against the InheritancePortType class.  The --all switch is
  used to include inherited methods in the WSDL.  The output is sent to 
  InheritanceTest.wsdl in the build working directory.
  
  5. The class directory created in step 3 is deleted, so we start with a clean
  slate.
  
  6. WSDL2Java is run against the generated WSDL file, and the resulting Java file
  are treated 'as normal' in the WSDL test suite; i.e. any Impl and TestCase files
  are copied from the source tree, the service and client are compiled and the 
  test invocation of the operations are executed.
  
  Here are the addtional steps performed to set up execution of the StopExclude
  test.  This test verifies the behavior of the --stopClasses and --exclude 
  options.
  
  1. The test files, Parent, Child, Baby, Parent_bean, Child_bean, and Baby_bean
  are compiled to the build classes directory.
  
  2. Java2WSDL is executed on the Baby class and the StopExclude.wsdl file is
  generated in the build working directory.
  
  3. The test case testStopExclude in the InheritanceTestCase class manually
  verifies the XML in the types element of the WSDL and WSDL4J is used to
  verify the operation names in the portType of the WSDL.
  
  
  Tom Jordahl
  Febuary 5, 2002
  Note: I did not create the first test, but I did create the second StopExclude
  test.
  
  
  
  1.1                  xml-axis/java/test/wsdl/inheritance/Parent_bean.java
  
  Index: Parent_bean.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.inheritance;
  
  /**
   * This class is listed as a "Stop Class" and should not appear in the
   * WSDL generated by Java2WSDL.
   */ 
  public class Parent_bean {
      public String parent_string;
  
      public String getParent_string() {
          return parent_string;
      }
  
      public void setParent_string(String parent_string) {
          this.parent_string = parent_string;
      }
  }
  
  
  
  1.1                  xml-axis/java/test/wsdl/inheritance/Parent.java
  
  Index: Parent.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.inheritance;
  
  /**
   * This class is listed as a "Stop Class" and its methods should not appear in 
   * the WSDL generated by Java2WSDL.
   */ 
  public class Parent {
      
      public void parent_method(String message) {
          return;
      }
  }
  
  
  
  1.1                  xml-axis/java/test/wsdl/inheritance/Child_bean.java
  
  Index: Child_bean.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.inheritance;
  
  /**
   * This bean should be in the types section of the generated WSDL
   */ 
  public class Child_bean extends Parent_bean {
      
      public String child_string;
  
      public String getChild_string() {
          return child_string;
      }
  
      public void setChild_string(String child_string) {
          this.child_string = child_string;
      }
  }
  
  
  
  1.1                  xml-axis/java/test/wsdl/inheritance/Child.java
  
  Index: Child.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.inheritance;
  
  /**
   * The methods in this class should be listed in Java2WSDL generated WSDL.
   */ 
  public class Child extends Parent {
      
      /**
       * This method should appear in the WSDL
       */ 
      public String child_method(int x) {
          return "child_method";
      }
      
      /**
       * This method is explicitly excluded from the WSDL
       */ 
      public String child_excluded(int argument) {
          return "should never be called"; 
      }
      
  }
  
  
  
  1.1                  xml-axis/java/test/wsdl/inheritance/Baby_bean.java
  
  Index: Baby_bean.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.inheritance;
  
  /**
   ** This bean should be in the types section of the generated WSDL
   */ 
  public class Baby_bean extends Child_bean {
      public String getBaby_string() {
          return baby_string;
      }
  
      public void setBaby_string(String baby_string) {
          this.baby_string = baby_string;
      }
  
      public String baby_string;
      
  }
  
  
  
  1.1                  xml-axis/java/test/wsdl/inheritance/Baby.java
  
  Index: Baby.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.inheritance;
  
  /**
   * This class is the target of given to Java2WSDL.
   */ 
  public class Baby extends Child {
  
      /**
       * This method should appear in the WSDL
       */ 
      public int baby_method(Baby_bean message) {
          return 42;
      }
      
      /**
       * This method is explicitly excluded from the WSDL
       */ 
      public String baby_excluded(int argument) {
          return "should never be called"; 
      }
  }
  
  
  

Mime
View raw message