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 am...@apache.org on 2007/03/20 12:05:23 UTC

svn commit: r520354 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/codegen/emitter/ integration/test/samples/wsdl/perf/ integration/test/samples/wsdl/perf2/ jibx/test/org/apache/axis2/jibx/

Author: amilas
Date: Tue Mar 20 04:05:22 2007
New Revision: 520354

URL: http://svn.apache.org/viewvc?view=rev&rev=520354
Log:
Rename the generated Stub class name as in earlier when there is only one port to preserve the 
backwork compatibility.

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/AxisServiceBasedMultiLanguageEmitter.java
    webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf/PerfPortTypeTest.java
    webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf2/PerfPortTypeTest.java
    webservices/axis2/trunk/java/modules/jibx/test/org/apache/axis2/jibx/Test.java

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?view=diff&rev=520354&r1=520353&r2=520354
==============================================================================
--- 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 Tue Mar 20 04:05:22 2007
@@ -319,7 +319,12 @@
      */
     protected String getFullyQualifiedStubName() {
         String packageName = codeGenConfiguration.getPackageName();
-        String localPart = makeJavaClassName(axisService.getName() + axisService.getEndpointName());
+        String localPart = null;
+        if (this.axisService.getEndpoints().size() > 1){
+           localPart = makeJavaClassName(axisService.getName() + axisService.getEndpointName());
+        } else {
+           localPart = makeJavaClassName(axisService.getName()); 
+        }
         return packageName + "." + localPart + STUB_SUFFIX;
     }
 
@@ -562,14 +567,26 @@
         Element rootElement = doc.createElement("class");
 
         addAttribute(doc, "package", codeGenConfiguration.getPackageName(), rootElement);
