You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cs...@apache.org on 2006/01/03 19:17:42 UTC

svn commit: r365702 - in /beehive/trunk/system-controls/test/webservice: ./ webapp/ webapp/src/attachments/datahandler/ webapp/tests/org/apache/beehive/controls/system/webservice/units/ webapp/wsdl/

Author: cschoett
Date: Tue Jan  3 10:17:34 2006
New Revision: 365702

URL: http://svn.apache.org/viewcvs?rev=365702&view=rev
Log:
Some minor tweaks to the build to allow for different implementations of the activation and mailap to be used for testing the wsc's attachement support.
Also added a new data handler test.

Added:
    beehive/trunk/system-controls/test/webservice/build.properties   (with props)
Modified:
    beehive/trunk/system-controls/test/webservice/README.txt
    beehive/trunk/system-controls/test/webservice/build.xml
    beehive/trunk/system-controls/test/webservice/webapp/build.properties
    beehive/trunk/system-controls/test/webservice/webapp/build.xml
    beehive/trunk/system-controls/test/webservice/webapp/src/attachments/datahandler/DataHandlerDocLitWrapped.java
    beehive/trunk/system-controls/test/webservice/webapp/tests/org/apache/beehive/controls/system/webservice/units/DataHandlerAttachementDocLitWrappedTest.java
    beehive/trunk/system-controls/test/webservice/webapp/wsdl/DataHandlerDocLitWrapped.wsdl

Modified: beehive/trunk/system-controls/test/webservice/README.txt
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/README.txt?rev=365702&r1=365701&r2=365702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/README.txt (original)
+++ beehive/trunk/system-controls/test/webservice/README.txt Tue Jan  3 10:17:34 2006
@@ -35,4 +35,10 @@
     -  Add new wsdl's to the 'schemas' subdirectory.  Wsdl files placed here will be used to automatically generate
        web service controls at build time.
 
-    -  Add new test web services to the 'servers' subdirectory.
\ No newline at end of file
+    -  Add new test web services to the 'servers' subdirectory.
+
+Additional Notes
+=================
+
+  * Web service control attachment tests are disabled.  Modify the JUnit portion of the build.xml file to enable.
+    These tests require the J2EE activation and mailapi's.
\ No newline at end of file

Added: beehive/trunk/system-controls/test/webservice/build.properties
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/build.properties?rev=365702&view=auto
==============================================================================
--- beehive/trunk/system-controls/test/webservice/build.properties (added)
+++ beehive/trunk/system-controls/test/webservice/build.properties Tue Jan  3 10:17:34 2006
@@ -0,0 +1,7 @@
+#
+#
+#
+
+mailapi.jar=${beehive.home}/system-controls/test/webservice/external/geronimo-spec-javamail-1.3.1-rc6.jar
+activation.jar=${beehive.home}/system-controls/test/webservice/external/geronimo-spec-activation-1.0.2-rc4.jar
+

Propchange: beehive/trunk/system-controls/test/webservice/build.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: beehive/trunk/system-controls/test/webservice/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/build.xml?rev=365702&r1=365701&r2=365702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/build.xml (original)
+++ beehive/trunk/system-controls/test/webservice/build.xml Tue Jan  3 10:17:34 2006
@@ -19,7 +19,7 @@
 -->
 
 <!--
-todo: 
+todo:
   - create the following directory structure:
     webapps/
         serviceControlTestWeb/ (yes, this name is different)
@@ -43,7 +43,7 @@
   - container tests:
     - cleanup source files (optimize and order imports, etc)
   - change all "jcx" names to "wsc".  "jcx" doesn't mean anything specific
