axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r170895 - in /webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl: codegen/emitter/MultiLanguageClientEmitter.java template/java/InterfaceImplementationTemplate.xsl
Date Thu, 19 May 2005 08:05:24 GMT
Author: ajith
Date: Thu May 19 01:05:24 2005
New Revision: 170895

URL: http://svn.apache.org/viewcvs?rev=170895&view=rev
Log:
updated the client emitter to remove non-word characters from the names

Modified:
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
    webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=170895&r1=170894&r2=170895&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
(original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
Thu May 19 01:05:24 2005
@@ -335,7 +335,7 @@
         for (Iterator iterator = col.iterator(); iterator.hasNext();) {
             operation = (WSDLOperation) iterator.next();
             methodElement = doc.createElement("method");
-            addAttribute(doc,"name",operation.getName().getLocalPart(),methodElement);
+            addAttribute(doc,"name",removeUnsuitableCharacters(operation.getName().getLocalPart()),methodElement);
             addAttribute(doc,"namepace",operation.getName().getNamespaceURI(),methodElement);
             methodElement.appendChild(getInputElement(doc,operation));
             methodElement.appendChild(getOutputElement(doc,operation));
@@ -371,6 +371,10 @@
         Attr attribute = document.createAttribute(AttribName);
         attribute.setValue(attribValue);
         element.setAttributeNode(attribute);
+    }
+
+    protected String removeUnsuitableCharacters(String word){
+        return word.replaceAll("\\W","_");
     }
 
 }

Modified: webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl?rev=170895&r1=170894&r2=170895&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl
(original)
+++ webservices/axis/trunk/java/modules/wsdl/src/org/apache/axis/wsdl/template/java/InterfaceImplementationTemplate.xsl
Thu May 19 01:05:24 2005
@@ -14,8 +14,10 @@
 
     public class <xsl:value-of select="@name"/> extends org.apache.axis.clientapi.Stub
implements <xsl:value-of select="$interfaceName"/>{
         public static final String AXIS2_HOME = ".";
+
         static{
           org.apache.axis.description.OperationDescription __operation;
+           _operations = new org.apache.axis.description.OperationDescription[<xsl:value-of
select="count(method)"/>];
       <xsl:for-each select="method">
           __operation = new org.apache.axis.description.OperationDescription();
           __operation.setName(new javax.xml.namespace.QName("<xsl:value-of select="@namespace"/>",
"<xsl:value-of select="@name"/>"));
@@ -61,6 +63,7 @@
     private org.apache.axis.context.MessageContext _getMessageContext(){
             return null;
     }
+
      <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-->



Mime
View raw message