axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject svn commit: r373098 - in /webservices/axis2/trunk/java/modules: codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl core/src/org/apache/axis2/engine/DependencyManager.java
Date Sat, 28 Jan 2006 07:30:54 GMT
Author: ajith
Date: Fri Jan 27 23:30:34 2006
New Revision: 373098

URL: http://svn.apache.org/viewcvs?rev=373098&view=rev
Log:
Fixed a minor issue in the message receiver for in-only operation

Modified:
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl?rev=373098&r1=373097&r2=373098&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/template/java/MessageReceiverTemplate.xsl
Fri Jan 27 23:30:34 2006
@@ -154,16 +154,16 @@
         try {
 
         // get the implementation class for the Web Service
-        Object obj = getTheImplementationObject(msgContext);
+        Object obj = getTheImplementationObject(inMessage);
 
         //Inject the Message Context if it is asked for
-        org.apache.axis2.engine.DependencyManager.configureBusinessLogicProvider(obj, msgContext,
newMsgContext);
+        org.apache.axis2.engine.DependencyManager.configureBusinessLogicProvider(obj, inMessage);
 
         <xsl:value-of select="$skeletonname"/> skel = (<xsl:value-of select="$skeletonname"/>)obj;
         //Out Envelop
         org.apache.axis2.soap.SOAPEnvelope envelope = null;
         //Find the axisOperation that has been set by the Dispatch phase.
-        org.apache.axis2.description.AxisOperation op = msgContext.getOperationContext().getAxisOperation();
+        org.apache.axis2.description.AxisOperation op = inMessage.getOperationContext().getAxisOperation();
         if (op == null) {
         throw new org.apache.axis2.AxisFault("Operation is not located, if this is doclit
style the SOAP-ACTION should specified via the SOAP Action to use the RawXMLProvider");
         }
@@ -192,7 +192,7 @@
                     <xsl:choose>
                         <xsl:when test="$paramCount &gt; 0"> skel.<xsl:value-of
select="@name"/>(
                             <xsl:for-each select="input/param[@location='body']">
-                                <xsl:if test="@type!=''">(<xsl:value-of select="@type"/>)fromOM(msgContext.getEnvelope().getBody().getFirstElement(),
<xsl:value-of select="@type"/>.class)<xsl:if test="position() &gt; 1">,</xsl:if></xsl:if>
+                                <xsl:if test="@type!=''">(<xsl:value-of select="@type"/>)fromOM(inMessage.getEnvelope().getBody().getFirstElement(),
<xsl:value-of select="@type"/>.class)<xsl:if test="position() &gt; 1">,</xsl:if></xsl:if>
                             </xsl:for-each>);
                         </xsl:when>
                         <xsl:otherwise>skel.<xsl:value-of select="@name"/>();</xsl:otherwise>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/DependencyManager.java?rev=373098&r1=373097&r2=373098&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
Fri Jan 27 23:30:34 2006
@@ -59,4 +59,28 @@
             throw new AxisFault(e);
         }
     }
+
+     public static void configureBusinessLogicProvider(Object obj, MessageContext requestMsgCtx
)
+            throws AxisFault {
+        try {
+            Class classToLoad = obj.getClass();
+            Method[] methods = classToLoad.getMethods();
+
+            for (int i = 0; i < methods.length; i++) {
+                if (MESSAGE_CONTEXT_INJECTION_METHOD.equals(methods[i].getName())
+                        && (methods[i].getParameterTypes().length == 1)
+                        && (methods[i].getParameterTypes()[0] == MessageContext.class))
{
+                    methods[i].invoke(obj, new Object[]{requestMsgCtx});
+                } 
+            }
+        } catch (SecurityException e) {
+            throw new AxisFault(e);
+        } catch (IllegalArgumentException e) {
+            throw new AxisFault(e);
+        } catch (IllegalAccessException e) {
+            throw new AxisFault(e);
+        } catch (InvocationTargetException e) {
+            throw new AxisFault(e);
+        }
+    }
 }



Mime
View raw message