axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r437301 - in /webservices/axis2/trunk/java/modules: adb-codegen/src/org/apache/axis2/schema/template/ codegen/src/org/apache/axis2/wsdl/codegen/emitter/ jaxbri/src/org/apache/axis2/jaxbri/template/ jibx/src/org/apache/axis2/jibx/template/ x...
Date Sun, 27 Aug 2006 05:37:38 GMT
Author: dims
Date: Sat Aug 26 22:37:36 2006
New Revision: 437301

URL: http://svn.apache.org/viewvc?rev=437301&view=rev
Log:
fix problem with codegen for omit.wsdl in Axis1.X test suite. using a hashmap has problems
if there is a in and an out with the same java type 

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
    webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl
    webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl
    webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl?rev=437301&r1=437300&r2=437301&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBDatabindingTemplate.xsl
Sat Aug 26 22:37:36 2006
@@ -7,7 +7,7 @@
         <xsl:variable name="helpermode"  select="extra/@h"></xsl:variable>
 
         <!--  generate toOM for only non parts and non primitives!!! -->
-        <xsl:for-each select="param[@type!='' and not(@primitive)]">
+        <xsl:for-each select="param[param[not(@type = preceding-sibling::param/@type)
and @type!='' and not(@primitive)]]">
             private  org.apache.axiom.om.OMElement  toOM(<xsl:value-of select="@type"/>
param, boolean optimizeContent){
             <xsl:choose>
                     <xsl:when test="$helpermode">

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java?rev=437301&r1=437300&r2=437301&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
Sat Aug 26 22:37:36 2006
@@ -4,13 +4,11 @@
 import java.io.IOException;
 import java.io.StringWriter;
 import java.util.ArrayList;
-import java.util.Collection;
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.LinkedHashMap;
 
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilder;
@@ -1004,7 +1002,7 @@
     protected Element createDOMElementforDatabinders(Document doc,boolean isServerside) {
 
         // First Iterate through the operations and find the relevant fromOM and toOM methods
to be generated
-        Map parameterMap = new LinkedHashMap();
+        ArrayList parameters = new ArrayList();
 
         for (Iterator operationsIterator = axisService.getOperations();operationsIterator.hasNext();)
{
             AxisOperation axisOperation = (AxisOperation) operationsIterator.next();
@@ -1020,7 +1018,7 @@
                     //input
                     addAttribute(doc,"direction","in",inputParamElement[i]);
                     //add the short type name
-                    parameterMap.put(inputParamElement[i].getAttribute("type"),
+                    parameters.add(
                             inputParamElement[i]);
 
                 }
@@ -1031,7 +1029,7 @@
                 if (outputParamElement != null) {
                     //set the direction as out
                     addAttribute(doc,"direction","out",outputParamElement);
-                    parameterMap.put(outputParamElement.getAttribute("type"), outputParamElement);
+                    parameters.add(outputParamElement);
                 }
             }
 
@@ -1040,9 +1038,7 @@
             for (int i = 0; i < faultParamElements.length; i++) {
                 //set the direction as out - all faults are out messages ?
                 addAttribute(doc,"direction","out",faultParamElements[i]);
-                parameterMap.put(
-                        faultParamElements[i].getAttribute("type"),
-                        faultParamElements[i]);
+                parameters.add(faultParamElements[i]);
             }
 
             // process the header parameters
@@ -1053,7 +1049,7 @@
 
             for (int i = 0; i < parameterElementList.size(); i++) {
                 newChild = (Element) parameterElementList.get(i);
-                parameterMap.put(newChild.getAttribute("type"), newChild);
+                parameters.add(newChild);
             }
 
             headerParameterQNameList.clear();
@@ -1063,7 +1059,7 @@
 
             for (int i = 0; i < parameterElementList.size(); i++) {
                 newChild = (Element) parameterElementList.get(i);
-                parameterMap.put(newChild.getAttribute("type"), newChild);
+                parameters.add(newChild);
             }
         }
 
@@ -1102,9 +1098,6 @@
 
         //add the method names
         rootElement.appendChild(getOpNames(doc));
-
-        // Now run through the parameters and add them to the root element
-        Collection parameters = parameterMap.values();
 
         for (Iterator iterator = parameters.iterator(); iterator.hasNext();) {
             rootElement.appendChild((Element) iterator.next());

Modified: webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl?rev=437301&r1=437300&r2=437301&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/template/JaxbRIDatabindingTemplate.xsl
Sat Aug 26 22:37:36 2006
@@ -15,7 +15,7 @@
 
         <xsl:variable name="firstType"><xsl:value-of select="param[1]/@type"/></xsl:variable>
 
-        <xsl:for-each select="param">
+        <xsl:for-each select="param[not(@type = preceding-sibling::param/@type)]">
             <xsl:if test="@type!=''">
 
                 private org.apache.axiom.om.OMElement toOM(<xsl:value-of select="@type"/>
param, org.apache.axiom.soap.SOAPFactory factory, boolean optimizeContent) {

Modified: webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl?rev=437301&r1=437300&r2=437301&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl
Sat Aug 26 22:37:36 2006
@@ -15,7 +15,7 @@
 
         <xsl:variable name="firstType"><xsl:value-of select="param[1]/@type"/></xsl:variable>
 
-        <xsl:for-each select="param">
+        <xsl:for-each select="param[not(@type = preceding-sibling::param/@type)]">
             <xsl:if test="@type!=''">
 
                 <xsl:if test="position()=1">

Modified: webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl?rev=437301&r1=437300&r2=437301&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/xmlbeans/src/org/apache/axis2/xmlbeans/template/XmlbeansDatabindingTemplate.xsl
Sat Aug 26 22:37:36 2006
@@ -14,7 +14,7 @@
             };
         </xsl:if>
 
-        <xsl:for-each select="param[@type!='']">
+        <xsl:for-each select="param[not(@type = preceding-sibling::param/@type) and @type!='']">
 
             private  org.apache.axiom.om.OMElement  toOM(<xsl:value-of select="@type"/>
param, boolean optimizeContent){
             org.apache.axiom.om.impl.builder.StAXOMBuilder builder = new org.apache.axiom.om.impl.builder.StAXOMBuilder



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message