axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kei...@apache.org
Subject svn commit: r483360 - /webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
Date Thu, 07 Dec 2006 06:53:18 GMT
Author: keithc
Date: Wed Dec  6 22:53:15 2006
New Revision: 483360

URL: http://svn.apache.org/viewvc?view=rev&rev=483360
Log:
Added element to intermidiate XML to capture transfercoding

Modified:
    webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java

Modified: webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java?view=diff&rev=483360&r1=483359&r2=483360
==============================================================================
--- webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
(original)
+++ webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
Wed Dec  6 22:53:15 2006
@@ -1887,9 +1887,23 @@
         }
         methodElement.appendChild(getFaultElement(doc,
                 axisOperation));
+
+        setTransferCoding(axisOperation, methodElement, doc);
         return methodElement;
     }
 
+    private void setTransferCoding(AxisOperation axisOperation, Element methodElement,
+                                   Document doc) {
+        // Add a optionParam element which holds the value of transferCoding
+        String transferCoding = (String) getBindingPropertyFromMessage(WSDL2Constants.ATTR_WHTTP_TRANSFER_CODING,
+                        axisOperation.getName(), WSDLConstants.WSDL_MESSAGE_DIRECTION_IN);
+        if (!"".equals(transferCoding)) {
+            if ("gzip".equals(transferCoding)) {
+                methodElement.appendChild(generateOptionParamComponent(doc, "org.apache.axis2.transport.http.HTTPConstants.MC_GZIP_REQUEST",
"true"));
+            }
+        }
+    }
+
     // ==================================================================
     //                   Util Methods
     // ==================================================================
@@ -2407,6 +2421,22 @@
                                              String paramType) {
         return generateParamComponent(doc, paramName, paramType, null, null, false, false);
 
+    }
+
+    /**
+     * A convenient method for the generating optionParam components
+     *
+     * @param doc
+     * @param name
+     * @param value
+     * @return Element
+     */
+    protected Element generateOptionParamComponent(Document doc, String name, String value)
{
+
+        Element optionParamElement = doc.createElement("optionParam");
+        addAttribute(doc, "name", name, optionParamElement);
+        addAttribute(doc, "value", value, optionParamElement);
+        return optionParamElement;
     }
 
     /**



---------------------------------------------------------------------
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