Author: sandakith
Date: Wed Jan 23 00:25:42 2008
New Revision: 614451

URL: http://svn.apache.org/viewvc?rev=614451&view=rev
Log:
Fixed the issue of JSR 181 Annotated class deployed without a name when there 
is no name attribute in the annotated POJO class


Modified:
    
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java

Modified: 
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: 
http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=614451&r1=614450&r2=614451&view=diff
==============================================================================
--- 
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 (original)
+++ 
webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
 Wed Jan 23 00:25:42 2008
@@ -179,6 +179,13 @@
                     }
                     if(annotation.getValue(AnnotationConstants.NAME) != null) {
                         String serviceName = 
(annotation.getValue(AnnotationConstants.NAME)).asString();
+                        if(serviceName.equals("")){
+                            serviceName=serviceClass.getName();
+                            int firstChar = serviceName.lastIndexOf ('.') + 1;
+                            if ( firstChar > 0 ) {
+                                serviceName = serviceName.substring ( 
firstChar );
+                            }
+                        }
                         service.setName(serviceName);
                     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to