ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kei...@apache.org
Subject svn commit: r582774 - /webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java
Date Mon, 08 Oct 2007 10:58:00 GMT
Author: keithc
Date: Mon Oct  8 03:58:00 2007
New Revision: 582774

URL: http://svn.apache.org/viewvc?rev=582774&view=rev
Log:
Fixing codegen to use -ap otion for WSDL 2.0 docs too


Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java?rev=582774&r1=582773&r2=582774&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/CodeGenerationEngine.java
Mon Oct  8 03:58:00 2007
@@ -23,6 +23,7 @@
 import org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder;
 import org.apache.axis2.description.WSDL11ToAxisServiceBuilder;
 import org.apache.axis2.description.WSDL20ToAxisServiceBuilder;
+import org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder;
 import org.apache.axis2.util.CommandLineOption;
 import org.apache.axis2.util.CommandLineOptionConstants;
 import org.apache.axis2.util.CommandLineOptionParser;
@@ -94,11 +95,25 @@
 
             if (CommandLineOptionConstants.WSDL2JavaConstants.WSDL_VERSION_2.
                     equals(configuration.getWSDLVersion())) {
-                WSDL20ToAxisServiceBuilder builder = new WSDL20ToAxisServiceBuilder(wsdlUri,
-                                                                                    configuration.getServiceName(),
-                                                                                    configuration.getPortName());
-                builder.setCodegen(true);
-                configuration.addAxisService(builder.populateService());
+
+                WSDL20ToAxisServiceBuilder builder;
+
+                // jibx currently does not support multiservice
+                if ((configuration.getServiceName() != null) || (configuration.getDatabindingType().equals("jibx")))
{
+                    builder = new WSDL20ToAxisServiceBuilder(
+                            wsdlUri,
+                            configuration.getServiceName(),
+                            configuration.getPortName(),
+                            configuration.isAllPorts());
+                    builder.setCodegen(true);
+                    configuration.addAxisService(builder.populateService());
+                } else {
+                    builder = new WSDL20ToAllAxisServicesBuilder(wsdlUri, configuration.getPortName());
+                    builder.setCodegen(true);
+                    builder.setAllPorts(configuration.isAllPorts());
+                    configuration.setAxisServices(
+                            ((WSDL20ToAllAxisServicesBuilder)builder).populateAllServices());
+                }
 
             } else {
                 //It'll be WSDL 1.1



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