axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis Constants.java
Date Sat, 02 Nov 2002 01:32:05 GMT
dims        2002/11/01 17:32:05

  Modified:    java/src/org/apache/axis Constants.java
  Added:       java/test/wsdl/anytype AnyService.java
                        AnyServiceServiceTestCase.java
                        AnyServiceSoapBindingImpl.java build.xml
  Log:
  Fix andf testcase for Bug 14182 - Java2WSDL fails when processing java.lang.Object
  
  Revision  Changes    Path
  1.1                  xml-axis/java/test/wsdl/anytype/AnyService.java
  
  Index: AnyService.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.anytype;
  
  public class AnyService {
      public Object run() {
  	    return new String("hello");
      }
  }
  
  
  
  1.1                  xml-axis/java/test/wsdl/anytype/AnyServiceServiceTestCase.java
  
  Index: AnyServiceServiceTestCase.java
  ===================================================================
  /**
   * AnyServiceServiceTestCase.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis WSDL2Java emitter.
   */
  
  package test.wsdl.anytype;
  
  public class AnyServiceServiceTestCase extends junit.framework.TestCase {
      public AnyServiceServiceTestCase(java.lang.String name) {
          super(name);
      }
      public void test1AnyServiceRun() throws Exception {
          test.wsdl.anytype.AnyService binding;
          try {
              binding = new test.wsdl.anytype.AnyServiceServiceLocator().getAnyService();
          }
          catch (javax.xml.rpc.ServiceException jre) {
              if(jre.getLinkedCause()!=null)
                  jre.getLinkedCause().printStackTrace();
              throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
          }
          assertTrue("binding is null", binding != null);
  
          // Test operation
          java.lang.Object value = null;
          value = binding.run();
          System.out.println("Got:" + value);
      }
  
  }
  
  
  
  1.1                  xml-axis/java/test/wsdl/anytype/AnyServiceSoapBindingImpl.java
  
  Index: AnyServiceSoapBindingImpl.java
  ===================================================================
  /**
   * AnyServiceSoapBindingImpl.java
   *
   * This file was auto-generated from WSDL
   * by the Apache Axis WSDL2Java emitter.
   */
  
  package test.wsdl.anytype;
  
  public class AnyServiceSoapBindingImpl implements test.wsdl.anytype.AnyService{
      public java.lang.Object run() throws java.rmi.RemoteException {
          return new String("hello");
      }
  
  }
  
  
  
  1.1                  xml-axis/java/test/wsdl/anytype/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/anytype" />
          &properties;
          &paths;
          &taskdefs;
          &taskdefs_post_compile;
          &targets;
  
  <target name="clean">
      <echo message="componentName is ${componentName}"/>
      <echo message="Removing ${build.dir}/**/test/wsdl/anytype" />
      <delete dir="${build.dir}/classes/test/wsdl/anytype"/>
      <delete dir="${build.dir}/work/test/wsdl/anytype"/>
  </target>
  
  <!-- main target, always start from scratch -->
  <target name="compile" depends="clean">
    <echo message="Compiling test.wsdl.anytype"/>
    
      <!-- Compile the test classes for Java2WSDL -->
      <javac srcdir="${axis.home}/test/wsdl/anytype" 
             destdir="${build.dest}" 
             fork="${javac.fork}"
             debug="${debug}">
        <classpath refid="classpath" />
        <include name="AnyService.java" />
      </javac>
      
      <mkdir dir="${build.dir}/work/test/wsdl/anytype"/>
      
      <!-- Generate WSDL from java -->
      <java2wsdl output="${build.dir}/work/test/wsdl/anytype/AnyService.wsdl"
                 className= "test.wsdl.anytype.AnyService"
                 namespace="http://test.com/AnyService"
                 location="http://localhost:8080/axis/services/AnyService">
          <mapping package="test.wsdl.anytype" namespace="http://test.com/AnyService" />
      </java2wsdl>
      
      <!-- Verify files generated based on everything in WSDL -->
      <wsdl2java url="${build.dir}/work/test/wsdl/anytype/AnyService.wsdl"
                 output="${axis.home}/build/work"
                 all="yes"
                 verbose="no"
                 serverside="yes"
                 testcase="no">
          <mapping namespace="http://test.com/AnyService" package="test.wsdl.anytype"/>
      </wsdl2java>
  
      <!-- Copy the test case -->
      <copy file="AnyServiceServiceTestCase.java" overwrite="true"
            todir="${build.dir}/work/test/wsdl/anytype"/>
  
      <copy file="AnyServiceSoapBindingImpl.java" overwrite="true"
            todir="${build.dir}/work/test/wsdl/anytype"/>
  
  	<!-- Clean up old classes -->
      <delete dir="${build.dir}/classes/test/wsdl/anytype" />
      
      <!-- Compile the test case -->
      <javac srcdir="${build.dir}/work" destdir="${build.dest}" fork="${javac.fork}"
             debug="${debug}">
        <classpath refid="classpath" />
        <include name="test/wsdl/anytype/*.java" />
      </javac>
  
  </target>
  
  <target name="run" >
    <antcall target="execute-Component" />
  </target>
  
  </project>
  
  
  
  1.96      +4 -4      xml-axis/java/src/org/apache/axis/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/Constants.java,v
  retrieving revision 1.95
  retrieving revision 1.96
  diff -u -r1.95 -r1.96
  --- Constants.java	1 Nov 2002 13:49:05 -0000	1.95
  +++ Constants.java	2 Nov 2002 01:32:05 -0000	1.96
  @@ -304,14 +304,14 @@
       public static final String URI_DEFAULT_SCHEMA_XSD = URI_2001_SCHEMA_XSD;
   
       public static final String[] URIS_SCHEMA_XSD = {
  -        URI_1999_SCHEMA_XSD,
  -        URI_2000_SCHEMA_XSD,
           URI_2001_SCHEMA_XSD,
  +        URI_2000_SCHEMA_XSD,
  +        URI_1999_SCHEMA_XSD
       };
       public static final QName [] QNAMES_NIL = {
  -        SchemaVersion1999.QNAME_NIL,
  +        SchemaVersion2001.QNAME_NIL,
           SchemaVersion2000.QNAME_NIL,
  -        SchemaVersion2001.QNAME_NIL
  +        SchemaVersion1999.QNAME_NIL
       };
   
       /**
  
  
  

Mime
View raw message