You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by sa...@apache.org on 2012/05/24 08:36:03 UTC

svn commit: r1342152 - in /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2: deployment/ deployment/util/ description/ description/java2wsdl/ jsr181/

Author: sagara
Date: Thu May 24 06:36:02 2012
New Revision: 1342152

URL: http://svn.apache.org/viewvc?rev=1342152&view=rev
Log:
AXIS2-5327 - Removed org.apache.axis2.jsr181 package. 

Removed:
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/jsr181/
Modified:
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java?rev=1342152&r1=1342151&r2=1342152&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java Thu May 24 06:36:02 2012
@@ -30,8 +30,6 @@ import org.apache.axis2.description.Axis
 import org.apache.axis2.description.WSDL2Constants;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.i18n.Messages;
-import org.apache.axis2.jsr181.JSR181Helper;
-import org.apache.axis2.jsr181.WebServiceAnnotation;
 import org.apache.axis2.util.Loader;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -94,22 +92,13 @@ public class POJODeployer extends Abstra
                  * nothing will happen) 2. In the next stage for all the methods
                  * messages and port types will be creteated
                  */
-                WebServiceAnnotation annotation =
-                        JSR181Helper.INSTANCE.getWebServiceAnnotation(clazz);
-                AxisService axisService;
-                if (annotation != null) {
-                    // try to see whether JAX-WS jars in the class path , if so use them
-                    // to process annotated pojo else use annogen to process the pojo class
-                    axisService =
-                            createAxisService(classLoader,
-                                    className,
-                                    deploymentFileData.getFile().toURL());
-                } else {
-                    axisService =
+                
+                AxisService axisService;               
+                axisService =
                             createAxisServiceUsingAnnogen(className,
                                     classLoader,
                                     deploymentFileData.getFile().toURL());
-                }
+                
                 //add the hierarchical path to the service name
                 axisService.setName(serviceHierarchy + axisService.getName());
                 configCtx.getAxisConfiguration().addService(axisService);
@@ -142,17 +131,8 @@ public class POJODeployer extends Abstra
                      * parameters are simple type which decribe in SimpleTypeTable
                      * nothing will happen) 2. In the next stage for all the methods
                      * messages and port types will be creteated
