ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r180324 - in /webservices/axis/trunk/java: ./ etc/ modules/core/html/ modules/samples/src/sample/google/spellcheck/ modules/tool/script/ modules/wsdl/src/org/apache/axis/wsdl/ modules/xml/src/org/apache/axis/om/impl/llom/
Date Mon, 06 Jun 2005 15:21:55 GMT
Author: ajith
Date: Mon Jun  6 08:21:55 2005
New Revision: 180324

URL: http://svn.apache.org/viewcvs?rev=180324&view=rev
Log:
Did the follwing changes
1.Updated the project.xml to include the xsl files as resources
2.changed the maven.xml to copy the scripts to the binary distributions bin folder
3. updated the wsdl2code batch files to solve a parameter passing bug
4. Other trivial changes such as removing redundant data and improving the code

Modified:
    webservices/axis/trunk/java/etc/project.xml
    webservices/axis/trunk/java/maven.xml
    webservices/axis/trunk/java/modules/core/html/upload.jsp
    webservices/axis/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java
    webservices/axis/trunk/java/modules/tool/script/WSDL2Code.bat
    webservices/axis/trunk/java/modules/tool/script/WSDL2Java.bat
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/WSDL2Code.java
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java

Modified: webservices/axis/trunk/java/etc/project.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/etc/project.xml?rev=180324&r1=180323&r2=180324&view=diff
==============================================================================
--- webservices/axis/trunk/java/etc/project.xml (original)
+++ webservices/axis/trunk/java/etc/project.xml Mon Jun  6 08:21:55 2005
@@ -232,6 +232,7 @@
         	<includes>
           		<include>**/*.properties</include>
           		<include>**/*.xml</include>
+			<include>**/*.xsl</include>
         	</includes>
       </resource>
       <resource>
@@ -256,6 +257,7 @@
         <includes>
           <include>**/*.properties</include>
           <include>**/*.xml</include>
+	    <include>**/*.xsl</include>	
         </includes>
       </resource>
     </resources>

Modified: webservices/axis/trunk/java/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/maven.xml?rev=180324&r1=180323&r2=180324&view=diff
==============================================================================
--- webservices/axis/trunk/java/maven.xml (original)
+++ webservices/axis/trunk/java/maven.xml Mon Jun  6 08:21:55 2005
@@ -46,28 +46,29 @@
 <project default="jar" xmlns:m="jelly:maven" xmlns:ant="jelly:ant" xmlns:j="jelly:core">
     <j:set var="dist.name" value="${pom.artifactId}-${pom.currentVersion}"/>
     <j:set var="dist.dir" value="target/dist"/>
-    
-
+    
+
   <goal name="jar">
     <attainGoal name="multiproject:install"/>
-    <attainGoal name="create-jar"/>
-    <ant:copy file="target/lib/axis2-${pom.currentVersion}.jar" 
-                         toDir="target/"/>
-  </goal>
-
-
-    <goal name="init">
        <ant:mkdir dir="target"/>
+    <attainGoal name="create-jar"/>
+    <ant:copy file="target/lib/axis2-${pom.currentVersion}.jar" 
+                         toDir="target/"/>
+  </goal>
+
+
+    <goal name="init">
+        <ant:mkdir dir="target"/>
         <ant:mkdir dir="${dist.dir}"/>
-   	<ant:mkdir dir="target/lib"/>
-
-        <uptodate property="jars.uptodate" targetfile="target/axis2.war">
-	   <srcfiles dir="modules">
-	       <include name="**/*.java"/>
-	       <include name="**/*.xml"/>
-	       <include name="**/*.wsdl"/>
-	       <exclude name="**/traget/**"/>
-	   </srcfiles>
-	</uptodate>
+   	<ant:mkdir dir="target/lib"/>
+
+        <uptodate property="jars.uptodate" targetfile="target/axis2.war">
+	   <srcfiles dir="modules">
+	       <include name="**/*.java"/>
+	       <include name="**/*.xml"/>
+	       <include name="**/*.wsdl"/>
+	       <exclude name="**/traget/**"/>
+	   </srcfiles>
+	</uptodate>
 	<echo message="the files are up to date = ${jars.uptodate}"></echo>
     </goal>	
 				
@@ -90,19 +91,19 @@
 	    </ant:fileset>
         </ant:delete>
     </goal>
-
+
     <goal name="create-jar" prereqs="init">
-	<jar destfile="target/lib/axis2-${pom.currentVersion}.jar">
-            <fileset dir="modules/core/target/classes"/>
-            <fileset dir="modules/xml/target/classes"/>
-            <fileset dir="modules/wsdl/target/classes"/>
-            <fileset dir="modules/saaj/target/classes"/>
-            <fileset dir="modules/addressing/target/">
-                <include name="modules/addressing.mar"/>
-            </fileset>
+	<jar destfile="target/lib/axis2-${pom.currentVersion}.jar">
+            <fileset dir="modules/core/target/classes"/>
+            <fileset dir="modules/xml/target/classes"/>
+            <fileset dir="modules/wsdl/target/classes"/>
+            <fileset dir="modules/saaj/target/classes"/>
+            <fileset dir="modules/addressing/target/">
+                <include name="modules/addressing.mar"/>
+            </fileset>
         </jar>
     </goal>