-        addAttribute(doc, "name", makeJavaClassName(axisService.getName() + axisService.getEndpointName())
+        if (this.axisService.getEndpoints().size() > 1){
+            addAttribute(doc, "name", makeJavaClassName(axisService.getName() + axisService.getEndpointName())
                 + TEST_SUFFIX, rootElement);
+        } else {
+           addAttribute(doc, "name", makeJavaClassName(axisService.getName())
+                + TEST_SUFFIX, rootElement);
+        }
+
         //todo is this right ???
         addAttribute(doc, "namespace", axisService.getTargetNamespace(), rootElement);
         addAttribute(doc, "interfaceName", coreClassName, rootElement);
         if (codeGenConfiguration.isPackClasses()){
-           addAttribute(doc, "callbackname", makeJavaClassName(axisService.getName() + axisService.getEndpointName())
+           if (this.axisService.getEndpoints().size() > 1){
+               addAttribute(doc, "callbackname", makeJavaClassName(axisService.getName() + axisService.getEndpointName())
                    + CALL_BACK_HANDLER_SUFFIX, rootElement);
+           } else {
+               addAttribute(doc, "callbackname", makeJavaClassName(axisService.getName())
+                   + CALL_BACK_HANDLER_SUFFIX, rootElement);
+           }
+
         } else {
            addAttribute(doc, "callbackname", coreClassName + CALL_BACK_HANDLER_SUFFIX, rootElement);
         }
@@ -577,8 +594,14 @@
             addAttribute(doc, "stubname",
                     makeJavaClassName(axisService.getBindingName()) + STUB_SUFFIX, rootElement);
         } else {
-            addAttribute(doc, "stubname", makeJavaClassName(axisService.getName() + axisService.getEndpointName())
+            if (this.axisService.getEndpoints().size() > 1){
+               addAttribute(doc, "stubname", makeJavaClassName(axisService.getName() + axisService.getEndpointName())
+                    + STUB_SUFFIX, rootElement);
+            } else {
+               addAttribute(doc, "stubname", makeJavaClassName(axisService.getName())
                     + STUB_SUFFIX, rootElement);
+            }
+
         }
 
         //add backwordcompatibility attribute
@@ -644,16 +667,31 @@
             addAttribute(doc, "name", makeJavaClassName(axisService.getBindingName()) + STUB_SUFFIX,
                     rootElement);
         } else {
-            addAttribute(doc, "interfaceName",
+            if (this.axisService.getEndpoints().size() > 1){
+                addAttribute(doc, "interfaceName",
                     makeJavaClassName(axisService.getName() + axisService.getEndpointName()) ,
                     rootElement);
-            addAttribute(doc, "name", stubName, rootElement);
+                addAttribute(doc, "name", stubName, rootElement);
+            } else {
+                addAttribute(doc, "interfaceName",
+                    makeJavaClassName(axisService.getName()) ,
+                    rootElement);
+                addAttribute(doc, "name", makeJavaClassName(axisService.getName()) + STUB_SUFFIX, rootElement);
+            }
+
         }
 
         if (codeGenConfiguration.isPackClasses()){
-            addAttribute(doc, "callbackname",
+            if (this.axisService.getEndpoints().size() > 1){
+                addAttribute(doc, "callbackname",
                     makeJavaClassName(axisService.getName() + axisService.getEndpointName()) +
                             CALL_BACK_HANDLER_SUFFIX, rootElement);
+            } else {
+                addAttribute(doc, "callbackname",
+                    makeJavaClassName(axisService.getName()) +
+                            CALL_BACK_HANDLER_SUFFIX, rootElement);
+            }
+
         } else {
             addAttribute(doc, "callbackname", localPart + CALL_BACK_HANDLER_SUFFIX, rootElement);
         }
@@ -1010,9 +1048,10 @@
         Element rootElement = doc.createElement("callback");
 
         addAttribute(doc, "package", codeGenConfiguration.getPackageName(), rootElement);
-        if (codeGenConfiguration.isPackClasses()){
+        if (codeGenConfiguration.isPackClasses() && this.axisService.getEndpoints().size() > 1){
             addAttribute(doc, "name",
-                makeJavaClassName(axisService.getName() + axisService.getEndpointName()) + CALL_BACK_HANDLER_SUFFIX, rootElement);
+                makeJavaClassName(axisService.getName() + axisService.getEndpointName())
+                        + CALL_BACK_HANDLER_SUFFIX, rootElement);
         } else {
             addAttribute(doc, "name",
                 makeJavaClassName(axisService.getName()) + CALL_BACK_HANDLER_SUFFIX, rootElement);
@@ -1056,14 +1095,21 @@
             localPart =
                     makeJavaClassName(axisService.getEndpointName() + STUB_INTERFACE_SUFFIX_BACK);
         } else {
-            localPart = makeJavaClassName(axisService.getName() + axisService.getEndpointName());
+            if (this.axisService.getEndpoints().size() > 1){
+                localPart = makeJavaClassName(axisService.getName() + axisService.getEndpointName());
+            } else {
+                localPart = makeJavaClassName(axisService.getName());
+            }
         }
 
         addAttribute(doc, "package", codeGenConfiguration.getPackageName(), rootElement);
         addAttribute(doc, "name", localPart, rootElement);
+
         addAttribute(doc, "callbackname",
                 makeJavaClassName(axisService.getName()) + CALL_BACK_HANDLER_SUFFIX,
                 rootElement);
+
+
         //add backwordcompatibility attribute
         addAttribute(doc, "isbackcompatible",
                 String.valueOf(codeGenConfiguration.isBackwordCompatibilityMode()),

Modified: webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf/PerfPortTypeTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf/PerfPortTypeTest.java?view=diff&rev=520354&r1=520353&r2=520354
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf/PerfPortTypeTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf/PerfPortTypeTest.java Tue Mar 20 04:05:22 2007
@@ -52,7 +52,7 @@
      * Auto generated test method
      */
    public void testhandleStringArray() throws java.lang.Exception {
-        PerfPortTypePerformanceStub stub = new PerfPortTypePerformanceStub(null, targetEpr);
+        PerfPortTypeStub stub = new PerfPortTypeStub(null, targetEpr);
         //create a new databinder
         stub._getServiceClient().getOptions().setAction("handleStringArray");
         log.info(">>>> Warming up...");
@@ -64,7 +64,7 @@
         pump(stub, 100000);
     }
 
-    private void pump(PerfPortTypePerformanceStub stub, int count) throws Exception {
+    private void pump(PerfPortTypeStub stub, int count) throws Exception {
         InputElementDocument input =
                 InputElementDocument.Factory.newInstance();
         String[] s = new String[count];

Modified: webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf2/PerfPortTypeTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf2/PerfPortTypeTest.java?view=diff&rev=520354&r1=520353&r2=520354
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf2/PerfPortTypeTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/samples/wsdl/perf2/PerfPortTypeTest.java Tue Mar 20 04:05:22 2007
@@ -52,7 +52,7 @@
      * Auto generated test method
      */
    public void testhandleStringArray() throws java.lang.Exception {
-        PerfPortTypePerformanceStub stub = new PerfPortTypePerformanceStub(null, targetEpr);
+        PerfPortTypeStub stub = new PerfPortTypeStub(null, targetEpr);
         //create a new databinder
         stub._getServiceClient().getOptions().setAction("handleStringArray");
         log.info(">>>> Warming up...");
@@ -64,7 +64,7 @@
         pump(stub, 100000);
     }
 
-    private void pump(PerfPortTypePerformanceStub stub, int count) throws Exception {
+    private void pump(PerfPortTypeStub stub, int count) throws Exception {
         InputElement input =
                 new InputElement();
         String[] s = new String[count];

Modified: webservices/axis2/trunk/java/modules/jibx/test/org/apache/axis2/jibx/Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jibx/test/org/apache/axis2/jibx/Test.java?view=diff&rev=520354&r1=520353&r2=520354
==============================================================================
--- webservices/axis2/trunk/java/modules/jibx/test/org/apache/axis2/jibx/Test.java (original)
+++ webservices/axis2/trunk/java/modules/jibx/test/org/apache/axis2/jibx/Test.java Tue Mar 20 04:05:22 2007
@@ -62,7 +62,7 @@
     private static final String MODULE_PATH_PREFIX = "../modules/";
     private static final String COMPILE_TARGET_NAME = "compile";
     private static final String STUB_CLASS =
-        "org.apache.ws.axis2.jibx.customer.wsdl.EchoCustomerServiceEchoCustomerPortStub";
+        "org.apache.ws.axis2.jibx.customer.wsdl.EchoCustomerServiceStub";
 
     public static final QName serviceName = new QName("EchoCustomerService");
     public static final QName operationName = new QName("echo");



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