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 gd...@apache.org on 2005/08/03 21:01:51 UTC

svn commit: r227249 - in /webservices/axis/trunk/java/modules: core/src/org/apache/axis2/addressing/ saaj/src/org/apache/axis2/saaj/ wsdl/src/org/apache/axis2/wsdl/codegen/ wsdl/src/org/apache/axis2/wsdl/codegen/emitter/ wsdl/src/org/apache/axis2/wsdl/...

Author: gdaniels
Date: Wed Aug  3 12:01:26 2005
New Revision: 227249

URL: http://svn.apache.org/viewcvs?rev=227249&view=rev
Log:
Spelling corrections, and modifications to the InterfaceTemplate.xsl in order to enable multiple parameters to methods (we'll need this for RPC/wrapped).

Modified:
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/addressing/MessageInformationHeaders.java
    webservices/axis/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CommandLineOptionParser.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/JavaEmitter.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XSLTTemplateProcessor.java

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/addressing/MessageInformationHeaders.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/addressing/MessageInformationHeaders.java?rev=227249&r1=227248&r2=227249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/addressing/MessageInformationHeaders.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/addressing/MessageInformationHeaders.java Wed Aug  3 12:01:26 2005
@@ -237,4 +237,4 @@
     }
 
     // --------------------------------------------------------------------------------------------
-}
+}
\ No newline at end of file

Modified: webservices/axis/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java?rev=227249&r1=227248&r2=227249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java (original)
+++ webservices/axis/trunk/java/modules/saaj/src/org/apache/axis2/saaj/SOAPPartImpl.java Wed Aug  3 12:01:26 2005
@@ -275,7 +275,7 @@
     }
 
     /**
-     * SOAPEnvelope is the Document Elements of this XML docuement
+     * SOAPEnvelope is the Document Elements of this XML document
      */
     protected Document mDocument;
 

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java?rev=227249&r1=227248&r2=227249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenConfiguration.java Wed Aug  3 12:01:26 2005
@@ -75,8 +75,12 @@
     public CodeGenConfiguration(WSDLDescription wom, Map optionMap) {
         this.wom = wom;
 
-        String outputLocation = ((CommandLineOption) optionMap.get(
-                OUTPUT_LOCATION_OPTION)).getOptionValue();
+        CommandLineOption clo =
+                ((CommandLineOption)optionMap.get(OUTPUT_LOCATION_OPTION));
+        if (clo == null) {
+            //
+        }
+        String outputLocation = clo.getOptionValue();
         this.outputLocation = new File(outputLocation);
 
         serverSide = (optionMap.get(SERVER_SIDE_CODE_OPTION) != null);
@@ -110,8 +114,10 @@
             loadLanguge(langOption.getOptionValue());
         }
 
-        CommandLineOption dataBindingOption = (CommandLineOption) optionMap.get(
-                DATA_BINDING_TYPE_OPTION);
+// Unused code commented out by gdaniels...
+//
+//        CommandLineOption dataBindingOption = (CommandLineOption) optionMap.get(
+//                DATA_BINDING_TYPE_OPTION);
 
     }
 

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java?rev=227249&r1=227248&r2=227249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java Wed Aug  3 12:01:26 2005
@@ -76,15 +76,12 @@
         packageFinder.init(this.configuration);
         this.moduleEndpoints.add(packageFinder);
 
-
         XMLBeansExtension xmlBeanExtension = new XMLBeansExtension();
         xmlBeanExtension.init(this.configuration);
         this.moduleEndpoints.add(xmlBeanExtension);
     }
 