-
+
 		
     <goal name="create-lib" prereqs="create-jar">
 	<ant:copy todir="target/lib" flatten="true">
@@ -112,18 +113,18 @@
 	    <ant:include name="commons-logging/jars/commons-logging-1.0.3.jar"/>
 	    <ant:include name="log4j/jars/log4j-1.2.8.jar"/>
 	    <ant:include name="stax/jars/stax-1.1.1-dev.jar"/>
-	    <ant:include name="commons-fileupload/jars/commons-fileupload-1.0.jar"/>
-            <ant:include name="axis/jars/axis-wsdl4j-1.2.jar"/>
-            <ant:include name="geronimo-spec/jars/geronimo-spec-activation-1.0.2-rc3.jar"/>
+	    <ant:include name="commons-fileupload/jars/commons-fileupload-1.0.jar"/>
+            <ant:include name="axis/jars/axis-wsdl4j-1.2.jar"/>
+            <ant:include name="geronimo-spec/jars/geronimo-spec-activation-1.0.2-rc3.jar"/>
 	</ant:fileset> 
 	</ant:copy> 
     </goal>		
 		
 
-    <goal name="war" prereqs="init"> 
-         <j:if test="${jars.uptodate != 'yes'}">
-                <attainGoal name="multiproject:install"/>
-                <attainGoal name="create-lib"/>
+    <goal name="war" prereqs="init"> 
+         <j:if test="${jars.uptodate != 'yes'}">
+                <attainGoal name="multiproject:install"/>
+                <attainGoal name="create-lib"/>
          </j:if> 
         <!-- jar the test classes -->
 		<ant:war destfile="target/axis2.war" webxml="modules/core/conf/web.xml">
@@ -133,7 +134,7 @@
 		  	</ant:lib>  
 			<ant:classes dir="modules/core/conf">
       		    	<ant:include name="*.properties"/>
-			</ant:classes>
+			</ant:classes>
                         <ant:webinf dir="modules/samples/target/toWar/"/>
 		</ant:war>
     </goal>
@@ -149,7 +150,7 @@
 	<ant:mkdir dir="target/dist-bin/lib"/>
 	<ant:mkdir dir="target/dist-bin/samples"/>
 	<ant:mkdir dir="target/dist-bin/webapps"/> 
-        <ant:mkdir dir="target/dist-bin/docs/api"/> 
+        <ant:mkdir dir="target/dist-bin/docs/api"/> 
 
 		<ant:copy todir="target/dist-bin/docs/api">
 			<ant:fileset dir="target/apidocs/">
@@ -180,7 +181,11 @@
 				<ant:include name="*.html"/>
 				<ant:include name="*.txt"/>				
 			</ant:fileset> 
+		</ant:copy>
+	<ant:copy todir="target/dist-bin/bin">
+			<ant:fileset dir="modules/tool/script"/>
 		</ant:copy> 
+  
 		<ant:zip file="${dist.dir}/${dist.name}-bin.zip" basedir="target/dist-bin"/>
 		<ant:tar tarfile="target/${dist.name}-bin.tar" basedir="target/dist-bin"/> 
 		<gzip src="target/${dist.name}-bin.tar" zipfile="${dist.dir}/${dist.name}-bin.tar.gz"/>

Modified: webservices/axis/trunk/java/modules/core/html/upload.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/html/upload.jsp?rev=180324&r1=180323&r2=180324&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/html/upload.jsp (original)
+++ webservices/axis/trunk/java/modules/core/html/upload.jsp Mon Jun  6 08:21:55 2005
@@ -11,7 +11,7 @@
                  java.util.Iterator"%>
 <%@ page contentType="text/html;charset=UTF-8" language="java"
  %>
