You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ke...@apache.org on 2007/01/05 13:57:18 UTC

svn commit: r493018 - /webservices/axis2/branches/java/WSDL_2_0/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java

Author: keithc
Date: Fri Jan  5 04:57:18 2007
New Revision: 493018

URL: http://svn.apache.org/viewvc?view=rev&rev=493018
Log:
added param to enable REST in generated stub

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=493018&r1=493017&r2=493018
==============================================================================
--- 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 Fri Jan  5 04:57:18 2007
@@ -1898,9 +1898,18 @@
         methodElement.appendChild(getFaultElement(doc,
                 axisOperation));
 
+        String mep = (String)getBindingPropertyFromOperation(WSDL2Constants.ATTR_WSOAP_MEP, axisOperation.getName());
+
+        if (WSDL2Constants.URI_WSOAP_MEP.equalsIgnoreCase(mep)) {
+            methodElement.appendChild(generateOptionParamComponent(doc, "org.apache.axis2.Constants.Configuration.ENABLE_REST", "true"));
+            methodElement.appendChild(generateOptionParamComponent(doc," Constants.Configuration.HTTP_METHOD", "\"" + org.apache.axis2.Constants.Configuration.HTTP_METHOD_GET + "\""));
+       }
+
         setTransferCoding(axisOperation, methodElement, doc);
         
         if (axisBinding.getType().equals(WSDL2Constants.URI_WSDL2_HTTP)) {
+
+            methodElement.appendChild(generateOptionParamComponent(doc, "org.apache.axis2.Constants.Configuration.ENABLE_REST", "true"));
             
             String property = (String) getBindingPropertyFromOperation(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
                         axisOperation.getName());



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