-
     public void generate() throws CodeGenerationException {
-
         try {
             for (int i = 0; i < this.moduleEndpoints.size(); i++) {
                 ((CodeGenExtension) this.moduleEndpoints.get(i)).engage();

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CommandLineOptionParser.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CommandLineOptionParser.java?rev=227249&r1=227248&r2=227249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CommandLineOptionParser.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/CommandLineOptionParser.java Wed Aug  3 12:01:26 2005
@@ -104,7 +104,6 @@
         commandLineOption = new CommandLineOption(optionType, optionBundle);
         commandLineOptions.put(commandLineOption.getType(), commandLineOption);
         return commandLineOptions;
-
     }
 
     public Map getAllOptions() {

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/JavaEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/JavaEmitter.java?rev=227249&r1=227248&r2=227249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/JavaEmitter.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/JavaEmitter.java Wed Aug  3 12:01:26 2005
@@ -40,8 +40,6 @@
     public JavaEmitter(CodeGenConfiguration configuration, TypeMapper mapper) {
         this.configuration = configuration;
         this.mapper = mapper;
-
     }
-
 
 }

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=227249&r1=227248&r2=227249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java Wed Aug  3 12:01:26 2005
@@ -3,7 +3,6 @@
 import org.apache.axis2.wsdl.codegen.CodeGenConfiguration;
 import org.apache.axis2.wsdl.codegen.CodeGenerationException;
 import org.apache.axis2.wsdl.codegen.Constants;
-import org.apache.axis2.wsdl.codegen.extension.AxisBindingBuilder;
 import org.apache.axis2.wsdl.codegen.writer.BeanWriter;
 import org.apache.axis2.wsdl.codegen.writer.CallbackHandlerWriter;
 import org.apache.axis2.wsdl.codegen.writer.ClassWriter;
@@ -214,8 +213,7 @@
     protected void writeLocalTestClasses(WSDLBinding binding) throws Exception {
 
         if (configuration.isWriteTestCase()) {
-            Document classModel = createDOMDocuementForLocalTestCase(
-                    binding);
+            Document classModel = createDOMDocumentForLocalTestCase(binding);
             LocalTestClassWriter callbackWriter =
                     new LocalTestClassWriter(
                             this.configuration.getOutputLocation(),
@@ -230,7 +228,7 @@
     protected void writeTestClasses(WSDLBinding binding) throws Exception {
 
         if (configuration.isWriteTestCase()) {
-            Document classModel = createDOMDocuementForTestCase(binding);
+            Document classModel = createDOMDocumentForTestCase(binding);
             TestClassWriter callbackWriter =
                     new TestClassWriter(this.configuration.getOutputLocation(),
                             this.configuration.getOutputLanguage());
@@ -246,7 +244,7 @@
      * @throws Exception
      */
     protected void writeInterface(WSDLBinding axisBinding) throws Exception {
-        Document interfaceModel = createDOMDocuementForInterface(
+        Document interfaceModel = createDOMDocumentForInterface(
                 axisBinding);
         InterfaceWriter interfaceWriter =
                 new InterfaceWriter(this.configuration.getOutputLocation(),
@@ -263,7 +261,7 @@
     protected void writeSkeleton(WSDLBinding axisBinding) throws Exception {
 
         //Note -  One can generate the skeleton using the interface XML
-        Document skeletonModel = createDOMDocuementForSkeleton(axisBinding);
+        Document skeletonModel = createDOMDocumentForSkeleton(axisBinding);
         ClassWriter skeletonWriter = new SkeletonWriter(
                 this.configuration.getOutputLocation(),
                 this.configuration.getOutputLanguage());
@@ -298,7 +296,7 @@
     protected void writeTestServiceXML(WSDLBinding axisBinding) throws Exception {
         if (this.configuration.isWriteTestCase()) {
             //Note -  One can generate the service xml using the interface XML
-            Document skeletonModel = createDOMDocuementForServiceXML(
+            Document skeletonModel = createDOMDocumentForServiceXML(
                     axisBinding, true);
             TestServiceXMLWriter testServiceXmlWriter = new TestServiceXMLWriter(
                     this.configuration.getOutputLocation(),
@@ -315,7 +313,7 @@
      */
     protected void writeServiceXml(WSDLBinding axisBinding) throws Exception {
         if (this.configuration.isGenerateDeployementDescriptor()) {
-            Document skeletonModel = createDOMDocuementForServiceXML(
+            Document skeletonModel = createDOMDocumentForServiceXML(
                     axisBinding, false);
             ClassWriter serviceXmlWriter = new ServiceXMLWriter(
                     this.configuration.getOutputLocation(),
@@ -333,7 +331,7 @@
      */
     protected void writeInterfaceImplementation(WSDLBinding axisBinding,
                                                 WSDLService service) throws Exception {
-        Document interfaceImplModel = createDOMDocuementForInterfaceImplementation(
+        Document interfaceImplModel = createDOMDocumentForInterfaceImplementation(
                 axisBinding, service);
         InterfaceImplementationWriter writer =
                 new InterfaceImplementationWriter(
@@ -365,7 +363,7 @@
         if (collection != null) {
             for (Iterator iterator = collection.iterator();
                  iterator.hasNext();) {
-                Document interfaceModel = createDOMDocuementForBean();
+                Document interfaceModel = createDOMDocumentForBean();
                 BeanWriter beanWriter =
                         new BeanWriter(this.configuration.getOutputLocation(),
                                 this.configuration.getOutputLanguage());
@@ -597,11 +595,11 @@
      *
      * @return
      */
-    protected Document createDOMDocuementForBean() {
+    protected Document createDOMDocumentForBean() {
         return null;
     }
 
-    protected Document createDOMDocuementForServiceXML(WSDLBinding binding,
+    protected Document createDOMDocumentForServiceXML(WSDLBinding binding,
                                                        boolean forTesting) {
         WSDLInterface boundInterface = binding.getBoundInterface();
 
@@ -686,7 +684,7 @@
      * @param binding
      * @return
      */
-    protected Document createDOMDocuementForInterface(WSDLBinding binding) {
+    protected Document createDOMDocumentForInterface(WSDLBinding binding) {
         WSDLInterface boundInterface = binding.getBoundInterface();
 
         Document doc = getEmptyDocument();
@@ -711,7 +709,7 @@
 
     }
 
-    protected Document createDOMDocuementForSkeleton(WSDLBinding binding) {
+    protected Document createDOMDocumentForSkeleton(WSDLBinding binding) {
         WSDLInterface boundInterface = binding.getBoundInterface();
 
         Document doc = getEmptyDocument();;
@@ -814,7 +812,7 @@
         }
     }
 
-    protected Document createDOMDocuementForTestCase(WSDLBinding binding) {
+    protected Document createDOMDocumentForTestCase(WSDLBinding binding) {
         WSDLInterface boundInterface = binding.getBoundInterface();
 
         Document doc = getEmptyDocument();
@@ -847,7 +845,7 @@
 
     }
 
-    protected Document createDOMDocuementForLocalTestCase(
+    protected Document createDOMDocumentForLocalTestCase(
             WSDLBinding binding) {
         WSDLInterface boundInterface = binding.getBoundInterface();
 
@@ -923,11 +921,10 @@
      * @param service
      * @return
      */
-    protected Document createDOMDocuementForInterfaceImplementation(
+    protected Document createDOMDocumentForInterfaceImplementation(
             WSDLBinding binding, WSDLService service) {
         WSDLInterface boundInterface = binding.getBoundInterface();
 
-        WSDLEndpoint endpoint = null;
         HashMap endpoints = service.getEndpoints();
         Document doc = getEmptyDocument();
         Element rootElement = doc.createElement("class");

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl?rev=227249&r1=227248&r2=227249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/template/java/InterfaceTemplate.xsl Wed Aug  3 12:01:26 2005
@@ -11,26 +11,26 @@
     /*
      *  Auto generated java interface by the Axis code generator
      */
-
     public interface <xsl:value-of select="@name"></xsl:value-of> {
      <xsl:for-each select="method">
          <xsl:variable name="outputtype"><xsl:value-of select="output/param/@type"></xsl:value-of></xsl:variable>
-
-         <xsl:variable name="inputtype"><xsl:value-of select="input/param/@type"></xsl:value-of></xsl:variable>  <!-- this needs to change-->
-         <xsl:variable name="inputparam"><xsl:value-of select="input/param/@name"></xsl:value-of></xsl:variable>  <!-- this needs to change-->
          <xsl:if test="$isSync='1'">
         /**
-         * Auto generated method signature 
-         *<xsl:if test="$inputtype!=''">@param <xsl:value-of select="$inputparam"></xsl:value-of></xsl:if>
+         * Auto generated method signature
+         <xsl:for-each select="input/param">
+         * @param <xsl:value-of select="@name"/>
+         </xsl:for-each>
          */
-        public  <xsl:if test="$outputtype=''">void</xsl:if><xsl:if test="$outputtype!=''"><xsl:value-of select="$outputtype"/></xsl:if><xsl:text> </xsl:text><xsl:value-of select="@name"/>(<xsl:if test="$inputtype!=''"><xsl:value-of select="$inputtype"/><xsl:text> </xsl:text><xsl:value-of select="$inputparam"></xsl:value-of></xsl:if>) throws java.rmi.RemoteException;
+        public <xsl:if test="$outputtype=''">void</xsl:if><xsl:if test="$outputtype!=''"><xsl:value-of select="$outputtype"/></xsl:if><xsl:text> </xsl:text><xsl:value-of select="@name"/>(<xsl:for-each select="input/param"><xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"></xsl:value-of><xsl:if test="not(position()=last())">, </xsl:if></xsl:for-each>) throws java.rmi.RemoteException;
         </xsl:if>
         <xsl:if test="$isAsync='1'">
          /**
          * Auto generated method signature
-         *<xsl:if test="$inputtype!=''">@param <xsl:value-of select="$inputparam"></xsl:value-of></xsl:if>
+         <xsl:for-each select="input/param">
+         * @param <xsl:value-of select="@name"/>
+         </xsl:for-each>
          */
-        public  void start<xsl:value-of select="@name"/>(<xsl:if test="$inputtype!=''"><xsl:value-of select="$inputtype"/><xsl:text> </xsl:text><xsl:value-of select="$inputparam"></xsl:value-of>,</xsl:if>final <xsl:value-of select="$package"/>.<xsl:value-of select="$callbackname"/> callback) throws java.rmi.RemoteException;
+        public void start<xsl:value-of select="@name"/>(<xsl:for-each select="input/param"><xsl:value-of select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"></xsl:value-of>, </xsl:for-each>final <xsl:value-of select="$package"/>.<xsl:value-of select="$callbackname"/> callback) throws java.rmi.RemoteException;
         </xsl:if>
      </xsl:for-each>
     }

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XSLTTemplateProcessor.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XSLTTemplateProcessor.java?rev=227249&r1=227248&r2=227249&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XSLTTemplateProcessor.java (original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis2/wsdl/util/XSLTTemplateProcessor.java Wed Aug  3 12:01:26 2005
@@ -48,6 +48,15 @@
                              InputStream xmlStream,
                              InputStream xsltStream)
             throws TransformerFactoryConfigurationError, TransformerException {
+
+//        byte [] bytes = new byte[10000];
+//        try {
+//            IOUtils.readFully(xmlStream, bytes);
+//        } catch (IOException e) {
+//            e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+//        }
+//        System.out.print(new String(bytes));
+
         Source xmlSource = new StreamSource(xmlStream);
         Source xsltSource = new StreamSource(xsltStream);
         Result result = new StreamResult(out);