-<html>
+<html>                                                                            
                          
 <%
 /*
 * Copyright 2002,2004 The Apache Software Foundation.

Modified: webservices/axis/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java?rev=180324&r1=180323&r2=180324&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java
(original)
+++ webservices/axis/trunk/java/modules/samples/src/sample/google/spellcheck/FormModel.java
Mon Jun  6 08:21:55 2005
@@ -125,12 +125,22 @@
     public String getResponse(SOAPEnvelope responseEnvelope){
         QName qName1 = new QName("urn:GoogleSearch", "doSpellingSuggestionResponse");
         QName qName2 = new QName("urn:GoogleSearch", "return");
+              
+
         SOAPBody body = responseEnvelope.getBody();
         if (body.hasFault()) {
             observer.updateError(body.getFault().getException().getMessage());
             return  null;
         } else{
-            OMElement val = body.getFirstChildWithName(qName1).getFirstChildWithName(qName2);
+            OMElement root = body.getFirstChildWithName(qName1);
+            OMElement val =null;
+            if (root!=null){
+                 val = root.getFirstChildWithName(qName2);
+            }else{
+                observer.updateError("Correct response not received!");
+                return  null;
+            }
+
             String sugession = val.getText();
             if ((sugession==null) ||(sugession.trim().equals(""))){
                 return null;

Modified: webservices/axis/trunk/java/modules/tool/script/WSDL2Code.bat
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/tool/script/WSDL2Code.bat?rev=180324&r1=180323&r2=180324&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/tool/script/WSDL2Code.bat (original)
+++ webservices/axis/trunk/java/modules/tool/script/WSDL2Code.bat Mon Jun  6 08:21:55 2005
@@ -21,6 +21,6 @@
 rem set the classes
 set AXIS2_CLASS_PATH="%AXIS_HOME%";"%AXIS_HOME%\lib\axis2-M2.jar";"%AXIS_HOME%\lib\axis-wsdl4j-1.2.jar";"%AXIS_HOME%\lib\commons-logging-1.0.3.jar";"%AXIS_HOME%\lib\log4j-1.2.8.jar";"%AXIS_HOME%\lib\stax-1.1.1-dev.jar";"%AXIS_HOME%\lib\stax-api-1.0.jar"
 
-java -cp %AXIS2_CLASS_PATH% org.apache.axis.wsdl.WSDL2Code %1 %2 %3 %4 %5 %6 %7 %8 %9 %10
%11
+java -cp %AXIS2_CLASS_PATH% org.apache.axis.wsdl.WSDL2Code %1 %2 %3 %4 %5 %6 %7 %8 %9 
 
 :end

Modified: webservices/axis/trunk/java/modules/tool/script/WSDL2Java.bat
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/tool/script/WSDL2Java.bat?rev=180324&r1=180323&r2=180324&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/tool/script/WSDL2Java.bat (original)
+++ webservices/axis/trunk/java/modules/tool/script/WSDL2Java.bat Mon Jun  6 08:21:55 2005
@@ -21,6 +21,6 @@
 rem set the classes
 set AXIS2_CLASS_PATH="%AXIS_HOME%";"%AXIS_HOME%\lib\axis2-M2.jar";"%AXIS_HOME%\lib\axis-wsdl4j-1.2.jar";"%AXIS_HOME%\lib\commons-logging-1.0.3.jar";"%AXIS_HOME%\lib\log4j-1.2.8.jar";"%AXIS_HOME%\lib\stax-1.1.1-dev.jar";"%AXIS_HOME%\lib\stax-api-1.0.jar"
 
-java -cp %AXIS2_CLASS_PATH% org.apache.axis.wsdl.WSDL2Java %1 %2 %3 %4 %5 %6 %7 %8 %9 %10
%11
+java -cp %AXIS2_CLASS_PATH% org.apache.axis.wsdl.WSDL2Java %1 %2 %3 %4 %5 %6 %7 %8 %9
 
 :end

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/WSDL2Code.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/WSDL2Code.java?rev=180324&r1=180323&r2=180324&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/WSDL2Code.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/WSDL2Code.java Mon Jun
 6 08:21:55 2005
@@ -32,7 +32,6 @@
 	private static void printUsage(){
 		System.out.println("Usage WSDL2Code -uri <Location of WSDL> :WSDL file location ");
 		System.out.println("-o <output Location> : output file location ");
-		System.out.println("-x : Switch to advanced mode. Default is off");
 		System.out.println("-a : Generate async style code only. Default if off");
 		System.out.println("-s : Generate sync style code only. Default if off. takes precedence
over -a");
 		System.out.println("-p <package name> : set custom package name");

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java?rev=180324&r1=180323&r2=180324&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java
(original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis/om/impl/llom/OMSerializerUtil.java
Mon Jun  6 08:21:55 2005
@@ -3,6 +3,7 @@
 import org.apache.axis.om.OMAttribute;
 import org.apache.axis.om.OMNamespace;
 import org.apache.axis.om.OMNode;
+import org.apache.axis.om.OMException;
 import org.apache.axis.om.impl.llom.serialize.StreamingOMSerializer;
 
 import javax.xml.stream.XMLStreamException;
@@ -10,22 +11,22 @@
 import java.util.Iterator;
 
 /*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * 
- */
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
 class OMSerializerUtil {
 
     /**
@@ -70,7 +71,7 @@
         }
     }
 
-     /**
+    /**
      * Method serializeNamespace
      *
      * @param namespace
@@ -161,7 +162,7 @@
      */
     static void serializeNormal(OMElementImpl element,XMLStreamWriter writer, boolean cache)
             throws XMLStreamException {
-
+        
         if (cache){
             element.build();
         }
@@ -179,9 +180,9 @@
     }
 
     static void serializeByPullStream(OMElementImpl element,XMLStreamWriter writer) throws
XMLStreamException {
-     StreamingOMSerializer streamingOMSerializer =  new StreamingOMSerializer();
-                   streamingOMSerializer.serialize(element.getXMLStreamReaderWithoutCaching(),
-                           writer);
-                   return;
+        StreamingOMSerializer streamingOMSerializer =  new StreamingOMSerializer();
+        streamingOMSerializer.serialize(element.getXMLStreamReaderWithoutCaching(),
+                writer);
+        return;
     }
 }



Mime
View raw message