axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r804716 - in /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2: deployment/ deployment/util/ description/java2wsdl/ jsr181/
Date Sun, 16 Aug 2009 16:41:00 GMT
Author: veithen
Date: Sun Aug 16 16:40:59 2009
New Revision: 804716

URL: http://svn.apache.org/viewvc?rev=804716&view=rev
Log:
Break the direct dependency on the JSR 181 API to avoid failure if the JAR is not available
at runtime (as with Web projects created by Eclipse JST; see AXIS2-4464). This is useful because
the JSR 181 annotations are optional.

Added:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181Helper.java
  (with props)
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181HelperImpl.java
  (with props)
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/NullJSR181Helper.java
  (with props)
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebMethodAnnotation.java
  (with props)
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebParamAnnotation.java
  (with props)
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebResultAnnotation.java
  (with props)
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebServiceAnnotation.java
  (with props)
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/package-info.java
  (with props)
Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DefaultSchemaGenerator.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java?rev=804716&r1=804715&r2=804716&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/POJODeployer.java
Sun Aug 16 16:40:59 2009
@@ -30,11 +30,12 @@
 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;
 
-import javax.jws.WebService;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.PrintWriter;
@@ -87,7 +88,8 @@
                  * nothing will happen) 2. In the next stage for all the methods
                  * messages and port types will be creteated
                  */
-                WebService annotation = (WebService) clazz.getAnnotation(WebService.class);
+                WebServiceAnnotation annotation =
+                        JSR181Helper.INSTANCE.getWebServiceAnnotation(clazz);
                 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
@@ -163,7 +165,8 @@
                      * nothing will happen) 2. In the next stage for all the methods
                      * messages and port types will be creteated
                      */
-                    WebService annotation = (WebService)clazz.getAnnotation(WebService.class);
+                    WebServiceAnnotation annotation =
+                            JSR181Helper.INSTANCE.getWebServiceAnnotation(clazz);
                     if (annotation != null) {
                         AxisService axisService;
                         axisService =

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?rev=804716&r1=804715&r2=804716&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
Sun Aug 16 16:40:59 2009
@@ -42,6 +42,9 @@
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Handler;
 import org.apache.axis2.engine.MessageReceiver;
+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;
@@ -52,8 +55,6 @@
 import org.apache.neethi.PolicyComponent;
 import org.apache.ws.commons.schema.utils.NamespaceMap;
 
-import javax.jws.WebMethod;
-import javax.jws.WebService;
 import javax.xml.namespace.QName;
 import javax.xml.stream.FactoryConfigurationError;
 import javax.xml.stream.XMLStreamException;
@@ -569,9 +570,9 @@
         }
         String opName = method.getName();
         operation.setName(new QName(opName));
