axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject svn commit: r417431 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/client/ core/src/org/apache/axis2/context/ core/src/org/apache/axis2/description/ core/src/org/apache/axis2/engine/ core/src/org/apache/axis2/receivers/ core/src/...
Date Tue, 27 Jun 2006 11:36:20 GMT
Author: gdaniels
Date: Tue Jun 27 04:36:19 2006
New Revision: 417431

URL: http://svn.apache.org/viewvc?rev=417431&view=rev
Log:
* Parameter name is now serviceObjectSupplier (not serviceClass)

* Dynamic method name on service object supplier is now getServiceObject

* Spelling fixes

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/SessionContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/DescriptionConstants.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/server/SessionManager.java
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLUtils.java
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
Tue Jun 27 04:36:19 2006
@@ -22,6 +22,7 @@
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axiom.soap.SOAPHeader;
+import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.async.AsyncResult;
@@ -285,6 +286,13 @@
      * @param header The header to be added for interactions. Must not be null.
      */
     public void addHeader(OMElement header) {
+        if (headers == null) {
+            headers = new ArrayList();
+        }
+        headers.add(header);
+    }
+
+    public void addHeader(SOAPHeaderBlock header) {
         if (headers == null) {
             headers = new ArrayList();
         }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ConfigurationContext.java
Tue Jun 27 04:36:19 2006
@@ -361,7 +361,7 @@
         while (serviceContecxtes.hasNext()) {
             ServiceContext serviceContext = (ServiceContext) serviceContecxtes.next();
             try {
-                DependencyManager.destroyServiceClass(serviceContext);
+                DependencyManager.destroyServiceObject(serviceContext);
             } catch (AxisFault axisFault) {
                 log.info(axisFault.getMessage());
             }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java
Tue Jun 27 04:36:19 2006
@@ -33,7 +33,7 @@
  */
 public class ServiceContext extends AbstractContext {
 
-    public static final String SERVICE_CLASS = "serviceClass";
+    public static final String SERVICE_OBJECT = "serviceObject";
     private EndpointReference targetEPR;
     private EndpointReference myEPR;
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/SessionContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/SessionContext.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/SessionContext.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/SessionContext.java
Tue Jun 27 04:36:19 2006
@@ -121,7 +121,7 @@
         while (serviceContecxtes.hasNext()) {
             ServiceContext serviceContext = (ServiceContext) serviceContecxtes.next();
             try {
-                DependencyManager.destroyServiceClass(serviceContext);
+                DependencyManager.destroyServiceObject(serviceContext);
             } catch (AxisFault axisFault) {
                 log.info(axisFault.getMessage());
             }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
Tue Jun 27 04:36:19 2006
@@ -1139,11 +1139,11 @@
             schemaGenerator = new SchemaGenerator(serviceClassLoader,
                     implClass, axisService.getSchematargetNamespace(),
                     axisService.getSchematargetNamespacePrefix());
-            ArrayList excludeOpeartion = new ArrayList();
-            excludeOpeartion.add("init");
-            excludeOpeartion.add("setOperationContext");
-            excludeOpeartion.add("destroy");
-            schemaGenerator.setExcludeMethods(excludeOpeartion);
+            ArrayList excludedMethods = new ArrayList();
+            excludedMethods.add("init");
+            excludedMethods.add("setOperationContext");
+            excludedMethods.add("destroy");
+            schemaGenerator.setExcludeMethods(excludedMethods);
             axisService.addSchema(schemaGenerator.generateSchema());
             axisService.setSchematargetNamespace(schemaGenerator.getSchemaTargetNameSpace());
         } catch (Exception e) {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/DescriptionConstants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/DescriptionConstants.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/DescriptionConstants.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/DescriptionConstants.java
Tue Jun 27 04:36:19 2006
@@ -70,11 +70,6 @@
     public static final String SERVICE_CLASS_NAME = "SERVICE_CLASS_NAME";
 
     /**
-     * Field SERVICE_CLASS
-     */
-    public static final String SERVICE_CLASS = "SERVICE_CLASS";
-
-    /**
      * Field PHASES_KEY
      */
     public static final String PHASES_KEY = "PHASES_KEY";

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java
Tue Jun 27 04:36:19 2006
@@ -90,9 +90,9 @@
         }
     }
 
-    public static void destroyServiceClass(ServiceContext serviceContext) throws AxisFault
{
+    public static void destroyServiceObject(ServiceContext serviceContext) throws AxisFault
{
         try {
-            Object obj = serviceContext.getProperty(ServiceContext.SERVICE_CLASS);
+            Object obj = serviceContext.getProperty(ServiceContext.SERVICE_OBJECT);
             if (obj != null) {
                 Class classToLoad = obj.getClass();
                  // We can not call classToLoad.getDeclaredMethed() , since there

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
Tue Jun 27 04:36:19 2006
@@ -34,7 +34,7 @@
 
 public abstract class AbstractMessageReceiver implements MessageReceiver {
     public static final String SERVICE_CLASS = "ServiceClass";
-    public static final String SERVICE_OBJECT = "ServiceObject";
+    public static final String SERVICE_OBJECT_SUPPLIER = "ServiceObjectSupplier";
     public static final String SCOPE = "scope";
 
     /**
@@ -49,24 +49,30 @@
             AxisService service =
                     msgContext.getOperationContext().getServiceContext().getAxisService();
             ClassLoader classLoader = service.getClassLoader();
+
             // allow alternative definition of makeNewServiceObject
-            if (service.getParameter(SERVICE_OBJECT) != null) {
-               Parameter serviceObjectParam = service.getParameter(SERVICE_OBJECT);
-               Class serviceObjectMaker = Class.forName(((String) 
+            if (service.getParameter(SERVICE_OBJECT_SUPPLIER) != null) {
+                Parameter serviceObjectParam =
+                        service.getParameter(SERVICE_OBJECT_SUPPLIER);
+                Class serviceObjectMaker = Class.forName(((String)
                         serviceObjectParam.getValue()).trim(), true, classLoader);
-               Method method = serviceObjectMaker.getMethod("makeNewServiceObject",
-                        new Class[] { MessageContext.class });
-               return method.invoke(serviceObjectMaker.newInstance(), new Object[] { msgContext
});
+
+                // Find static getServiceObject() method, call it if there   
+                Method method = serviceObjectMaker.
+                        getMethod("getServiceObject",
+                                  new Class[] { MessageContext.class });
+                if (method != null)
+                    return method.invoke(null, new Object[] { msgContext });
             }
-            Parameter implInfoParam = service.getParameter(SERVICE_CLASS);
 
+            Parameter implInfoParam = service.getParameter(SERVICE_CLASS);
             if (implInfoParam != null) {
                 Class implClass = Class.forName(((String) implInfoParam.getValue()).trim(),
true,
                         classLoader);
 
                 return implClass.newInstance();
             } else {
-                throw new AxisFault(Messages.getMessage("paramIsNotSpecified", "SERVICE_CLASS"));
+                throw new AxisFault(Messages.getMessage("paramIsNotSpecified", "SERVICE_OBJECT_SUPPLIER"));
             }
         } catch (Exception e) {
             throw AxisFault.makeFault(e);
@@ -93,7 +99,7 @@
      */
     protected Object getTheImplementationObject(MessageContext msgContext) throws AxisFault
{
         ServiceContext serviceContext = msgContext.getOperationContext().getServiceContext();
-        Object serviceimpl = serviceContext.getProperty(ServiceContext.SERVICE_CLASS);
+        Object serviceimpl = serviceContext.getProperty(ServiceContext.SERVICE_OBJECT);
         if (serviceimpl != null) {
             // since service impl is there in service context , take that from there
             return serviceimpl;
@@ -103,7 +109,7 @@
             //Service initialization
             DependencyManager.initServiceClass(serviceimpl,
                     msgContext.getServiceContext());
-            serviceContext.setProperty(ServiceContext.SERVICE_CLASS, serviceimpl);
+            serviceContext.setProperty(ServiceContext.SERVICE_OBJECT, serviceimpl);
             return serviceimpl;
         }
     }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/server/SessionManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/server/SessionManager.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/server/SessionManager.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/http/server/SessionManager.java
Tue Jun 27 04:36:19 2006
@@ -92,7 +92,7 @@
         for (Iterator it = serviceGroupContext.getServiceContexts(); it.hasNext(); ) {
             ServiceContext serviceContext = (ServiceContext) it.next();
             try {
-                DependencyManager.destroyServiceClass(serviceContext);
+                DependencyManager.destroyServiceObject(serviceContext);
             } catch (AxisFault axisFault) {
                 LOG.info(axisFault.getMessage());
             }

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLUtils.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/Java2WSDLUtils.java
Tue Jun 27 04:36:19 2006
@@ -93,7 +93,7 @@
         return namespaceFromPackageName(name);
     }
 
-    public static String getPacakgeName(String className, ClassLoader classLoader) throws
Exception {
+    public static String getPackageName(String className, ClassLoader classLoader) throws
Exception {
         Class clazz = Class.forName(className, true, classLoader);
         Package pkg = clazz.getPackage();
         String name;

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java?rev=417431&r1=417430&r2=417431&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
Tue Jun 27 04:36:19 2006
@@ -83,7 +83,7 @@
         } else {
             this.schema_namespace_prefix = SCHEMA_NAMESPACE_PRFIX;
         }
-        XmlSchema xmlSchema = getXmlSchema(Java2WSDLUtils.getPacakgeName(className,loader),
schemaTargetNameSpace, schema_namespace_prefix);
+        XmlSchema xmlSchema = getXmlSchema(Java2WSDLUtils.getPackageName(className,loader),
schemaTargetNameSpace, schema_namespace_prefix);
         xmlSchema.getPrefixToNamespaceMap().put(DEFAULT_SCHEMA_NAMESPACE_PREFIX,
                 URI_2001_SCHEMA_XSD);
     }
@@ -223,7 +223,7 @@
     private void generateWrapperElementforMethod(JMethod method) throws Exception {
         //since the wrapper elements are generated for the methods of the service interface
         //we get the schema that corresponds to the package of the service interface classname
-        XmlSchema xmlSchema = getXmlSchema(Java2WSDLUtils.getPacakgeName(className,classLoader),
+        XmlSchema xmlSchema = getXmlSchema(Java2WSDLUtils.getPackageName(className,classLoader),
                 schemaTargetNameSpace,
                 schema_namespace_prefix);
         String methodName = method.getSimpleName();
@@ -305,7 +305,7 @@
                                               String methodName) throws Exception {
         //since the wrapper elements are generated for the methods of the service interface
         //we get the schema that corresponds to the package of the service interface classname
-        XmlSchema xmlSchema = getXmlSchema(Java2WSDLUtils.getPacakgeName(className,classLoader),
+        XmlSchema xmlSchema = getXmlSchema(Java2WSDLUtils.getPackageName(className,classLoader),
                 schemaTargetNameSpace,
                 schema_namespace_prefix);
         if (!retuenType.isVoidType()) {



---------------------------------------------------------------------
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