-  - get the service control tests working in an IDE with JUnit (might not be possible because of the 
+  - get the service control tests working in an IDE with JUnit (might not be possible because of the
     generated source files, but if they exist, it would be *awesome* if this worked.
   - port web service controls onto Controls test infrastructure
   - bug: service control needs to hide its own annotations
@@ -52,9 +52,10 @@
 <project name="Beehive/Controls/System/WebService/Tests" default="drt" basedir=".">
 
     <property environment="os"/>
-
     <import file="../../systemcontrols-imports.xml"/>
 
+    <property file="build.properties"/>
+
     <!-- client properties -->
     <property name="build.root.dir" location="build"/>
     <property name="client.build" location="${build.root.dir}/client"/>
@@ -96,8 +97,8 @@
         <path refid="velocity.dependency.path"/>
         <path refid="commons-logging.dependency.path"/>
         <path refid="commons-discovery.dependency.path"/>
-        <pathelement location="external/geronimo-spec-activation-1.0.2-rc4.jar"/>
-        <pathelement location="external/geronimo-spec-javamail-1.3.1-rc6.jar"/>
+        <pathelement location="${activation.jar}"/>
+        <pathelement location="${mailapi.jar}"/>
     </path>
 
     <!-- =================================================================== -->
@@ -225,7 +226,7 @@
     </target>
 
     <target name="generate_webservicecontrols">
-        <taskdef name="axisbeanbuild" 
+        <taskdef name="axisbeanbuild"
                  classname="org.apache.beehive.wsm.axis.tools.ant.AxisTypeGeneratorTask"
                  classpathref="client.classpath"/>
 

Modified: beehive/trunk/system-controls/test/webservice/webapp/build.properties
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/webapp/build.properties?rev=365702&r1=365701&r2=365702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/webapp/build.properties (original)
+++ beehive/trunk/system-controls/test/webservice/webapp/build.properties Tue Jan  3 10:17:34 2006
@@ -5,6 +5,3 @@
 beehive.home=../../../..
 
 build.dir=../build/webapp
-
-mailapi.jar=../external/geronimo-spec-javamail-1.3.1-rc6.jar
-activation.jar=../external/geronimo-spec-activation-1.0.2-rc4.jar
\ No newline at end of file

Modified: beehive/trunk/system-controls/test/webservice/webapp/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/webapp/build.xml?rev=365702&r1=365701&r2=365702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/webapp/build.xml (original)
+++ beehive/trunk/system-controls/test/webservice/webapp/build.xml Tue Jan  3 10:17:34 2006
@@ -21,6 +21,7 @@
 <project name="Beehive/SystemControls/WebService" default="build" basedir=".">
   
     <property file="build.properties"/>
+    <property file="../build.properties"/>
 
     <import file="${beehive.home}/beehive-imports.xml"/>
     <import file="${beehive.home}/ant/beehive-tools.xml"/>
@@ -90,7 +91,14 @@
                            tempdir="${gen.dir}"
                            classpathref="build.classpath"/>
 
-	   	<copy todir="${build.dir}">
+        <copy todir="${classes.dir}">
+            <fileset dir="${src.dir}">
+                <include name="**/*.gif"/>
+                <include name="**/*.jpg"/>
+            </fileset>
+        </copy>
+
+        <copy todir="${build.dir}">
             <fileset dir="${web.dir}"/>
         </copy>
     </target>

Modified: beehive/trunk/system-controls/test/webservice/webapp/src/attachments/datahandler/DataHandlerDocLitWrapped.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/webapp/src/attachments/datahandler/DataHandlerDocLitWrapped.java?rev=365702&r1=365701&r2=365702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/webapp/src/attachments/datahandler/DataHandlerDocLitWrapped.java (original)
+++ beehive/trunk/system-controls/test/webservice/webapp/src/attachments/datahandler/DataHandlerDocLitWrapped.java Tue Jan  3 10:17:34 2006
@@ -24,6 +24,7 @@
 import javax.jws.soap.SOAPBinding;
 import javax.activation.DataHandler;
 import java.io.InputStream;
+import java.io.IOException;
 
 /**
  * Purpose:
@@ -36,6 +37,17 @@
     @WebMethod()
     public DataHandler getPlainText() {
         return new DataHandler("Some plain text.", "text/plain");
+    }
+    
+    @WebMethod()
+    public DataHandler echoPlainText(DataHandler pt) {
+        String content = "";
+        try {
+            content = (String) pt.getContent();
+        } catch (IOException ioe) {
+            // do nothing
+        }
+        return new DataHandler(content, "text/plain");
     }
 
     @WebMethod()

Modified: beehive/trunk/system-controls/test/webservice/webapp/tests/org/apache/beehive/controls/system/webservice/units/DataHandlerAttachementDocLitWrappedTest.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/webapp/tests/org/apache/beehive/controls/system/webservice/units/DataHandlerAttachementDocLitWrappedTest.java?rev=365702&r1=365701&r2=365702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/webapp/tests/org/apache/beehive/controls/system/webservice/units/DataHandlerAttachementDocLitWrappedTest.java (original)
+++ beehive/trunk/system-controls/test/webservice/webapp/tests/org/apache/beehive/controls/system/webservice/units/DataHandlerAttachementDocLitWrappedTest.java Tue Jan  3 10:17:34 2006
@@ -42,6 +42,16 @@
         assertEquals("Some plain text.", content);
     }
 
+    public void testEchoPlainText() throws Exception {
+        DataHandler orig = new DataHandler("Some plain text.", "text/plain");
+        DataHandler dataHandler = client.echoPlainText(orig);
+        assertNotNull(dataHandler);
+        assertEquals("text/plain", dataHandler.getContentType());
+
+        String content = (String) dataHandler.getContent();
+        assertEquals("Some plain text.", content);
+    }
+
     public void testXmlText() throws Exception {
         DataHandler dataHandler = client.getXmlText();
         assertNotNull(dataHandler);

Modified: beehive/trunk/system-controls/test/webservice/webapp/wsdl/DataHandlerDocLitWrapped.wsdl
URL: http://svn.apache.org/viewcvs/beehive/trunk/system-controls/test/webservice/webapp/wsdl/DataHandlerDocLitWrapped.wsdl?rev=365702&r1=365701&r2=365702&view=diff
==============================================================================
--- beehive/trunk/system-controls/test/webservice/webapp/wsdl/DataHandlerDocLitWrapped.wsdl (original)
+++ beehive/trunk/system-controls/test/webservice/webapp/wsdl/DataHandlerDocLitWrapped.wsdl Tue Jan  3 10:17:34 2006
@@ -35,6 +35,20 @@
      </sequence>
     </complexType>
    </element>
+   <element name="echoPlainText">
+    <complexType>
+     <sequence>
+      <element name="pt" type="apachesoap:DataHandler"/>
+     </sequence>
+    </complexType>
+   </element>
+   <element name="echoPlainTextResponse">
+    <complexType>
+     <sequence>
+      <element name="return" type="apachesoap:DataHandler"/>
+     </sequence>
+    </complexType>
+   </element>
    <element name="getXmlText">
     <complexType/>
    </element>
@@ -48,6 +62,12 @@
   </schema>
  </wsdl:types>
 
+   <wsdl:message name="echoPlainTextRequest">
+
+      <wsdl:part element="impl:echoPlainText" name="parameters"/>
+
+   </wsdl:message>
+
    <wsdl:message name="getPlainTextRequest">
 
       <wsdl:part element="impl:getPlainText" name="parameters"/>
@@ -90,6 +110,12 @@
 
    </wsdl:message>
 
+   <wsdl:message name="echoPlainTextResponse">
+
+      <wsdl:part element="impl:echoPlainTextResponse" name="parameters"/>
+
+   </wsdl:message>
+
    <wsdl:message name="getGifImageRequest">
 
       <wsdl:part element="impl:getGifImage" name="parameters"/>
@@ -122,6 +148,14 @@
 
       </wsdl:operation>
 
+      <wsdl:operation name="echoPlainText">
+
+         <wsdl:input message="impl:echoPlainTextRequest" name="echoPlainTextRequest"/>
+
+         <wsdl:output message="impl:echoPlainTextResponse" name="echoPlainTextResponse"/>
+
+      </wsdl:operation>
+
       <wsdl:operation name="getXmlText">
 
          <wsdl:input message="impl:getXmlTextRequest" name="getXmlTextRequest"/>
@@ -183,6 +217,24 @@
          </wsdl:input>
 
          <wsdl:output name="getPlainTextResponse">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:output>
+
+      </wsdl:operation>
+
+      <wsdl:operation name="echoPlainText">
+
+         <wsdlsoap:operation soapAction=""/>
+
+         <wsdl:input name="echoPlainTextRequest">
+
+            <wsdlsoap:body use="literal"/>
+
+         </wsdl:input>
+
+         <wsdl:output name="echoPlainTextResponse">
 
             <wsdlsoap:body use="literal"/>