axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: ws-axis/java/test/wsdl/types/comprehensive_service TypeTestServiceTestCase.java
Date Mon, 15 Dec 2003 19:25:20 GMT
gdaniels    2003/12/15 11:25:20

  Modified:    java/src/org/apache/axis/wsdl/fromJava Emitter.java
               java/test/wsdl/types ComprehensiveTypes.wsdl
                        VerifyTestCase.java
               java/test/wsdl/types/comprehensive_service
                        TypeTestServiceTestCase.java
  Log:
  Fix type test WSDL by removing the "doc/lit"isms.  Can't use part
  element="" in an RPC service.  We should be throwing errors on
  this stuff.
  
  Fix autogenerated WSDL by skipping anonymous types when
  writing "extra" types.  They will be written underneath the
  appropriate element declaration, and trying to do them
  here causes errors (no context).
  
  Revision  Changes    Path
  1.108     +6 -0      ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java
  
  Index: Emitter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/wsdl/fromJava/Emitter.java,v
  retrieving revision 1.107
  retrieving revision 1.108
  diff -u -r1.107 -r1.108
  --- Emitter.java	24 Nov 2003 20:54:47 -0000	1.107
  +++ Emitter.java	15 Dec 2003 19:25:20 -0000	1.108
  @@ -63,6 +63,7 @@
   import org.apache.axis.Constants;
   import org.apache.axis.InternalException;
   import org.apache.axis.Version;
  +import org.apache.axis.wsdl.symbolTable.SymbolTable;
   import org.apache.axis.description.FaultDesc;
   import org.apache.axis.description.OperationDesc;
   import org.apache.axis.description.ParameterDesc;
  @@ -791,6 +792,11 @@
               for (int i = 0; i < mappedTypes.length; i++) {
                   Class mappedType = mappedTypes[i];
                   QName name = tm.getTypeQName(mappedType);
  +                if (name.getLocalPart().indexOf(SymbolTable.ANON_TOKEN) != -1) {
  +                    // If this is an anonymous type, it doesn't need to be written out
here
  +                    // (and trying to do so will generate an error).  Skip it.
  +                    continue;
  +                }
   
                   /**
                    * If it's a non-standard type, make sure it shows up in
  
  
  
  1.49      +0 -134    ws-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl
  
  Index: ComprehensiveTypes.wsdl
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/types/ComprehensiveTypes.wsdl,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- ComprehensiveTypes.wsdl	17 Nov 2003 15:14:02 -0000	1.48
  +++ ComprehensiveTypes.wsdl	15 Dec 2003 19:25:20 -0000	1.49
  @@ -96,60 +96,6 @@
           </xsd:sequence>
         </xsd:complexType>
   
  -      <xsd:element name="elemWComplex">
  -        <xsd:complexType>
  -          <xsd:all>
  -            <xsd:element name="one" type="typens:simple"/> <!-- Ref to a simple
type -->
  -            <xsd:element name="dateone" type="typens:simpleDate"/>
  -            <xsd:element name="datetwo" type="typens:simpleDateTime"/>
  -            <xsd:element name="two" type="typens2:fwd"/> <!-- Forward type use
to dif namespace -->
  -            <xsd:element ref="typens2:three"/>           <!-- Forward ref use
to a dif namespace -->
  -            <xsd:element ref="typens:enumValue" maxOccurs="unbounded" /> <!--
ref & maxOccurs -->
  -            <xsd:element name="enum1" type="typens:enumString"/>
  -            <xsd:element name="enum2" type="typens:enumInt"/>
  -            <xsd:element name="enum3" type="typens:enumLong"/>
  -            <xsd:element name="enum4" type="typens:enumFloat"/>
  -            <xsd:element name="enum5" type="typens:enumDouble"/>
  -            <xsd:element name="enum6" type="typens:enumShort"/>
  -            <xsd:element name="enum7" type="typens:enumByte"/>
  -            <xsd:element name="enum8" type="typens:enumInteger"/>
  -            <xsd:element name="enum9" type="typens:enumNMTOKEN"/>
  -            <xsd:element name="soapint" type="soapenc:int"/>
  -            <xsd:element name="nested" type="typens2:b"/>
  -            <xsd:element name="D_TSENT" type="xsd:string"/> <!-- test strange
name -->
  -            <xsd:element name="optArray" minOccurs="0" maxOccurs="1" type="typens:array"
/>
  -            <xsd:element name="byteArray" type="typens:array_of_base64" />
  -            <xsd:element name="parm" type="typens:StringParameter" />
  -
  -            <!-- Test for types that are similarly named to common java lang classes
-->
  -            <xsd:element name="myObject" type="typens:Object" />
  -            <xsd:element name="myString" type="typens:String" />
  -            <xsd:element name="myClass" type="typens:Class" />
  -
  -            <!-- Test anonymous type with an element that has maxOccurs -->
  -            <xsd:element name="logEntry" minOccurs="0" maxOccurs="unbounded">
  -              <xsd:complexType>
  -                <xsd:sequence>
  -                   <xsd:element name="name" type="xsd:string"/>
  -                   <xsd:element name="value" type="xsd:string"/>
  -                </xsd:sequence>
  -              </xsd:complexType>
  -            </xsd:element>
  -          </xsd:all>
  -          <xsd:attribute name="attr" type="typens:enum" />
  -          <xsd:attribute name="parmAttr" type="typens:StringParameter" />
  -          <xsd:attribute name="enumAttr">
  -            <xsd:simpleType>
  -              <xsd:restriction base="xsd:string">
  -                <xsd:enumeration value="one"/>                      
  -                <xsd:enumeration value="two"/>                    
  -                <xsd:enumeration value="three"/>                    
  -              </xsd:restriction>
  -            </xsd:simpleType>
  -          </xsd:attribute>
  -        </xsd:complexType>
  -      </xsd:element>
  -
         <xsd:element name="enumValue" type="typens:enum"/>
   
         <xsd:complexType name="time">
  @@ -857,10 +803,6 @@
       <part name="complexSequence" type="typens:complexSequence"/>
     </message>
   
  -  <message name="elemWComplex">
  -    <part name="elemWComplex" element="typens:elemWComplex"/>
  -  </message>
  -
     <message name="complexWComplex">
       <part name="complexWComplex" type="typens:complexWComplex"/>
     </message>
  @@ -1007,22 +949,6 @@
         <input message="tns:empty"/>
         <output message="tns:complexSequence"/>
       </operation>
  -    <operation name="elemWComplexIn">
  -      <input message="tns:elemWComplex"/>
  -      <output message="tns:empty"/>
  -    </operation>
  -    <operation name="elemWComplexInout">
  -      <input message="tns:elemWComplex"/>
  -      <output message="tns:elemWComplex"/>
  -    </operation>
  -    <operation name="elemWComplexOut" parameterOrder="elemWComplex">
  -      <input message="tns:empty"/>
  -      <output message="tns:elemWComplex"/>
  -    </operation>
  -    <operation name="elemWComplexReturn">
  -      <input message="tns:empty"/>
  -      <output message="tns:elemWComplex"/>
  -    </operation>
       <operation name="complexWComplexIn">
         <input message="tns:complexWComplex"/>
         <output message="tns:empty"/>
  @@ -1672,66 +1598,6 @@
         </output>
       </operation>
       <operation name="complexSequenceReturn">
  -      <soap:operation soapAction=""/>
  -      <input>
  -        <soap:body
  -            use="encoded"
  -            namespace=""
  -            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </input>
  -      <output>
  -        <soap:body
  -            use="encoded"
  -            namespace=""
  -            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </output>
  -    </operation>
  -    <operation name="elemWComplexIn">
  -      <soap:operation soapAction=""/>
  -      <input>
  -        <soap:body
  -            use="encoded"
  -            namespace=""
  -            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </input>
  -      <output>
  -        <soap:body
  -            use="encoded"
  -            namespace=""
  -            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </output>
  -    </operation>
  -    <operation name="elemWComplexInout">
  -      <soap:operation soapAction=""/>
  -      <input>
  -        <soap:body
  -            use="encoded"
  -            namespace=""
  -            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </input>
  -      <output>
  -        <soap:body
  -            use="encoded"
  -            namespace=""
  -            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </output>
  -    </operation>
  -    <operation name="elemWComplexOut">
  -      <soap:operation soapAction=""/>
  -      <input>
  -        <soap:body
  -            use="encoded"
  -            namespace=""
  -            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </input>
  -      <output>
  -        <soap:body
  -            use="encoded"
  -            namespace=""
  -            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
  -      </output>
  -    </operation>
  -    <operation name="elemWComplexReturn">
         <soap:operation soapAction=""/>
         <input>
           <soap:body
  
  
  
  1.41      +0 -45     ws-axis/java/test/wsdl/types/VerifyTestCase.java
  
  Index: VerifyTestCase.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/types/VerifyTestCase.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- VerifyTestCase.java	15 Dec 2003 14:37:59 -0000	1.40
  +++ VerifyTestCase.java	15 Dec 2003 19:25:20 -0000	1.41
  @@ -43,7 +43,6 @@
   import test.wsdl.types.comprehensive_types.ComplexAll;
   import test.wsdl.types.comprehensive_types.ComplexSequence;
   import test.wsdl.types.comprehensive_types.ComplexWComplex;
  -import test.wsdl.types.comprehensive_types._elemWComplex;
   import test.wsdl.types.comprehensive_types.EmptyComplexType;
   import test.wsdl.types.comprehensive_types.Enum;
   import test.wsdl.types.comprehensive_types.EnumByte;
  @@ -67,7 +66,6 @@
   import test.wsdl.types.comprehensive_types.holders.ComplexAllHolder;
   import test.wsdl.types.comprehensive_types.holders.ComplexSequenceHolder;
   import test.wsdl.types.comprehensive_types.holders.ComplexWComplexHolder;
  -import test.wsdl.types.comprehensive_types.holders._elemWComplexHolder;
   import test.wsdl.types.comprehensive_types.holders.EmptyComplexTypeHolder;
   import test.wsdl.types.comprehensive_types.holders.EnumHolder;
   import test.wsdl.types.comprehensive_types2.A;
  @@ -412,49 +410,6 @@
           A a = new A();
           a.setC(3);
           b.setD(a);
  -        _elemWComplex elemWComplex = new _elemWComplex();
  -        StringParameter sp = new StringParameter("sweet!");
  -        sp.setDescription("Pass this as an element and an attribute...wow!");
  -
  -        elemWComplex.setOne( new Simple("one"));
  -        elemWComplex.setTwo( new QName[] {new QName("two")});
  -        elemWComplex.setThree( new Enum[] {Enum.three});
  -        elemWComplex.setEnum1( EnumString.value1);
  -        elemWComplex.setEnum2( EnumInt.value1);
  -        elemWComplex.setEnum3( EnumLong.value2);
  -        elemWComplex.setEnum4( EnumFloat.value3);
  -        elemWComplex.setEnum5( EnumDouble.value3);
  -        elemWComplex.setEnum6( EnumShort.value2);
  -        elemWComplex.setEnum7( EnumByte.value1);
  -        elemWComplex.setNested( b);
  -        elemWComplex.setOptArray( optArray );
  -        elemWComplex.setByteArray( byteArray );
  -        elemWComplex.setAttr(Enum.two);
  -        elemWComplex.setParm(sp);
  -        elemWComplex.setParmAttr(sp);
  -
  -        try {
  -            binding.elemWComplexIn(elemWComplex);
  -        } catch (java.rmi.RemoteException re) {
  -            throw new junit.framework.AssertionFailedError("elemWComplexIn Exception caught:
" + re );
  -        }
  -        try {
  -            binding.elemWComplexInout(new _elemWComplexHolder(elemWComplex));
  -        } catch (java.rmi.RemoteException re) {
  -            throw new junit.framework.AssertionFailedError("elemWComplexInout Exception
caught: " + re );
  -        }
  -        try {
  -            _elemWComplexHolder value = new _elemWComplexHolder();
  -            binding.elemWComplexOut(value);
  -        } catch (java.rmi.RemoteException re) {
  -            throw new junit.framework.AssertionFailedError("elemWComplexOut Exception caught:
" + re );
  -        }
  -        try {
  -            _elemWComplex value = null;
  -            value = binding.elemWComplexReturn();
  -        } catch (java.rmi.RemoteException re) {
  -            throw new junit.framework.AssertionFailedError("elemWComplexReturn Exception
caught: " + re );
  -        }
           _complexWComplex_stock_quote stockQuote = new _complexWComplex_stock_quote();
           Time time = new Time();
           time.setDST(false);
  
  
  
  1.2       +0 -85     ws-axis/java/test/wsdl/types/comprehensive_service/TypeTestServiceTestCase.java
  
  Index: TypeTestServiceTestCase.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/test/wsdl/types/comprehensive_service/TypeTestServiceTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeTestServiceTestCase.java	15 Dec 2003 14:38:00 -0000	1.1
  +++ TypeTestServiceTestCase.java	15 Dec 2003 19:25:20 -0000	1.2
  @@ -594,91 +594,6 @@
           // TBD - validate results
       }
   
  -    public void test28TypeTestElemWComplexIn() throws Exception {
  -        test.wsdl.types.comprehensive_service.TypeTestBindingStub binding;
  -        try {
  -            binding = (test.wsdl.types.comprehensive_service.TypeTestBindingStub)
  -                          new test.wsdl.types.comprehensive_service.TypeTestServiceLocator().getTypeTest();
  -        }
  -        catch (javax.xml.rpc.ServiceException jre) {
  -            if(jre.getLinkedCause()!=null)
  -                jre.getLinkedCause().printStackTrace();
  -            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
  -        }
  -        assertNotNull("binding is null", binding);
  -
  -        // Time out after a minute
  -        binding.setTimeout(60000);
  -
  -        // Test operation
  -        binding.elemWComplexIn(new test.wsdl.types.comprehensive_types._elemWComplex());
  -        // TBD - validate results
  -    }
  -
  -    public void test29TypeTestElemWComplexInout() throws Exception {
  -        test.wsdl.types.comprehensive_service.TypeTestBindingStub binding;
  -        try {
  -            binding = (test.wsdl.types.comprehensive_service.TypeTestBindingStub)
  -                          new test.wsdl.types.comprehensive_service.TypeTestServiceLocator().getTypeTest();
  -        }
  -        catch (javax.xml.rpc.ServiceException jre) {
  -            if(jre.getLinkedCause()!=null)
  -                jre.getLinkedCause().printStackTrace();
  -            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
  -        }
  -        assertNotNull("binding is null", binding);
  -
  -        // Time out after a minute
  -        binding.setTimeout(60000);
  -
  -        // Test operation
  -        binding.elemWComplexInout(new test.wsdl.types.comprehensive_types.holders._elemWComplexHolder(new
test.wsdl.types.comprehensive_types._elemWComplex()));
  -        // TBD - validate results
  -    }
  -
  -    public void test30TypeTestElemWComplexOut() throws Exception {
  -        test.wsdl.types.comprehensive_service.TypeTestBindingStub binding;
  -        try {
  -            binding = (test.wsdl.types.comprehensive_service.TypeTestBindingStub)
  -                          new test.wsdl.types.comprehensive_service.TypeTestServiceLocator().getTypeTest();
  -        }
  -        catch (javax.xml.rpc.ServiceException jre) {
  -            if(jre.getLinkedCause()!=null)
  -                jre.getLinkedCause().printStackTrace();
  -            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
  -        }
  -        assertNotNull("binding is null", binding);
  -
  -        // Time out after a minute
  -        binding.setTimeout(60000);
  -
  -        // Test operation
  -        binding.elemWComplexOut(new test.wsdl.types.comprehensive_types.holders._elemWComplexHolder());
  -        // TBD - validate results
  -    }
  -
  -    public void test31TypeTestElemWComplexReturn() throws Exception {
  -        test.wsdl.types.comprehensive_service.TypeTestBindingStub binding;
  -        try {
  -            binding = (test.wsdl.types.comprehensive_service.TypeTestBindingStub)
  -                          new test.wsdl.types.comprehensive_service.TypeTestServiceLocator().getTypeTest();
  -        }
  -        catch (javax.xml.rpc.ServiceException jre) {
  -            if(jre.getLinkedCause()!=null)
  -                jre.getLinkedCause().printStackTrace();
  -            throw new junit.framework.AssertionFailedError("JAX-RPC ServiceException caught:
" + jre);
  -        }
  -        assertNotNull("binding is null", binding);
  -
  -        // Time out after a minute
  -        binding.setTimeout(60000);
  -
  -        // Test operation
  -        test.wsdl.types.comprehensive_types._elemWComplex value = null;
  -        value = binding.elemWComplexReturn();
  -        // TBD - validate results
  -    }
  -
       public void test32TypeTestComplexWComplexIn() throws Exception {
           test.wsdl.types.comprehensive_service.TypeTestBindingStub binding;
           try {
  
  
  

Mime
View raw message