-                     */
-                    WebServiceAnnotation annotation =
-                            JSR181Helper.INSTANCE.getWebServiceAnnotation(clazz);
-                    if (annotation != null) {
-                        AxisService axisService;
-                        axisService =
-                                createAxisService(classLoader,
-                                                  className,
-                                                  deploymentFileData.getFile().toURL());
-                        axisServiceList.add(axisService);
-                    }
+                     */                  
+                   
                 }
 
                 if (axisServiceList.size() > 0) {

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?rev=1342152&r1=1342151&r2=1342152&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Thu May 24 06:36:02 2012
@@ -44,9 +44,6 @@ import org.apache.axis2.engine.AxisConfi
 import org.apache.axis2.engine.Handler;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.i18n.Messages;
-import org.apache.axis2.jsr181.JSR181Helper;
-import org.apache.axis2.jsr181.WebMethodAnnotation;
-import org.apache.axis2.jsr181.WebServiceAnnotation;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.util.Loader;
 import org.apache.axis2.util.PolicyUtil;
@@ -523,16 +520,6 @@ public class Utils {
         }
         String opName = method.getName();
 
-        WebMethodAnnotation methodAnnon = JSR181Helper.INSTANCE.getWebMethodAnnotation(method);
-        if (methodAnnon != null) {
-            String action = methodAnnon.getAction();
-            if (action != null && !"".equals(action)) {
-                operation.setSoapAction(action);
-            }
-            if (methodAnnon.getOperationName() != null){
-                opName = methodAnnon.getOperationName();
-            }
-        }
 
         operation.setName(new QName(opName));
         return operation;
@@ -919,32 +906,7 @@ public class Utils {
         return file.getName();
     }
 
-    /**
-     * The util method to prepare the JSR 181 annotated service name from given annotation or for
-     * defaults JSR 181 specifies that the in javax.jws.WebService the parameter serviceName
-     * contains the wsdl:service name to mapp. If its not available then the default will be Simple
-     * name of the class + "Service"
-     *
-     * @param serviceClass the service Class
-     * @param serviceAnnotation a WebService annotation, or null
-     * @return String version of the ServiceName according to the JSR 181 spec
-     */
-    public static String getAnnotatedServiceName(Class serviceClass, WebServiceAnnotation serviceAnnotation) {
-        String serviceName = "";
-        if (serviceAnnotation != null && serviceAnnotation.getServiceName() != null) {
-            serviceName = serviceAnnotation.getServiceName();
-        }
-        if (serviceName.equals("")) {
-            serviceName = serviceClass.getName();
-            int firstChar = serviceName.lastIndexOf('.') + 1;
-            if (firstChar > 0) {
-                serviceName = serviceName.substring(firstChar);
-            }
-            serviceName += "Service";
-        }
-        return serviceName;
-    }
-
+    
     public static void addEndpointsToService(AxisService axisService)
             throws AxisFault {
 

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java?rev=1342152&r1=1342151&r2=1342152&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/AxisService.java Thu May 24 06:36:02 2012
@@ -22,8 +22,6 @@ package org.apache.axis2.description;
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
-import org.apache.axis2.jsr181.WebMethodAnnotation;
-import org.apache.axis2.jsr181.JSR181Helper;
 import org.apache.axis2.addressing.AddressingHelper;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.addressing.AddressingConstants;
@@ -2572,13 +2570,8 @@ public class AxisService extends AxisDes
 		for (int i = 0; i < method.length; i++) {
 			Method jmethod = method[i];
 
-            String methodName = jmethod.getName();
-            WebMethodAnnotation methodAnnon = JSR181Helper.INSTANCE.getWebMethodAnnotation(jmethod);
-            if (methodAnnon != null) {
-                if (methodAnnon.getOperationName() != null){
-                    methodName = methodAnnon.getOperationName();
-                }
-            }
+            String methodName = jmethod.getName();         
+            
 			AxisOperation operation = axisService.getOperation(new QName(methodName));
 
 			String mep = operation.getMessageExchangePattern();

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java?rev=1342152&r1=1342151&r2=1342152&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java Thu May 24 06:36:02 2012
@@ -30,11 +30,6 @@ import org.apache.axis2.description.Para
 import org.apache.axis2.description.java2wsdl.bytecode.MethodTable;
 import org.apache.axis2.jaxrs.JAXRSModel;
 import org.apache.axis2.jaxrs.JAXRSUtils;
-import org.apache.axis2.jsr181.JSR181Helper;
-import org.apache.axis2.jsr181.WebMethodAnnotation;
-import org.apache.axis2.jsr181.WebParamAnnotation;
-import org.apache.axis2.jsr181.WebResultAnnotation;
-import org.apache.axis2.jsr181.WebServiceAnnotation;
 import org.apache.axis2.util.JavaUtils;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
@@ -300,16 +295,6 @@ public class DefaultSchemaGenerator impl
          * nothing will happen) 2. In the next stage for all the methods
          * messages and port types will be creteated
          */
-        WebServiceAnnotation webservice =
-                JSR181Helper.INSTANCE.getWebServiceAnnotation(serviceClass);
-        if (webservice != null) {
-            String tns = webservice.getTargetNamespace();
-            if (tns != null && !"".equals(tns)) {
-                targetNamespace = tns;
-                schemaTargetNameSpace = tns;
-            }
-            service.setName(Utils.getAnnotatedServiceName(serviceClass, webservice));
-        }
         classModel= JAXRSUtils.getClassModel(serviceClass);
         methods = processMethods(serviceClass.getMethods());
         
@@ -339,17 +324,7 @@ public class DefaultSchemaGenerator impl
                 continue;
             }
 
-            WebMethodAnnotation methodAnnon = JSR181Helper.INSTANCE.getWebMethodAnnotation(jMethod);
             String methodName = jMethod.getName();
-            if (methodAnnon != null) {
-                if (methodAnnon.isExclude()) {
-                    continue;
-                }
-                if (methodAnnon.getOperationName() != null){
-                    methodName = methodAnnon.getOperationName();
-                }
-            }
-
             // no need to think abt this method , since that is system
             // config method
             if (excludeMethods.contains(methodName)) {
@@ -474,15 +449,8 @@ public class DefaultSchemaGenerator impl
                 methodSchemaType =
                         createSchemaTypeForMethodPart(partQname);
                 sequence = new XmlSchemaSequence();
-                methodSchemaType.setParticle(sequence);
-                WebResultAnnotation returnAnnon = JSR181Helper.INSTANCE.getWebResultAnnotation(jMethod);
-                String returnName = "return";
-                if (returnAnnon != null) {
-                    returnName = returnAnnon.getName();
-                    if (returnName == null || "".equals(returnName)) {
-                        returnName = "return";
-                    }
-                }
+                methodSchemaType.setParticle(sequence);               
+                String returnName = "return";                
                 Type genericParameterType = jMethod.getGenericReturnType();
                 if (nonRpcMethods.contains(jMethod.getName())) {
                     generateSchemaForType(sequence, null, returnName);
@@ -1750,14 +1718,7 @@ public class DefaultSchemaGenerator impl
     protected String getParameterName(Annotation[][] parameterAnnotation,
                                       int j,
                                       String[] parameterNames) {
-        String parameterName = null;
-        if (parameterAnnotation.length > 0) {
-            WebParamAnnotation annotation =
-                    JSR181Helper.INSTANCE.getWebParamAnnotation(parameterAnnotation[j]);
-            if (annotation != null) {
-                parameterName = annotation.getName();
-            }
-        }
+        String parameterName = null;     
         if (parameterName == null || "".equals(parameterName)) {
             if(parameterNames != null && parameterNames.length > j) {
                 parameterName = parameterNames[j];

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java?rev=1342152&r1=1342151&r2=1342152&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java Thu May 24 06:36:02 2012
@@ -25,9 +25,6 @@ import org.apache.axis2.description.Axis
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.WSDL2Constants;
-import org.apache.axis2.jsr181.JSR181Helper;
-import org.apache.axis2.jsr181.WebMethodAnnotation;
-import org.apache.axis2.jsr181.WebResultAnnotation;
 import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -79,12 +76,6 @@ public class DocLitBareSchemaGenerator e
             if (jMethod.isBridge()) {
                 continue;
             }
-            WebMethodAnnotation methodAnnon = JSR181Helper.INSTANCE.getWebMethodAnnotation(jMethod);
-            if (methodAnnon != null) {
-                if (methodAnnon.isExclude()) {
-                    continue;
-                }
-            }
             String methodName = jMethod.getName();
             // no need to think abt this method , since that is system
             // config method
@@ -216,13 +207,6 @@ public class DocLitBareSchemaGenerator e
                             createSchemaTypeForMethodPart(methodTypeName);
                     sequence = new XmlSchemaSequence();
                     methodSchemaType.setParticle(sequence);
-                    WebResultAnnotation returnAnnon = JSR181Helper.INSTANCE.getWebResultAnnotation(jMethod);                  
-                    if (returnAnnon != null) {
-                        returnName = returnAnnon.getName();
-                        if (returnName != null && !"".equals(returnName)) {
-                            returnName = "return";
-                        }
-                    }
                     if (nonRpcMethods.contains(methodName)) {
                         generateSchemaForType(sequence, null, returnName);
                     } else {