You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by di...@apache.org on 2006/01/04 22:06:39 UTC

svn commit: r365985 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/template/general/ core/src/org/apache/axis2/transport/http/

Author: dims
Date: Wed Jan  4 13:06:34 2006
New Revision: 365985

URL: http://svn.apache.org/viewcvs?rev=365985&view=rev
Log:
- fix typo in HTTPTransportReceiver
- add ant targets for building the aar, creating a repo and starting SimpleHTTPServer

TODO:
- add target(s) to compile and run the generated test case.


Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl?rev=365985&r1=365984&r2=365985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/adbAntBuildTemplate.xsl Wed Jan  4 13:06:34 2006
@@ -1,10 +1,15 @@
-<xsl:stylesheet version="1.0" xmlns:xalan="http://xml.apache.org/xslt"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="1.0" xmlns:xalan="http://xml.apache.org/xslt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output method="xml" indent="yes" omit-xml-declaration="yes" xalan:indent-amount="4"/>
     <xsl:template match="/ant">
-        <xsl:variable name="package"><xsl:value-of select="@package"/></xsl:variable>
+        <xsl:variable name="package">
+            <xsl:value-of select="@package"/>
+        </xsl:variable>
 
         <project basedir="." default="jar.all">
             <xsl:comment>Auto generated ant build file</xsl:comment>
+            <property name="name">
+                <xsl:attribute name="value">myservice</xsl:attribute>
+            </property>
             <property name="src">
                 <xsl:attribute name="value">${basedir}\src</xsl:attribute>
             </property>
@@ -20,6 +25,9 @@
             <property name="lib">
                 <xsl:attribute name="value">${build}\lib</xsl:attribute>
             </property>
+            <property name="resources">
+                <xsl:attribute name="value">${basedir}\resources</xsl:attribute>
+            </property>
 
             <property name="jars.ok" value=""></property>
 
@@ -40,7 +48,7 @@
 
                 <available classname="javax.xml.stream.XMLStreamReader" property="stax.available"/>
                 <available classname="org.apache.axis2.engine.AxisEngine" property="axis2.available"/>
-                <condition property="jars.ok" >
+                <condition property="jars.ok">
                     <and>
                         <isset property="stax.available"/>
                         <isset property="axis2.available"/>
@@ -49,10 +57,10 @@
 
                 <xsl:comment>Print out the availabilities</xsl:comment>
                 <echo>
-                     <xsl:attribute name="message">Stax Availability= ${stax.available}</xsl:attribute>
+                    <xsl:attribute name="message">Stax Availability= ${stax.available}</xsl:attribute>
                 </echo>
                 <echo>
-                     <xsl:attribute name="message">Axis2 Availability= ${axis2.available}</xsl:attribute>
+                    <xsl:attribute name="message">Axis2 Availability= ${axis2.available}</xsl:attribute>
                 </echo>
 
             </target>
@@ -79,15 +87,45 @@
             </target>
             <target name="jar.all" depends="compile.all,echo.classpath.problem">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
+                <copy>
+                    <xsl:attribute name="toDir">${classes}/META-INF</xsl:attribute>
+                    <fileset>
+                        <xsl:attribute name="dir">${resources}</xsl:attribute>
+                        <include><xsl:attribute name="name">*.xml</xsl:attribute></include>
+                        <include><xsl:attribute name="name">*.wsdl</xsl:attribute></include>
+                    </fileset>
+                </copy>
                 <jar>
-                    <xsl:attribute name="basedir">${classes}</xsl:attribute>
-                    <xsl:attribute name="destfile">${lib}\service.jar</xsl:attribute>
+                    <xsl:attribute name="destfile">${lib}/${name}.aar</xsl:attribute>
+                    <fileset>
+                        <xsl:attribute name="excludes">**/Test.class</xsl:attribute>
+                        <xsl:attribute name="dir">${classes}</xsl:attribute>
+                    </fileset>
                 </jar>
             </target>
+            <target depends="jar.all" name="make.repo" if="jars.ok">
+                <mkdir>
+                    <xsl:attribute name="dir">${build}/repo/</xsl:attribute>
+                </mkdir>
+                <mkdir>
+                    <xsl:attribute name="dir">${build}/repo/services</xsl:attribute>
+                </mkdir>
+                <copy>
+                    <xsl:attribute name="file">${build}/lib/${name}.aar</xsl:attribute>
+                    <xsl:attribute name="toDir">${build}/repo/services/</xsl:attribute>
+                </copy>
+            </target>
+            <target depends="make.repo" name="start.server" if="jars.ok">
+                <java classname="org.apache.axis2.transport.http.SimpleHTTPServer" fork="true">
+                    <arg>
+                        <xsl:attribute name="value">${build}/repo</xsl:attribute>
+                    </arg>
+                </java>
+            </target>
             <target name="clean">
