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 sc...@apache.org on 2002/08/29 23:17:58 UTC

cvs commit: xml-axis/java/test/wsdl/addrNoImplSEI README AddressBook.wsdl build.xml

scheu       2002/08/29 14:17:58

  Modified:    java/test/wsdl Wsdl2javaTestSuite.xml
               java/test/wsdl/addrNoImplSEI AddressBook.wsdl build.xml
  Added:       java/test/wsdl/addrNoImplSEI README
  Log:
  Changes to addrNoImplSEI test.
  Changed wsdl to remove lowercase problems (I am not sure why how this would cause problems).
  Added a readme file to explain my rationale for this test.  Feel free to debate
  me on this.
  
  Added stanzas to the build file to remove classes/java files before the second call
  to wsdl2java.  I am assuming that somehow this is the root cause of the timing problems.
  
  If problems still occur with this test, I can back off the test to remove the
  Java2WSDL stuff...
  
  Cheers
  
  Revision  Changes    Path
  1.124     +9 -5      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.123
  retrieving revision 1.124
  diff -u -r1.123 -r1.124
  --- Wsdl2javaTestSuite.xml	26 Aug 2002 13:10:22 -0000	1.123
  +++ Wsdl2javaTestSuite.xml	29 Aug 2002 21:17:58 -0000	1.124
  @@ -84,14 +84,13 @@
       <!-- AddressBook roundtrip example that does not implement SEI -->
       <!-- Summary -->
       <!-- Bootstrap the process by creating java classes from the original wsdl -->
  -    <!-- Compile the classes plus the provided Impl class -->
  +    <!--  Compile the classes plus the provided Impl class -->
       <!--   The Impl class is supposed to simulate a server-side EJB -->
       <!--   It does not implement the SEI and it contains some additional throw clauses -->
       <!-- Run Java2WSDL on the Impl class to ensure a valid wsdl is generated -->
  -    <!-- Run WSDL2Java on the new wsdl to ensure valid java artifacts are generated -->
  -    <!--   This will ensure that java classes are not generated for NullPointerException -->
  -    <!-- Copy back over the original Impl and test classes.  -->
  -    <!--   They will be compiled and run as part of the test. -->
  +    <!-- Run WSDL2Java on the new wsdl to generate client side and other artifacts -->
  +    <!-- Replace the generated Impl with the original Impl that does not implement the SEI -->
  +    <!--   Compile and run test. -->
       <delete dir="${build.dir}/classes/test/wsdl/addrNoImplSEI"/>
       <delete dir="${build.dir}/work/test/wsdl/addrNoImplSEI"/>
       <wsdl2java url="test/wsdl/addrNoImplSEI/AddressBook.wsdl"
  @@ -121,6 +120,7 @@
         <exclude name="test/wsdl/addrNoImplSEI/Main.java" />
       </javac>
   
  +
       <!-- Now run java to wsdl to make sure we don't have any strange artifacts -->
       <java2wsdl output="build/work/test/wsdl/addrNoImplSEI/AddressBook.wsdl"
                  className= "test.wsdl.addrNoImplSEI.AddressBookNoImplSEISoapBindingImpl"
  @@ -132,6 +132,10 @@
       </java2wsdl>
   
       <!-- Now run wsdl to java to make sure we don't have any strange artifacts -->
  +    <delete dir="${build.dir}/classes/test/wsdl/addrNoImplSEI"/>
  +    <delete>
  +       <fileset dir="${build.dir}/work/test/wsdl/addrNoImplSEI" includes="**/*.java"/>
  +    </delete>
       <wsdl2java url="build/work/test/wsdl/addrNoImplSEI/AddressBook.wsdl"
                  output="build/work"
                  deployscope="session"
  
  
  
  1.4       +7 -7      xml-axis/java/test/wsdl/addrNoImplSEI/AddressBook.wsdl
  
  Index: AddressBook.wsdl
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/addrNoImplSEI/AddressBook.wsdl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AddressBook.wsdl	19 Jun 2002 13:24:25 -0000	1.3
  +++ AddressBook.wsdl	29 Aug 2002 21:17:58 -0000	1.4
  @@ -13,7 +13,7 @@
       <xsd:schema targetNamespace="urn:AddrNoImplSEI"
                   xmlns:xsd="http://www.w3.org/1999/XMLSchema">
   
  -      <xsd:simpleType name="stateType">
  +      <xsd:simpleType name="StateType">
           <xsd:restriction base="xsd:string">
               <xsd:enumeration value="TX"/>                      
               <xsd:enumeration value="IN"/>                    
  @@ -21,7 +21,7 @@
           </xsd:restriction>
         </xsd:simpleType>
   
  -      <xsd:element name="phone">
  +      <xsd:element name="Phone">
           <xsd:complexType>
             <xsd:all>
                 <xsd:element name="areaCode" type="xsd:int"/>
  @@ -31,14 +31,14 @@
           </xsd:complexType>
         </xsd:element>
   
  -      <xsd:complexType name="address">
  +      <xsd:complexType name="Address">
           <xsd:all>
               <xsd:element name="streetNum" type="xsd:int"/>
               <xsd:element name="streetName" type="xsd:string"/>
               <xsd:element name="city" type="xsd:string"/>
  -            <xsd:element name="state" type="typens:stateType"/>
  +            <xsd:element name="state" type="typens:StateType"/>
               <xsd:element name="zip" type="xsd:int"/>
  -            <xsd:element ref="typens:phone"/>
  +            <xsd:element ref="typens:Phone"/>
           </xsd:all>
         </xsd:complexType>
       </xsd:schema>
  @@ -47,7 +47,7 @@
     <!-- message declns -->
     <message name="AddEntryRequest">
       <part name="name" type="xsd:string"/>
  -    <part name="address" type="typens:address"/>
  +    <part name="address" type="typens:Address"/>
     </message>
   
     <message name="GetAddressFromNameRequest">
  @@ -55,7 +55,7 @@
     </message>
   
     <message name="GetAddressFromNameResponse">
  -    <part name="address" type="typens:address"/>
  +    <part name="address" type="typens:Address"/>
     </message>
   
     <!-- port type declns -->
  
  
  
  1.5       +14 -0     xml-axis/java/test/wsdl/addrNoImplSEI/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/wsdl/addrNoImplSEI/build.xml,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- build.xml	29 Aug 2002 19:13:51 -0000	1.4
  +++ build.xml	29 Aug 2002 21:17:58 -0000	1.5
  @@ -53,6 +53,16 @@
   <target name="compile" depends="copy">
     <echo message="Compilig test.wsdl.addrNoImplSEI"/>
   
  +    <!-- AddressBook roundtrip example that does not implement SEI -->
  +    <!-- Summary -->
  +    <!-- Bootstrap the process by creating java classes from the original wsdl -->
  +    <!--  Compile the classes plus the provided Impl class -->
  +    <!--   The Impl class is supposed to simulate a server-side EJB -->
  +    <!--   It does not implement the SEI and it contains some additional throw clauses -->
  +    <!-- Run Java2WSDL on the Impl class to ensure a valid wsdl is generated -->
  +    <!-- Run WSDL2Java on the new wsdl to generate client side and other artifacts -->
  +    <!-- Replace the generated Impl with the original Impl that does not implement the SEI -->
  +    <!--   Compile and run test. -->
       <delete dir="${build.dir}/classes/test/wsdl/addrNoImplSEI"/>
       <delete dir="${build.dir}/work/test/wsdl/addrNoImplSEI"/>
       <wsdl2java url="${axis.home}/test/wsdl/addrNoImplSEI/AddressBook.wsdl"
  @@ -93,6 +103,10 @@
       </java2wsdl>
   
       <!-- Now run wsdl to java to make sure we don't have any strange artifacts -->
  +    <delete dir="${build.dir}/classes/test/wsdl/addrNoImplSEI"/>
  +    <delete>
  +       <fileset dir="${build.dir}/work/test/wsdl/addrNoImplSEI" includes="**/*.java"/>
  +    </delete>
       <wsdl2java url="${axis.home}/build/work/test/wsdl/addrNoImplSEI/AddressBook.wsdl"
                  output="${axis.home}/build/work"
                  deployscope="session"
  
  
  
  1.1                  xml-axis/java/test/wsdl/addrNoImplSEI/README
  
  Index: README
  ===================================================================
  Test addrNoImpSEI
  
  Summary:
  This test is a variant of the AddressBook test.  Unlike
  the regular AddressBook test, the server side implementation
  (AddressBookNoImplSEISoapBindingImpl) does not
  implement the Service Endpoint Interface (SEI).  The 
  server side implementation does contain methods that 
  correspond to the methods defined in the SEI.
  The purpose of this test is to simulate a server side EJB
  which will not implement the SEI, but will have methods that
  match the SEI.
  
  Step 1:
  An AddressBook.wsdl and AddressBookNoImplSEISoapBindingImpl.java
  files are provided.
  
  WSDL2Java is run on AddressBook.wsdl to create the client side
  artifacts and deployment data.
  
  Step 2:
  The generated AddressBookNoImplSEISoapBindingImpl.java is
  replaced with the provided one that does not implement the SEI.
  
  Step 3:
  These files are compiled to ensure that the generated artifacts
  and provided file are correct.  In a normal scenario, we would
  run the test at this point.
  
  Step 4:
  We now have a setup that simulates the setup for an EJB scenario.
  Java2WSDL is run on the server implementation to make sure it 
  is possible to generate a wsdl file describing this service.
  
  Step 5:
  Prior classes and java files are deleted.
  The only way to test the validity of the wsdl file produced in
  step 4 is to run WSDL2Java on it.
  
  Step 6:
  Replace the generated server side implementation with the provided
  one.  Now we are ready to compile all the files and run the test.