axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sandak...@apache.org
Subject svn commit: r489575 - in /webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse: CodeGenWizard.java ui/JavaWSDLOptionsPage.java util/NamespaceFinder.java
Date Fri, 22 Dec 2006 08:00:24 GMT
Author: sandakith
Date: Fri Dec 22 00:00:23 2006
New Revision: 489575

URL: http://svn.apache.org/viewvc?view=rev&rev=489575
Log:
fix for the Axis2-1862 and changes made to fix the total round of bottom up and top down ws
to the plugins

Modified:
    webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java
    webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/util/NamespaceFinder.java

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java?view=diff&rev=489575&r1=489574&r2=489575
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/CodeGenWizard.java
Fri Dec 22 00:00:23 2006
@@ -217,21 +217,33 @@
                  AxisService service = generator.getAxisService(wsdlSelectionPage.getFileName());
                  monitor.worked(1);
                  
+                 //The generate all fix (Axis2-1862)
+                 boolean isServerside,isServiceXML,isGenerateServerSideInterface  = false;
+                 if (optionsPage.getGenerateAll()){
+                         isServerside = true;
+                         isServiceXML = true;
+                         isGenerateServerSideInterface = true;
+                 }else{
+                         isServerside = optionsPage.isServerside();
+                         isServiceXML =optionsPage.isServerXML();
+                         isGenerateServerSideInterface = optionsPage.getGenerateServerSideInterface();
+                 }
                  Map optionsMap = generator.fillOptionMap(optionsPage.isAsyncOnlyOn(),
-                         									optionsPage.isSyncOnlyOn(),
-                         									optionsPage.isServerside(),
-                         									optionsPage.isServerXML(),
-                         									optionsPage.isGenerateTestCase(),
-                         									optionsPage.getGenerateAll(),
-                         									optionsPage.getServiceName(),
-                         									optionsPage.getPortName(),
-                         									optionsPage.getDatabinderName(),
-                         									wsdlSelectionPage.getFileName(),
-                         									optionsPage.getPackageName(),
-                         									optionsPage.getSelectedLanguage(),
-                         									outputPage.getOutputLocation(),
-                         									optionsPage.getNs2PkgMapping(),
-                         									optionsPage.getGenerateServerSideInterface());
+                                                                                        
       optionsPage.isSyncOnlyOn(),
+                                                                                        
       isServerside,
+                                                                                        
       isServiceXML,
+                                                                                        
       optionsPage.isGenerateTestCase(),
+                                                                                        
       optionsPage.getGenerateAll(),
+                                                                                        
       optionsPage.getServiceName(),
+                                                                                        
       optionsPage.getPortName(),
+                                                                                        
       optionsPage.getDatabinderName(),
+                                                                                        
       wsdlSelectionPage.getFileName(),
+                                                                                        
       optionsPage.getPackageName(),
+                                                                                        
       optionsPage.getSelectedLanguage(),
+                                                                                        
       outputPage.getOutputLocation(),
+                                                                                        
       optionsPage.getNs2PkgMapping(),
+                                                                                        
       isGenerateServerSideInterface);
+
                  
                  CodeGenConfiguration codegenConfig = new CodeGenConfiguration(service, optionsMap);
                  //set the baseURI

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java?view=diff&rev=489575&r1=489574&r2=489575
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/ui/JavaWSDLOptionsPage.java
Fri Dec 22 00:00:23 2006
@@ -73,7 +73,8 @@
 		targetNamespacePrefixText.setText(NamespaceFinder.getDefaultNamespacePrefix());
 		schemaTargetNamespacePrefixText.setText(NamespaceFinder.getDefaultSchemaNamespacePrefix());
 		
-		serviceNameText.setText(fullyQualifiedClassName.replaceAll("\\.","_"));
+//		serviceNameText.setText(fullyQualifiedClassName.replaceAll("\\.","_"));
+		serviceNameText.setText(NamespaceFinder.getServiceNameText(fullyQualifiedClassName));
 	}
 	/**
 	 * @param pageName

Modified: webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/util/NamespaceFinder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/util/NamespaceFinder.java?view=diff&rev=489575&r1=489574&r2=489575
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/util/NamespaceFinder.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/tool/axis2-eclipse-codegen-plugin/src/main/java/org/apache/axis2/tool/codegen/eclipse/util/NamespaceFinder.java
Fri Dec 22 00:00:23 2006
@@ -19,18 +19,17 @@
 public class NamespaceFinder {
 	
 	private static String NS_PREFIX = "http://";
-	private static String SCHEMA_NS_SUFFIX = "/types";
-	private static String SCHEMA_NS_DEFAULT_PREFIX = "types";
+	private static String SCHEMA_NS_SUFFIX = "/xsd";
+	private static String SCHEMA_NS_DEFAULT_PREFIX = "xsd";
 	private static String NS_DEFAULT_PREFIX = "ns";
 	
 	
 	public static String getTargetNamespaceFromClass(String fullyQualifiedClassName){
 		//tokenize the className
 		String[] classNameParts = fullyQualifiedClassName.split("\\.");
-		//add the strings in reverse order to make
-		//the namespace
+		//add the strings in reverse order to make the namespace
 		String nsUri = "";
-		for(int i=classNameParts.length-1;i>=0;i--){
+		for(int i=classNameParts.length-2;i>=0;i--){
 			nsUri = nsUri + classNameParts[i] + (i==0?"":".");
 		}
 		
@@ -50,4 +49,11 @@
 	public static String getDefaultNamespacePrefix(){
 		return NS_DEFAULT_PREFIX;
 	}
+	
+	public static String getServiceNameText(String fullyQualifiedClassName){
+		//tokenize the className
+		String[] classNameParts = fullyQualifiedClassName.split("\\.");
+		return classNameParts[classNameParts.length-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