-        WebMethod methodAnnon = method.getAnnotation(WebMethod.class);
+        WebMethodAnnotation methodAnnon = JSR181Helper.INSTANCE.getWebMethodAnnotation(method);
         if (methodAnnon != null) {
-            String action = methodAnnon.action();
+            String action = methodAnnon.getAction();
             if (action != null && !"".equals(action)) {
                 operation.setSoapAction(action);
             }
@@ -970,10 +971,10 @@
      * @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, WebService serviceAnnotation)
{
+    public static String getAnnotatedServiceName(Class serviceClass, WebServiceAnnotation
serviceAnnotation) {
         String serviceName = "";
-        if (serviceAnnotation != null && serviceAnnotation.serviceName() != null)
{
-            serviceName = serviceAnnotation.serviceName();
+        if (serviceAnnotation != null && serviceAnnotation.getServiceName() != null)
{
+            serviceName = serviceAnnotation.getServiceName();
         }
         if (serviceName.equals("")) {
             serviceName = serviceClass.getName();

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=804716&r1=804715&r2=804716&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
Sun Aug 16 16:40:59 2009
@@ -27,6 +27,11 @@
 import org.apache.axis2.deployment.util.Utils;
 import org.apache.axis2.description.*;
 import org.apache.axis2.description.java2wsdl.bytecode.MethodTable;
+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.wsdl.WSDLConstants;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -36,10 +41,6 @@
 import org.w3c.dom.Document;
 
 import javax.activation.DataHandler;
-import javax.jws.WebMethod;
-import javax.jws.WebParam;
-import javax.jws.WebResult;
-import javax.jws.WebService;
 import javax.xml.namespace.QName;
 import javax.xml.parsers.DocumentBuilderFactory;
 import java.io.*;
@@ -243,14 +244,15 @@
          * nothing will happen) 2. In the next stage for all the methods
          * messages and port types will be creteated
          */
-        WebService webervice = serviceClass.getAnnotation(WebService.class);
-        if (webervice != null) {
-            String tns = webervice.targetNamespace();
+        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, webervice));
+            service.setName(Utils.getAnnotatedServiceName(serviceClass, webservice));
         }
         classModel= JAXRSUtils.getClassModel(serviceClass);
         methods = processMethods(serviceClass.getDeclaredMethods());
@@ -277,9 +279,9 @@
         XmlSchemaSequence sequence = null;
 
         for (Method jMethod : declaredMethods) {
-            WebMethod methodAnnon = jMethod.getAnnotation(WebMethod.class);
+            WebMethodAnnotation methodAnnon = JSR181Helper.INSTANCE.getWebMethodAnnotation(jMethod);
             if (methodAnnon != null) {
-                if (methodAnnon.exclude()) {
+                if (methodAnnon.isExclude()) {
                     continue;
                 }
             }
@@ -370,10 +372,10 @@
                         createSchemaTypeForMethodPart(partQname);
                 sequence = new XmlSchemaSequence();
                 methodSchemaType.setParticle(sequence);
-                WebResult returnAnnon = jMethod.getAnnotation(WebResult.class);
+                WebResultAnnotation returnAnnon = JSR181Helper.INSTANCE.getWebResultAnnotation(jMethod);
                 String returnName = "return";
                 if (returnAnnon != null) {
-                    returnName = returnAnnon.name();
+                    returnName = returnAnnon.getName();
                     if (returnName != null && !"".equals(returnName)) {
                         returnName = "return";
                     }
@@ -1505,12 +1507,10 @@
                                       String[] parameterNames) {
         String parameterName = null;
         if (parameterAnnotation.length > 0) {
-            Annotation[] tempAnnon = parameterAnnotation[j];
-            if ((tempAnnon.length > 0) && (tempAnnon[0] instanceof WebParam))
{
-                WebParam para = (WebParam) tempAnnon[0];
-                if (para != null) {
-                    parameterName = para.name();
-                }
+            WebParamAnnotation annotation =
+                    JSR181Helper.INSTANCE.getWebParamAnnotation(parameterAnnotation[j]);
+            if (annotation != null) {
+                parameterName = annotation.getName();
             }
         }
         if (parameterName == null || "".equals(parameterName)) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java?rev=804716&r1=804715&r2=804716&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/java2wsdl/DocLitBareSchemaGenerator.java
Sun Aug 16 16:40:59 2009
@@ -25,6 +25,9 @@
 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;
@@ -34,8 +37,6 @@
 import org.apache.ws.commons.schema.XmlSchemaSequence;
 import org.apache.ws.commons.schema.utils.NamespaceMap;
 
-import javax.jws.WebMethod;
-import javax.jws.WebResult;
 import javax.xml.namespace.QName;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
@@ -71,9 +72,9 @@
         XmlSchemaSequence sequence;
 
         for (Method jMethod : declaredMethods) {
-            WebMethod methodAnnon = jMethod.getAnnotation(WebMethod.class);
+            WebMethodAnnotation methodAnnon = JSR181Helper.INSTANCE.getWebMethodAnnotation(jMethod);
             if (methodAnnon != null) {
-                if (methodAnnon.exclude()) {
+                if (methodAnnon.isExclude()) {
                     continue;
                 }
             }
@@ -185,10 +186,10 @@
                             createSchemaTypeForMethodPart(jMethod.getName() + RESULT);
                     sequence = new XmlSchemaSequence();
                     methodSchemaType.setParticle(sequence);
-                    WebResult returnAnnon = jMethod.getAnnotation(WebResult.class);
+                    WebResultAnnotation returnAnnon = JSR181Helper.INSTANCE.getWebResultAnnotation(jMethod);
                     String returnName = "return";
                     if (returnAnnon != null) {
-                        returnName = returnAnnon.name();
+                        returnName = returnAnnon.getName();
                         if (returnName != null && !"".equals(returnName)) {
                             returnName = "return";
                         }

Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181Helper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181Helper.java?rev=804716&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181Helper.java
(added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181Helper.java
Sun Aug 16 16:40:59 2009
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jsr181;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+
+/**
+ * Helper class to work with JSR 181 annotations. This class should be used to retrieve JSR
181
+ * annotations. It avoids the direct dependency on the API, i.e. it avoids
+ * {@link NoClassDefFoundError} exceptions if the JAR is not in the classpath. This is useful
+ * because these annotations are completely optional in Axis2.
+ */
+public abstract class JSR181Helper {
+    /**
+     * The instance of this helper class. If the JSR 181 API is not available in the classpath,
this
+     * will be an implementation that always returns <code>null</code>.
+     */
+    public static final JSR181Helper INSTANCE;
+    
+    static {
+        boolean jsr181present;
+        try {
+            Class.forName("javax.jws.WebService");
+            jsr181present = true;
+        } catch (ClassNotFoundException ex) {
+            jsr181present = false;
+        }
+        INSTANCE = jsr181present ? new JSR181HelperImpl() : new NullJSR181Helper();
+    }
+
+    /**
+     * Get the WebService annotation for a given class.
+     * 
+     * @param clazz
+     *            the class
+     * @return the WebService annotation, or <code>null</code> if there is no
such annotation
+     */
+    public abstract WebServiceAnnotation getWebServiceAnnotation(Class<?> clazz);
+
+    /**
+     * Get the WebMethod annotation for a given method.
+     * 
+     * @param method
+     *            the method
+     * @return the WebMethod annotation, or <code>null</code> if there is no
such annotation
+     */
+    public abstract WebMethodAnnotation getWebMethodAnnotation(Method method);
+    
+    /**
+     * Get the WebParam annotation from a set of annotations. This method is typically used
in
+     * conjunction with {@link Method#getParameterAnnotations()}.
+     * 
+     * @param annotations
+     *            an array of annotations
+     * @return the WebParam annotation, or <code>null</code> if the array didn't
contain a WebParam
+     *         annotation
+     */
+    public abstract WebParamAnnotation getWebParamAnnotation(Annotation[] annotations);
+    
+    /**
+     * Get the WebResult annotation for a given method.
+     * 
+     * @param method
+     *            the method
+     * @return the WebResult annotation, or <code>null</code> if there is no
such annotation
+     */
+    public abstract WebResultAnnotation getWebResultAnnotation(Method method);
+}

Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181Helper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181HelperImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181HelperImpl.java?rev=804716&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181HelperImpl.java
(added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181HelperImpl.java
Sun Aug 16 16:40:59 2009
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jsr181;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+
+class JSR181HelperImpl extends JSR181Helper {
+    @Override
+    public WebServiceAnnotation getWebServiceAnnotation(Class<?> clazz) {
+        WebService annotation = clazz.getAnnotation(WebService.class);
+        return annotation == null ? null : new WebServiceAnnotation(annotation.targetNamespace(),
+                annotation.serviceName());
+    }
+
+    @Override
+    public WebMethodAnnotation getWebMethodAnnotation(Method method) {
+        WebMethod annotation = method.getAnnotation(WebMethod.class);
+        return annotation == null ? null : new WebMethodAnnotation(annotation.exclude(),
+                annotation.action());
+    }
+
+    @Override
+    public WebParamAnnotation getWebParamAnnotation(Annotation[] annotations) {
+        for (Annotation annotation : annotations) {
+            if (annotation instanceof WebParam) {
+                WebParam webParam = (WebParam)annotation;
+                return new WebParamAnnotation(webParam.name());
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public WebResultAnnotation getWebResultAnnotation(Method method) {
+        WebResult annotation = method.getAnnotation(WebResult.class);
+        return annotation == null ? null : new WebResultAnnotation(annotation.name());
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/JSR181HelperImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/NullJSR181Helper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/NullJSR181Helper.java?rev=804716&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/NullJSR181Helper.java
(added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/NullJSR181Helper.java
Sun Aug 16 16:40:59 2009
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jsr181;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+
+class NullJSR181Helper extends JSR181Helper {
+    @Override
+    public WebServiceAnnotation getWebServiceAnnotation(Class<?> clazz) {
+        return null;
+    }
+
+    @Override
+    public WebMethodAnnotation getWebMethodAnnotation(Method method) {
+        return null;
+    }
+
+    @Override
+    public WebParamAnnotation getWebParamAnnotation(Annotation[] annotations) {
+        return null;
+    }
+
+    @Override
+    public WebResultAnnotation getWebResultAnnotation(Method method) {
+        return null;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/NullJSR181Helper.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebMethodAnnotation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebMethodAnnotation.java?rev=804716&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebMethodAnnotation.java
(added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebMethodAnnotation.java
Sun Aug 16 16:40:59 2009
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jsr181;
+
+/**
+ * Wrapper for the {@link javax.jws.WebMethod} annotation.
+ */
+public class WebMethodAnnotation {
+    private final boolean exclude;
+    private final String action;
+
+    WebMethodAnnotation(boolean exclude, String action) {
+        this.exclude = exclude;
+        this.action = action;
+    }
+
+    public boolean isExclude() {
+        return exclude;
+    }
+
+    public String getAction() {
+        return action;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebMethodAnnotation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebParamAnnotation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebParamAnnotation.java?rev=804716&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebParamAnnotation.java
(added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebParamAnnotation.java
Sun Aug 16 16:40:59 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jsr181;
+
+/**
+ * Wrapper for the {@link javax.jws.WebParam} annotation.
+ */
+public class WebParamAnnotation {
+    private final String name;
+
+    WebParamAnnotation(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebParamAnnotation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebResultAnnotation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebResultAnnotation.java?rev=804716&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebResultAnnotation.java
(added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebResultAnnotation.java
Sun Aug 16 16:40:59 2009
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jsr181;
+
+/**
+ * Wrapper for the {@link javax.jws.WebResult} annotation.
+ */
+public class WebResultAnnotation {
+    private final String name;
+
+    WebResultAnnotation(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebResultAnnotation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebServiceAnnotation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebServiceAnnotation.java?rev=804716&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebServiceAnnotation.java
(added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebServiceAnnotation.java
Sun Aug 16 16:40:59 2009
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.axis2.jsr181;
+
+/**
+ * Wrapper for the {@link javax.jws.WebService} annotation.
+ */
+public class WebServiceAnnotation {
+    private final String targetNamespace;
+    private final String serviceName;
+
+    WebServiceAnnotation(String targetNamespace, String serviceName) {
+        this.targetNamespace = targetNamespace;
+        this.serviceName = serviceName;
+    }
+
+    public String getTargetNamespace() {
+        return targetNamespace;
+    }
+
+    public String getServiceName() {
+        return serviceName;
+    }
+}

Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/WebServiceAnnotation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/package-info.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/package-info.java?rev=804716&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/package-info.java
(added)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/package-info.java
Sun Aug 16 16:40:59 2009
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * Contains helper classes to avoid direct dependencies on the JSR 181 API (Web Services
+ * annotations).
+ */
+package org.apache.axis2.jsr181;
\ No newline at end of file

Propchange: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/jsr181/package-info.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message