ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r365942 - in /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment: DescriptionBuilder.java ServiceBuilder.java
Date Wed, 04 Jan 2006 16:52:17 GMT
Author: dims
Date: Wed Jan  4 08:52:14 2006
New Revision: 365942

URL: http://svn.apache.org/viewcvs?rev=365942&view=rev
Log:
load the message receiver using the service's class loader

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java?rev=365942&r1=365941&r2=365942&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
Wed Jan  4 08:52:14 2006
@@ -121,10 +121,28 @@
         return mr_mep;
     }
 
-    protected MessageReceiver loadMessageReceiver(ClassLoader loader, OMElement reciverElement)
+    /**
+     * Processes default message receivers specified either in axis2.xml or services.xml.
+     *
+     * @param element
+     */
+    protected HashMap processMessageReceivers(ClassLoader loader, OMElement element) throws
DeploymentException {
+        HashMap meps = new HashMap();
+        Iterator iterator = element.getChildrenWithName(new QName(TAG_MESSAGE_RECEIVER));
+        while (iterator.hasNext()) {
+            OMElement receiverElement = (OMElement) iterator.next();
+            MessageReceiver receiver =
+                    loadMessageReceiver(loader, receiverElement);
+            OMAttribute mepAtt = receiverElement.getAttribute(new QName(TAG_MEP));
+            meps.put(mepAtt.getAttributeValue(), receiver);
+        }
+        return meps;
+    }
+
+    protected MessageReceiver loadMessageReceiver(ClassLoader loader, OMElement element)
             throws DeploymentException {
-        OMAttribute recieverName = reciverElement.getAttribute(new QName(TAG_CLASS_NAME));
-        String className = recieverName.getAttributeValue();
+        OMAttribute receiverName = element.getAttribute(new QName(TAG_CLASS_NAME));
+        String className = receiverName.getAttributeValue();
         MessageReceiver receiver = null;
 
         try {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=365942&r1=365941&r2=365942&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
Wed Jan  4 08:52:14 2006
@@ -123,7 +123,7 @@
             OMElement messageReceiver = service_element.getFirstChildWithName(
                     new QName(TAG_MESSAGE_RECEIVERS));
             if (messageReceiver != null) {
-                HashMap mrs = processMessageReceivers(messageReceiver);
+                HashMap mrs = processMessageReceivers(service.getClassLoader(), messageReceiver);
                 Iterator keys = mrs.keySet().iterator();
                 while (keys.hasNext()) {
                     String key = (String) keys.next();



Mime
View raw message