-              <delete>
-                <xsl:attribute name="dir">${build}</xsl:attribute>
-              </delete>
+                <delete>
+                    <xsl:attribute name="dir">${build}</xsl:attribute>
+                </delete>
             </target>
         </project>
     </xsl:template>

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl?rev=365985&r1=365984&r2=365985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/defaultAntBuildTemplate.xsl Wed Jan  4 13:06:34 2006
@@ -5,6 +5,9 @@
 
         <project basedir="." default="jar.all">
             <xsl:comment>Auto generated ant build file</xsl:comment>
+            <property name="name">
+                <xsl:attribute name="value">myservice</xsl:attribute>
+            </property>
             <property name="src">
                 <xsl:attribute name="value">${basedir}\src</xsl:attribute>
             </property>
@@ -20,7 +23,10 @@
             <property name="lib">
                 <xsl:attribute name="value">${build}\lib</xsl:attribute>
             </property>
-
+            <property name="resources">
+                <xsl:attribute name="value">${basedir}\resources</xsl:attribute>
+            </property>
+ 
             <property name="jars.ok" value=""></property>
 
             <target name="init">

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl?rev=365985&r1=365984&r2=365985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/general/xmlbeansAntBuildTemplate.xsl Wed Jan  4 13:06:34 2006
@@ -5,15 +5,15 @@
 
         <project basedir="." default="jar.all">
             <xsl:comment>Auto generated ant build file</xsl:comment>
+            <property name="name">
+                <xsl:attribute name="value">myservice</xsl:attribute>
+            </property>
             <property name="src">
                 <xsl:attribute name="value">${basedir}\src</xsl:attribute>
             </property>
             <property name="test">
                 <xsl:attribute name="value">${basedir}\test</xsl:attribute>
             </property>
-            <property name="resources">
-                <xsl:attribute name="value">${basedir}\resources</xsl:attribute>
-            </property>
             <property name="build">
                 <xsl:attribute name="value">${basedir}\build</xsl:attribute>
             </property>
@@ -23,6 +23,9 @@
             <property name="lib">
                 <xsl:attribute name="value">${build}\lib</xsl:attribute>
             </property>
+            <property name="resources">
+                <xsl:attribute name="value">${basedir}\resources</xsl:attribute>
+            </property>
 
             <property name="xbeans.packaged.jar.name" value="XBeans-packaged.jar"></property>
             <property name="jars.ok" value=""></property>
@@ -99,10 +102,45 @@
             </target>
             <target name="jar.all" depends="compile.all,echo.classpath.problem">
                 <xsl:attribute name="if">jars.ok</xsl:attribute>
+                <copy>
+                    <xsl:attribute name="toDir">${classes}/META-INF</xsl:attribute>
+                    <fileset>
+                        <xsl:attribute name="dir">${resources}</xsl:attribute>
+                        <include><xsl:attribute name="name">*.xml</xsl:attribute></include>
+                        <include><xsl:attribute name="name">*.wsdl</xsl:attribute></include>
+                        <exclude><xsl:attribute name="name">**/schemaorg_apache_xmlbean/**</xsl:attribute></exclude>
+                    </fileset>
+                </copy>
+                <copy>
+                    <xsl:attribute name="file">${lib}\${xbeans.packaged.jar.name}</xsl:attribute>
+                    <xsl:attribute name="toDir">${classes}/lib</xsl:attribute>
+                </copy>
                 <jar>
-                    <xsl:attribute name="basedir">${classes}</xsl:attribute>
-                    <xsl:attribute name="destfile">${lib}\service.jar</xsl:attribute>
+                    <xsl:attribute name="destfile">${lib}/${name}.aar</xsl:attribute>
+                    <fileset>
+                        <xsl:attribute name="excludes">**/Test.class</xsl:attribute>
+                        <xsl:attribute name="dir">${classes}</xsl:attribute>
+                    </fileset>
                 </jar>
+            </target>
+            <target depends="jar.all" name="make.repo" if="jars.ok">
+                <mkdir>
+                    <xsl:attribute name="dir">${build}/repo/</xsl:attribute>
+                </mkdir>
+                <mkdir>
+                    <xsl:attribute name="dir">${build}/repo/services</xsl:attribute>
+                </mkdir>
+                <copy>
+                    <xsl:attribute name="file">${build}/lib/${name}.aar</xsl:attribute>
+                    <xsl:attribute name="toDir">${build}/repo/services/</xsl:attribute>
+                </copy>
+            </target>
+            <target depends="make.repo" name="start.server" if="jars.ok">
+                <java classname="org.apache.axis2.transport.http.SimpleHTTPServer" fork="true">
+                    <arg>
+                        <xsl:attribute name="value">${build}/repo</xsl:attribute>
+                    </arg>
+                </java>
             </target>
             <target name="clean">
               <delete>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java?rev=365985&r1=365984&r2=365985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/HTTPTransportReceiver.java Wed Jan  4 13:06:34 2006
@@ -354,7 +354,7 @@
 
                     temp += "</ul>";
                 } else {
-                    temp += "No operations speficied for this service";
+                    temp += "No operations specified for this service";
                 }
             }
         }