axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r384115 - in /webservices/axis2/trunk/java/modules: adb/src/org/apache/axis2/databinding/utils/ core/conf/ core/src/org/apache/axis2/client/ core/src/org/apache/axis2/context/ core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/...
Date Wed, 08 Mar 2006 04:24:12 GMT
Author: deepal
Date: Tue Mar  7 20:24:10 2006
New Revision: 384115

URL: http://svn.apache.org/viewcvs?rev=384115&view=rev
Log:
- Sending and recieving any type of array (RPCServiceClient and RPCMessageReceiver)
- Moving service creation code into AxisService
- Store ServiceInstance as property
- Add a generic phase after dispatch phase

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
    webservices/axis2/trunk/java/modules/core/conf/axis2.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.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/ClientUtils.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/module1/META-INF/module.xml
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml
    webservices/axis2/trunk/java/modules/core/test-resources/deployment/serviceModule/META-INF/module.xml
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Tue Mar  7 20:24:10 2006
@@ -314,11 +314,10 @@
         //to handle multirefs
         //have to check the instanceof
         MultirefHelper helper = new MultirefHelper((OMElement) response.getParent());
-        boolean hasRef = false;
         //to support array . if the parameter type is array , then all the omelemnts with that paramtre name
         // has to  get and add to the list
         Class classType;
-        String currentLocalName = "";
+        String currentLocalName;
         while (parts.hasNext() && count < length) {
             Object objValue = parts.next();
             OMElement omElement;
@@ -332,42 +331,7 @@
             if (classType.isArray()) {
                 ArrayList valueList = new ArrayList();
                 Class arrayClassType = classType.getComponentType();
-
-                OMAttribute omatribute = MultirefHelper.processRefAtt(omElement);
-                String ref = null;
-                if (omatribute != null) {
-                    hasRef = true;
-                    ref = MultirefHelper.getAttvalue(omatribute);
-                }
-
-                if (OMElement.class.isAssignableFrom(arrayClassType)) {
-                    if (hasRef) {
-                        OMElement elemnt = helper.getOMElement(ref);
-                        if (elemnt == null) {
-                            valueList.add(helper.processOMElementRef(ref));
-                        } else {
-                            valueList.add(omElement);
-                        }
-                    } else
-                        valueList.add(omElement);
-                } else {
-                    if (hasRef) {
-                        if (helper.getObject(ref) != null) {
-                            valueList.add(helper.getObject(ref));
-                        } else {
-                            valueList.add(helper.processRef(classType, ref));
-                        }
-                    } else {
-                        if (SimpleTypeMapper.isSimpleType(arrayClassType)) {
-                            valueList.add(SimpleTypeMapper.getSimpleTypeObject(arrayClassType, omElement));
-                        } else if (SimpleTypeMapper.isArrayList(arrayClassType)) {
-                            valueList.add(SimpleTypeMapper.getArrayList(omElement));
-                        } else {
-                            valueList.add(BeanUtil.deserialize(arrayClassType, omElement));
-                        }
-                    }
-                }
-
+                valueList.add(processObject(omElement, arrayClassType, helper));
                 while (parts.hasNext()) {
                     objValue = parts.next();
                     if (objValue instanceof OMElement) {
@@ -375,85 +339,18 @@
                     } else {
                         continue;
                     }
-
                     if (!currentLocalName.equals(omElement.getLocalName())) {
                         break;
                     }
-                    omatribute = MultirefHelper.processRefAtt(omElement);
-                    ref = null;
-                    if (omatribute != null) {
-                        hasRef = true;
-                        ref = MultirefHelper.getAttvalue(omatribute);
-                    }
-
-                    if (OMElement.class.isAssignableFrom(arrayClassType)) {
-                        if (hasRef) {
-                            OMElement elemnt = helper.getOMElement(ref);
-                            if (elemnt == null) {
-                                valueList.add(helper.processOMElementRef(ref));
-                            } else {
-                                valueList.add(omElement);
-                            }
-                        } else
-                            valueList.add(omElement);
-                    } else {
-                        if (hasRef) {
-                            if (helper.getObject(ref) != null) {
-                                valueList.add(helper.getObject(ref));
-                            } else {
-                                valueList.add(helper.processRef(classType, ref));
-                            }
-                        } else {
-                            if (SimpleTypeMapper.isSimpleType(arrayClassType)) {
-                                valueList.add(SimpleTypeMapper.getSimpleTypeObject(arrayClassType, omElement));
-                            } else if (SimpleTypeMapper.isArrayList(arrayClassType)) {
-                                valueList.add(SimpleTypeMapper.getArrayList(omElement));
-                            } else {
-                                valueList.add(BeanUtil.deserialize(arrayClassType, omElement));
-                            }
-                        }
-                    }
-
+                    valueList.add(processObject(omElement, arrayClassType,
+                            helper));
                 }
-                retObjs[count] = ConverterUtil.convertToArray(arrayClassType, valueList);
+                retObjs[count] = ConverterUtil.convertToArray(arrayClassType,
+                        valueList);
             } else {
                 //handling refs
-                OMAttribute omatribute = MultirefHelper.processRefAtt(omElement);
-                String ref = null;
-                if (omatribute != null) {
-                    hasRef = true;
-                    ref = MultirefHelper.getAttvalue(omatribute);
-                }
-
-                if (OMElement.class.isAssignableFrom(classType)) {
-                    if (hasRef) {
-                        OMElement elemnt = helper.getOMElement(ref);
-                        if (elemnt == null) {
-                            retObjs[count] = helper.processOMElementRef(ref);
-                        } else {
-                            retObjs[count] = omElement;
-                        }
-                    } else
-                        retObjs[count] = omElement;
-                } else {
-                    if (hasRef) {
-                        if (helper.getObject(ref) != null) {
-                            retObjs[count] = helper.getObject(ref);
-                        } else {
-                            retObjs[count] = helper.processRef(classType, ref);
-                        }
-                    } else {
-                        if (SimpleTypeMapper.isSimpleType(classType)) {
-                            retObjs[count] = SimpleTypeMapper.getSimpleTypeObject(classType, omElement);
-                        } else if (SimpleTypeMapper.isArrayList(classType)) {
-                            retObjs[count] = SimpleTypeMapper.getArrayList(omElement);
-                        } else {
-                            retObjs[count] = BeanUtil.deserialize(classType, omElement);
-                        }
-                    }
-                }
+                retObjs[count] = processObject(omElement, classType, helper);
             }
-            hasRef = false;
             count ++;
         }
 
@@ -461,6 +358,45 @@
         return retObjs;
     }
 
+    public static Object processObject(OMElement omElement,
+                                       Class classType,
+                                       MultirefHelper helper) throws AxisFault {
+        boolean hasRef = false;
+        OMAttribute omatribute = MultirefHelper.processRefAtt(omElement);
+        String ref = null;
+        if (omatribute != null) {
+            hasRef = true;
+            ref = MultirefHelper.getAttvalue(omatribute);
+        }
+        if (OMElement.class.isAssignableFrom(classType)) {
+            if (hasRef) {
+                OMElement elemnt = helper.getOMElement(ref);
+                if (elemnt == null) {
+                    return helper.processOMElementRef(ref);
+                } else {
+                    return omElement;
+                }
+            } else
+                return omElement;
+        } else {
+            if (hasRef) {
+                if (helper.getObject(ref) != null) {
+                    return helper.getObject(ref);
+                } else {
+                    return helper.processRef(classType, ref);
+                }
+            } else {
+                if (SimpleTypeMapper.isSimpleType(classType)) {
+                    return SimpleTypeMapper.getSimpleTypeObject(classType, omElement);
+                } else if (SimpleTypeMapper.isArrayList(classType)) {
+                    return SimpleTypeMapper.getArrayList(omElement);
+                } else {
+                    return BeanUtil.deserialize(classType, omElement);
+                }
+            }
+        }
+    }
+
     public static OMElement getOMElement(QName opName, Object [] args, String partName) {
         ArrayList objects;
         objects = new ArrayList();
@@ -473,36 +409,64 @@
             //todo if the request parameter has name other than argi (0<i<n) , there should be a
             //way to do that , to solve that problem we need to have RPCRequestParameter
             //note that The value of request parameter can either be simple type or JavaBean
-            if (SimpleTypeMapper.isSimpleType(arg)) {
-                if (partName == null) {
-                    objects.add("arg" + argCount);
-                } else {
-                    objects.add(partName);
+            if (arg instanceof Object[]) {
+                Object array [] = (Object[]) arg;
+                for (int j = 0; j < array.length; j++) {
+                    Object o = array[j];
+                    if (SimpleTypeMapper.isSimpleType(o)) {
+                        objects.add("item" + argCount);
+                        objects.add(o.toString());
+                    } else {
+                        objects.add(new QName("item" + argCount));
+                        if (o instanceof OMElement) {
+                            OMFactory fac = OMAbstractFactory.getOMFactory();
+                            OMElement wrappingElement;
+                            if (partName == null) {
+                                wrappingElement = fac.createOMElement("item" + argCount, null);
+                                wrappingElement.addChild((OMElement) o);
+                            } else {
+                                wrappingElement = fac.createOMElement(partName, null);
+                                wrappingElement.addChild((OMElement) o);
+                            }
+                            objects.add(wrappingElement);
+                        } else {
+                            objects.add(o);
+                        }
+                    }
                 }
-                objects.add(arg.toString());
             } else {
-                if (partName == null) {
-                    objects.add(new QName("arg" + argCount));
-                } else {
-                    objects.add(new QName(partName));
-                }
-                if (arg instanceof OMElement) {
-                    OMFactory fac = OMAbstractFactory.getOMFactory();
-                    OMElement wrappingElement;
+                if (SimpleTypeMapper.isSimpleType(arg)) {
                     if (partName == null) {
-                        wrappingElement = fac.createOMElement("arg" + argCount, null);
-                        wrappingElement.addChild((OMElement) arg);
+                        objects.add("arg" + argCount);
                     } else {
-                        wrappingElement = fac.createOMElement(partName, null);
-                        wrappingElement.addChild((OMElement) arg);
+                        objects.add(partName);
                     }
-                    objects.add(wrappingElement);
+                    objects.add(arg.toString());
                 } else {
-                    objects.add(arg);
+                    if (partName == null) {
+                        objects.add(new QName("arg" + argCount));
+                    } else {
+                        objects.add(new QName(partName));
+                    }
+                    if (arg instanceof OMElement) {
+                        OMFactory fac = OMAbstractFactory.getOMFactory();
+                        OMElement wrappingElement;
+                        if (partName == null) {
+                            wrappingElement = fac.createOMElement("arg" + argCount, null);
+                            wrappingElement.addChild((OMElement) arg);
+                        } else {
+                            wrappingElement = fac.createOMElement(partName, null);
+                            wrappingElement.addChild((OMElement) arg);
+                        }
+                        objects.add(wrappingElement);
+                    } else {
+                        objects.add(arg);
+                    }
                 }
             }
             argCount ++;
         }
+
         XMLStreamReader xr = ADBPullParser.createPullParser(opName, objects.toArray(), null);
         StAXOMBuilder stAXOMBuilder =
                 OMXMLBuilderFactory.createStAXOMBuilder(

Modified: webservices/axis2/trunk/java/modules/core/conf/axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/conf/axis2.xml?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/conf/axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/core/conf/axis2.xml Tue Mar  7 20:24:10 2006
@@ -12,14 +12,6 @@
     <parameter name="userName" locked="false">admin</parameter>
     <parameter name="password" locked="false">axis2</parameter>
 
-    <parameter name="seralizeLocation" locked="false">.</parameter>
-
-    <!--if you want to extract the service archive file and work with that please uncomment this-->
-    <!--else , it wont extract archive file or does not take into consideration if someone drop-->
-    <!--exploded directory into /service directory-->
-    <!--<parameter name="extractServiceArchive" locked="false">true</parameter>-->
-
-
     <!--    The way of adding listener to the system-->
     <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
     <!--        <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
@@ -45,25 +37,26 @@
         <parameter name="port" locked="false">6060</parameter>
     </transportReceiver>
 
-    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
-    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
-          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>
-          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>
-          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>
-          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>
-          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>
-      </transportReceiver> -->
+    <!--Uncomment if you want to have SMTP transport support-->
+ <!--<transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">-->
+       <!--<parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>-->
+       <!--<parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>-->
+       <!--<parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>-->
+       <!--<parameter name="transport.mail.pop3.port" locked="false">110</parameter>-->
+       <!--<parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>-->
+   <!--</transportReceiver>-->
 
     <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
         <parameter name="port" locked="false">6060</parameter>
     </transportReceiver>
 
-    <transportReceiver name="jms" class="org.apache.axis2.transport.jms.SimpleJMSListener">
-        <parameter name="transport.jms.Destination" locked="false">dynamicQueues/FOO</parameter>
-        <parameter name="java.naming.factory.initial" locked="false">
-            org.activemq.jndi.ActiveMQInitialContextFactory</parameter>
-        <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
-    </transportReceiver>
+    <!--Uncomment this if you want JMS transport support-->
+    <!--<transportReceiver name="jms" class="org.apache.axis2.transport.jms.SimpleJMSListener">-->
+        <!--<parameter name="transport.jms.Destination" locked="false">dynamicQueues/FOO</parameter>-->
+        <!--<parameter name="java.naming.factory.initial" locked="false">-->
+            <!--org.activemq.jndi.ActiveMQInitialContextFactory</parameter>-->
+        <!--<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>-->
+    <!--</transportReceiver>-->
 
     <!-- ================================================= -->
     <!-- Transport Outs -->
@@ -97,7 +90,6 @@
     <!-- Comment this to disable Addressing -->
     <module ref="addressing"/>
 
-
     <!--Configuring module , providing parameters for modules whether they refer or not-->
     <!--<moduleConfig name="addressing">-->
     <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
@@ -137,11 +129,11 @@
         </phase>
         <!--  System pre defined phases       -->
         <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
-        <phase name="userphase1"/>
+        <phase name="OperationInPhase"/>
     </phaseOrder>
     <phaseOrder type="outflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutPhase"/>
         <!--system predefined phase-->
         <!--these phase will run irrespective of the service-->
         <phase name="PolicyDetermination"/>
@@ -149,11 +141,11 @@
     </phaseOrder>
     <phaseOrder type="INfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationFaultInPhase"/>
     </phaseOrder>
     <phaseOrder type="Outfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutPhase"/>
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
     </phaseOrder>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/client/ServiceClient.java?rev=384115&r1=384114&r2=384115&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 Mar  7 20:24:10 2006
@@ -159,7 +159,7 @@
         initializeTransports(configContext);
         try {
             this.axisConfig = this.configContext.getAxisConfiguration();
-            axisService = ClientUtils.creatAxisService(wsdlURL,
+            axisService = AxisService.createClientSideAxisService(wsdlURL,
                     wsdlServiceName, portName, options);
             // add the service to the config context if it isn't in there
             // already

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/ServiceContext.java?rev=384115&r1=384114&r2=384115&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 Mar  7 20:24:10 2006
@@ -31,6 +31,7 @@
  */
 public class ServiceContext extends AbstractContext {
 
+    public static final String SERVICE_CLASS = "serviceClass";
     private EndpointReference targetEPR;
     private EndpointReference myEPR;
 
@@ -38,9 +39,6 @@
     private String serviceInstanceID;
     private ServiceGroupContext serviceGroupContext;
 
-    //to store service implementation class , to handler session
-    private Object serviceImpl;
-
     public ServiceContext(AxisService serviceConfig, ServiceGroupContext serviceGroupContext) {
         super(serviceGroupContext);
         this.serviceGroupContext = serviceGroupContext;
@@ -80,14 +78,6 @@
 
         // todo we do not need this , this ID should equal to serviceName
         this.serviceInstanceID = serviceInstanceID;
-    }
-
-    public Object getServiceImpl() {
-        return serviceImpl;
-    }
-
-    public void setServiceImpl(Object serviceImpl) {
-        this.serviceImpl = serviceImpl;
     }
 
     public ServiceGroupContext getServiceGroupContext() {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/axis2_default.xml Tue Mar  7 20:24:10 2006
@@ -12,19 +12,6 @@
     <parameter name="userName" locked="false">admin</parameter>
     <parameter name="password" locked="false">axis2</parameter>
 
-    <parameter name="seralizeLocation" locked="false">.</parameter>
-
-    <!--if you want to extract the service archive file and work with that please uncomment this-->
-    <!--else , it wont extract archive file or does not take into consideration if someone drop-->
-    <!--exploded directory into /service directory-->
-    <!--<parameter name="extractServiceArchive" locked="false">true</parameter>-->
-
-
-    <!--    The way of adding listener to the system-->
-    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
-    <!--        <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
-    <!--    </listener>-->
-
     <!-- ================================================= -->
     <!-- Message Receivers -->
     <!-- ================================================= -->
@@ -41,29 +28,15 @@
     <!-- ================================================= -->
     <!-- Transport Ins -->
     <!-- ================================================= -->
-    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
         <parameter name="port" locked="false">6060</parameter>
     </transportReceiver>
 
-    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
-    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
-          <parameter name="transport.mail.pop3.host" locked="false">127.0.0.1</parameter>
-          <parameter name="transport.mail.pop3.user" locked="false">axis2</parameter>
-          <parameter name="transport.mail.pop3.password" locked="false">axis2</parameter>
-          <parameter name="transport.mail.pop3.port" locked="false">110</parameter>
-          <parameter name="transport.mail.replyToAddress" locked="false">axis2@127.0.0.1</parameter>
-      </transportReceiver> -->
-
-    <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
+    <transportReceiver name="tcp"  class="org.apache.axis2.transport.tcp.TCPServer">
         <parameter name="port" locked="false">6061</parameter>
     </transportReceiver>
 
-    <!-- <transportReceiver name="jms" class="org.apache.axis2.transport.jms.SimpleJMSListener">
-        <parameter name="transport.jms.Destination" locked="false">dynamicQueues/FOO</parameter>
-        <parameter name="java.naming.factory.initial" locked="false">org.activemq.jndi.ActiveMQInitialContextFactory</parameter>
-        <parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>
-    </transportReceiver> -->
-
     <!-- ================================================= -->
     <!-- Transport Outs -->
     <!-- ================================================= -->
@@ -75,33 +48,11 @@
         <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
         <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
     </transportSender>
-    <transportSender name="https"
-                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+    <transportSender name="https" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
         <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
         <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
     </transportSender>
 
-    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
-   <transportSender name="mailto" class="org.apache.axis2.transport.mail.MailTransportSender">
-       <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>
-       <parameter name="transport.mail.smtp.user" locked="false">axis2</parameter>
-       <parameter name="transport.mail.smtp.password" locked="false">axis2</parameter>
-       <parameter name="transport.mail.smtp.port" locked="false">25</parameter>
-   </transportSender>
-   -->
-
-    <!-- ================================================= -->
-    <!-- Global Modules  -->
-    <!-- ================================================= -->
-    <!-- Comment this to disable Addressing -->
-    <!--<module ref="addressing"/>-->
-
-
-    <!--Configuring module , providing parameters for modules whether they refer or not-->
-    <!--<moduleConfig name="addressing">-->
-    <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
-    <!--</moduleConfig>-->
-
     <!-- ================================================= -->
     <!-- Phases  -->
     <!-- ================================================= -->
@@ -129,7 +80,6 @@
                      class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
-
             <handler name="InstanceDispatcher"
                      class="org.apache.axis2.engine.InstanceDispatcher">
                 <order phase="PostDispatch"/>
@@ -137,11 +87,11 @@
         </phase>
         <!--  System pre defined phases       -->
         <!--   After Postdispatch phase module author or or service author can add any phase he want      -->
-        <phase name="userphase1"/>
+        <phase name="OperationInPhase"/>
     </phaseOrder>
     <phaseOrder type="outflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutPhase"/>
         <!--system predefined phase-->
         <!--these phase will run irrespective of the service-->
         <phase name="PolicyDetermination"/>
@@ -149,11 +99,11 @@
     </phaseOrder>
     <phaseOrder type="INfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationInFaultPhase"/>
     </phaseOrder>
     <phaseOrder type="Outfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutFaultPhase"/>
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
     </phaseOrder>

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/Utils.java Tue Mar  7 20:24:10 2006
@@ -202,96 +202,7 @@
         }
     }
 
-    /**
-     * To create an AxisService using given service impl class name
-     * fisrt generate schema corresponding to the given java class , next for each methods AxisOperation
-     * will be created.
-     * <p/>
-     * Note : Inorder to work this properly RPCMessageReceiver should be availble in the class path
-     * otherewise operation can not continue
-     *
-     * @param implClass
-     * @param axisConfig
-     * @return return created AxisSrevice
-     */
-    public static AxisService createService(String implClass,
-                                            AxisConfiguration axisConfig, Class messageReceiverClass) throws AxisFault {
-        Parameter parameter = new Parameter(Constants.SERVICE_CLASS, implClass);
-        OMElement paraElement = getParameter(Constants.SERVICE_CLASS, implClass, false);
-        parameter.setParameterElement(paraElement);
-        AxisService axisService = new AxisService();
-        axisService.setUseDefaultChains(false);
-        axisService.addParameter(parameter);
-
-        int index = implClass.lastIndexOf(".");
-        String serviceName;
-        if (index > 0) {
-            serviceName = implClass.substring(index + 1, implClass.length());
-        } else {
-            serviceName = implClass;
-        }
-
-        axisService.setName(serviceName);
-        axisService.setClassLoader(axisConfig.getServiceClassLoader());
-
-        ClassLoader serviceClassLoader = axisService.getClassLoader();
-        SchemaGenerator schemaGenerator = new SchemaGenerator(serviceClassLoader,
-                implClass, axisService.getSchematargetNamespace(),
-                axisService.getSchematargetNamespacePrefix());
-        try {
-            axisService.setSchema(schemaGenerator.generateSchema());
-        } catch (Exception e) {
-            throw new AxisFault(e);
-        }
-
-        JMethod [] method = schemaGenerator.getMethods();
-        TypeTable table = schemaGenerator.getTypeTable();
-
-        PhasesInfo pinfo = axisConfig.getPhasesInfo();
-
-        for (int i = 0; i < method.length; i++) {
-            JMethod jmethod = method[i];
-            if (!jmethod.isPublic()) {
-                // no need to expose , private and protected methods
-                continue;
-            } else if ("init".equals(jmethod.getSimpleName())) {
-                continue;
-            }
-            AxisOperation operation = getAxisOperationforJmethod(jmethod, table);
-
-            // loading message recivers
-            try {
-                MessageReceiver messageReceiver = (MessageReceiver) messageReceiverClass.newInstance();
-                operation.setMessageReceiver(messageReceiver);
-            } catch (IllegalAccessException e) {
-                throw new AxisFault("IllegalAccessException occured during message receiver loading"
-                        + e.getMessage());
-            } catch (InstantiationException e) {
-                throw new AxisFault("InstantiationException occured during message receiver loading"
-                        + e.getMessage());
-            }
-            pinfo.setOperationPhases(operation);
-            axisService.addOperation(operation);
-        }
-        return axisService;
-
-    }
-
-    public static AxisService createService(String implClass,
-                                            AxisConfiguration axisConfig) throws AxisFault {
-        Class clazz;
-        try {
-            clazz = Class.forName("org.apache.axis2.rpc.receivers.RPCMessageReceiver");
-        } catch (ClassNotFoundException e) {
-            throw new AxisFault("ClassNotFoundException occured during message receiver loading"
-                    + e.getMessage());
-        }
-
-        return createService(implClass, axisConfig, clazz);
-
-    }
-
-    private static AxisOperation getAxisOperationforJmethod(JMethod jmethod,
+    public static AxisOperation getAxisOperationforJmethod(JMethod jmethod,
                                                             TypeTable table) throws AxisFault {
         AxisOperation operation;
         String opName = jmethod.getSimpleName();

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/AxisService.java?rev=384115&r1=384114&r2=384115&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 Mar  7 20:24:10 2006
@@ -21,6 +21,10 @@
 import com.ibm.wsdl.extensions.soap.*;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
+import org.apache.axis2.addressing.EndpointReference;
+import org.apache.axis2.client.Options;
+import org.apache.axis2.deployment.util.PhasesInfo;
+import org.apache.axis2.deployment.util.Utils;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.i18n.Messages;
@@ -28,21 +32,33 @@
 import org.apache.axis2.phaseresolver.PhaseResolver;
 import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.util.PolicyUtil;
+import org.apache.axis2.util.XMLUtils;
 import org.apache.axis2.wsdl.builder.SchemaGenerator;
+import org.apache.axis2.wsdl.builder.TypeTable;
 import org.apache.axis2.wsdl.writer.WOMWriter;
 import org.apache.axis2.wsdl.writer.WOMWriterFactory;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.apache.ws.commons.om.OMElement;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.wsdl.WSDLConstants;
 import org.apache.wsdl.WSDLDescription;
+import org.codehaus.jam.JMethod;
+import org.w3c.dom.Document;
+import org.xml.sax.SAXException;
 
 import javax.wsdl.*;
 import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.extensions.soap.SOAPOperation;
 import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.IOException;
+import java.io.InputStream;
 import java.io.OutputStream;
+import java.net.URL;
 import java.util.*;
 
 /**
@@ -339,7 +355,7 @@
         AxisOperation axisOperation = getOperation(new QName(operationName));
         if (axisOperation == null) {
             throw new AxisFault(Messages.getMessage("invalidoperation",
-              operationName));
+                    operationName));
         }
         PolicyUtil.writePolicy(axisOperation.getPolicyInclude(), out);
     }
@@ -840,5 +856,216 @@
             }
         }
         return false;
+    }
+
+    //#######################################################################################
+    //                    APIs to create AxisService
+
+    //
+
+    /**
+     * To create a AxisService for a given WSDL and the created client is most suitable for clinet side
+     * invocation not for server side invocation. Since all the soap acction and wsa action is added to
+     * operations
+     *
+     * @param wsdlURL         location of the WSDL
+     * @param wsdlServiceName name of the service to be invoke , if it is null then the first one will
+     *                        be selected if there are more than one
+     * @param portName        name of the port , if there are more than one , if it is null then the
+     *                        first one in the  iterator will be selected
+     * @param options         Service client options, to set the target EPR
+     * @return AxisService , the created servie will be return
+     */
+    public static AxisService createClientSideAxisService(URL wsdlURL,
+                                                          QName wsdlServiceName,
+                                                          String portName,
+                                                          Options options) throws AxisFault {
+        AxisService axisService;
+        try {
+            InputStream in = wsdlURL.openConnection().getInputStream();
+            Document doc = XMLUtils.newDocument(in);
+            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
+            reader.setFeature("javax.wsdl.importDocuments", true);
+            Definition wsdlDefinition = reader.readWSDL(null, doc);
+            axisService = new AxisService();
+
+            Service wsdlService;
+            if (wsdlServiceName != null) {
+                wsdlService = wsdlDefinition.getService(wsdlServiceName);
+                if (wsdlService == null) {
+                    throw new AxisFault(
+                            Messages.getMessage("servicenotfoundinwsdl",
+                                    wsdlServiceName.getLocalPart()));
+                }
+
+            } else {
+                Collection col = wsdlDefinition.getServices().values();
+                if (col != null && col.size() > 0) {
+                    wsdlService = (Service) col.iterator().next();
+                    if (wsdlService == null) {
+                        throw new AxisFault(Messages.getMessage("noservicefoundinwsdl"));
+                    }
+                } else {
+                    throw new AxisFault(Messages.getMessage("noservicefoundinwsdl"));
+                }
+            }
+            axisService.setName(wsdlService.getQName().getLocalPart());
+
+            Port port;
+            if (portName != null) {
+                port = wsdlService.getPort(portName);
+                if (port == null) {
+                    throw new AxisFault(Messages.getMessage("noporttypefoundfor", portName));
+                }
+            } else {
+                Collection ports = wsdlService.getPorts().values();
+                if (ports != null && ports.size() > 0) {
+                    port = (Port) ports.iterator().next();
+                    if (port == null) {
+                        throw new AxisFault(Messages.getMessage("noporttypefound"));
+                    }
+                } else {
+                    throw new AxisFault(Messages.getMessage("noporttypefound"));
+                }
+            }
+            List exteElemts = port.getExtensibilityElements();
+            if (exteElemts != null) {
+                Iterator extItr = exteElemts.iterator();
+                while (extItr.hasNext()) {
+                    Object extensibilityElement = extItr.next();
+                    if (extensibilityElement instanceof SOAPAddress) {
+                        SOAPAddress address = (SOAPAddress) extensibilityElement;
+                        options.setTo(new EndpointReference(address.getLocationURI()));
+                    }
+                }
+            }
+
+            Binding binding = port.getBinding();
+            Iterator bindingOperations = binding.getBindingOperations().iterator();
+            while (bindingOperations.hasNext()) {
+                BindingOperation bindingOperation = (BindingOperation) bindingOperations.next();
+                AxisOperation axisOperation;
+                if (bindingOperation.getBindingInput() == null &&
+                        bindingOperation.getBindingOutput() != null) {
+                    axisOperation = new OutOnlyAxisOperation();
+                } else {
+                    axisOperation = new OutInAxisOperation();
+                }
+                axisOperation.setName(new QName(bindingOperation.getName()));
+                List list = bindingOperation.getExtensibilityElements();
+                if (list != null) {
+                    Iterator exteElements = list.iterator();
+                    while (exteElements.hasNext()) {
+                        Object extensibilityElement = exteElements.next();
+                        if (extensibilityElement instanceof SOAPOperation) {
+                            SOAPOperation soapOp = (SOAPOperation) extensibilityElement;
+                            axisOperation.addParameter(new Parameter(AxisOperation.SOAP_ACTION,
+                                    soapOp.getSoapActionURI()));
+                        }
+                    }
+                }
+                axisService.addOperation(axisOperation);
+            }
+
+        } catch (IOException e) {
+            throw new AxisFault("IOException" + e.getMessage());
+        } catch (ParserConfigurationException e) {
+            throw new AxisFault("ParserConfigurationException" + e.getMessage());
+        } catch (SAXException e) {
+            throw new AxisFault("SAXException" + e.getMessage());
+        } catch (WSDLException e) {
+            throw new AxisFault("WSDLException" + e.getMessage());
+        }
+        return axisService;
+    }
+
+    /**
+     * To create an AxisService using given service impl class name
+     * fisrt generate schema corresponding to the given java class , next for each methods AxisOperation
+     * will be created.
+     * <p/>
+     * Note : Inorder to work this properly RPCMessageReceiver should be availble in the class path
+     * otherewise operation can not continue
+     *
+     * @param implClass
+     * @param axisConfig
+     * @return return created AxisSrevice
+     */
+    public static AxisService createService(String implClass,
+                                            AxisConfiguration axisConfig,
+                                            Class messageReceiverClass) throws AxisFault {
+        Parameter parameter = new Parameter(Constants.SERVICE_CLASS, implClass);
+        OMElement paraElement = Utils.getParameter(Constants.SERVICE_CLASS, implClass, false);
+        parameter.setParameterElement(paraElement);
+        AxisService axisService = new AxisService();
+        axisService.setUseDefaultChains(false);
+        axisService.addParameter(parameter);
+
+        int index = implClass.lastIndexOf(".");
+        String serviceName;
+        if (index > 0) {
+            serviceName = implClass.substring(index + 1, implClass.length());
+        } else {
+            serviceName = implClass;
+        }
+
+        axisService.setName(serviceName);
+        axisService.setClassLoader(axisConfig.getServiceClassLoader());
+
+        ClassLoader serviceClassLoader = axisService.getClassLoader();
+        SchemaGenerator schemaGenerator = new SchemaGenerator(serviceClassLoader,
+                implClass, axisService.getSchematargetNamespace(),
+                axisService.getSchematargetNamespacePrefix());
+        try {
+            axisService.setSchema(schemaGenerator.generateSchema());
+        } catch (Exception e) {
+            throw new AxisFault(e);
+        }
+
+        JMethod [] method = schemaGenerator.getMethods();
+        TypeTable table = schemaGenerator.getTypeTable();
+
+        PhasesInfo pinfo = axisConfig.getPhasesInfo();
+
+        for (int i = 0; i < method.length; i++) {
+            JMethod jmethod = method[i];
+            if (!jmethod.isPublic()) {
+                // no need to expose , private and protected methods
+                continue;
+            } else if ("init".equals(jmethod.getSimpleName())) {
+                continue;
+            }
+            AxisOperation operation = Utils.getAxisOperationforJmethod(jmethod, table);
+
+            // loading message recivers
+            try {
+                MessageReceiver messageReceiver = (MessageReceiver) messageReceiverClass.newInstance();
+                operation.setMessageReceiver(messageReceiver);
+            } catch (IllegalAccessException e) {
+                throw new AxisFault("IllegalAccessException occured during message receiver loading"
+                        + e.getMessage());
+            } catch (InstantiationException e) {
+                throw new AxisFault("InstantiationException occured during message receiver loading"
+                        + e.getMessage());
+            }
+            pinfo.setOperationPhases(operation);
+            axisService.addOperation(operation);
+        }
+        return axisService;
+
+    }
+
+    public static AxisService createService(String implClass,
+                                            AxisConfiguration axisConfig) throws AxisFault {
+        Class clazz;
+        try {
+            clazz = Class.forName("org.apache.axis2.rpc.receivers.RPCMessageReceiver");
+        } catch (ClassNotFoundException e) {
+            throw new AxisFault("ClassNotFoundException occured during message receiver loading"
+                    + e.getMessage());
+        }
+
+        return createService(implClass, axisConfig, clazz);
+
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/description/ClientUtils.java Tue Mar  7 20:24:10 2006
@@ -7,23 +7,9 @@
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.i18n.Messages;
-import org.apache.axis2.util.XMLUtils;
-import org.w3c.dom.Document;
-import org.xml.sax.SAXException;
-
-import javax.wsdl.*;
-import javax.wsdl.extensions.soap.SOAPAddress;
-import javax.wsdl.extensions.soap.SOAPOperation;
-import javax.wsdl.factory.WSDLFactory;
-import javax.wsdl.xml.WSDLReader;
+
 import javax.xml.namespace.QName;
-import javax.xml.parsers.ParserConfigurationException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Collection;
 import java.util.Iterator;
-import java.util.List;
 
 /**
  * Utility methods for various clients to use.
@@ -83,124 +69,6 @@
                 }
             }
         }
-
         return transportIn;
-
-    }
-
-    /**
-     * To create a AxisService for a given WSDL and the created client is most suitable for clinet side
-     * invocation not for server side invocation. Since all the soap acction and wsa action is added to
-     * operations
-     *
-     * @param wsdlURL         location of the WSDL
-     * @param wsdlServiceName name of the service to be invoke , if it is null then the first one will
-     *                        be selected if there are more than one
-     * @param portName        name of the port , if there are more than one , if it is null then the
-     *                        first one in the  iterator will be selected
-     * @param options         Service client options, to set the target EPR
-     * @return AxisService , the created servie will be return
-     */
-    public static AxisService creatAxisService(URL wsdlURL,
-                                               QName wsdlServiceName,
-                                               String portName,
-                                               Options options) throws AxisFault {
-        AxisService axisService;
-        try {
-            InputStream in = wsdlURL.openConnection().getInputStream();
-            Document doc = XMLUtils.newDocument(in);
-            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
-            reader.setFeature("javax.wsdl.importDocuments", true);
-            Definition wsdlDefinition = reader.readWSDL(null, doc);
-            axisService = new AxisService();
-
-            Service wsdlService;
-            if (wsdlServiceName != null) {
-                wsdlService = wsdlDefinition.getService(wsdlServiceName);
-                if (wsdlService == null) {
-                    throw new AxisFault(
-                            Messages.getMessage("servicenotfoundinwsdl",
-                                    wsdlServiceName.getLocalPart()));
-                }
-
-            } else {
-                Collection col = wsdlDefinition.getServices().values();
-                if (col != null && col.size() > 0) {
-                    wsdlService = (Service) col.iterator().next();
-                    if (wsdlService == null) {
-                        throw new AxisFault(Messages.getMessage("noservicefoundinwsdl"));
-                    }
-                } else {
-                    throw new AxisFault(Messages.getMessage("noservicefoundinwsdl"));
-                }
-            }
-            axisService.setName(wsdlService.getQName().getLocalPart());
-
-            Port port;
-            if (portName != null) {
-                port = wsdlService.getPort(portName);
-                if (port == null) {
-                    throw new AxisFault(Messages.getMessage("noporttypefoundfor", portName));
-                }
-            } else {
-                Collection ports = wsdlService.getPorts().values();
-                if (ports != null && ports.size() > 0) {
-                    port = (Port) ports.iterator().next();
-                    if (port == null) {
-                        throw new AxisFault(Messages.getMessage("noporttypefound"));
-                    }
-                } else {
-                    throw new AxisFault(Messages.getMessage("noporttypefound"));
-                }
-            }
-            List exteElemts = port.getExtensibilityElements();
-            if (exteElemts != null) {
-                Iterator extItr = exteElemts.iterator();
-                while (extItr.hasNext()) {
-                    Object extensibilityElement = extItr.next();
-                    if (extensibilityElement instanceof SOAPAddress) {
-                        SOAPAddress address = (SOAPAddress) extensibilityElement;
-                        options.setTo(new EndpointReference(address.getLocationURI()));
-                    }
-                }
-            }
-
-            Binding binding = port.getBinding();
-            Iterator bindingOperations = binding.getBindingOperations().iterator();
-            while (bindingOperations.hasNext()) {
-                BindingOperation bindingOperation = (BindingOperation) bindingOperations.next();
-                AxisOperation axisOperation;
-                if (bindingOperation.getBindingInput() == null &&
-                        bindingOperation.getBindingOutput() != null) {
-                    axisOperation = new OutOnlyAxisOperation();
-                } else {
-                    axisOperation = new OutInAxisOperation();
-                }
-                axisOperation.setName(new QName(bindingOperation.getName()));
-                List list = bindingOperation.getExtensibilityElements();
-                if (list != null) {
-                    Iterator exteElements = list.iterator();
-                    while (exteElements.hasNext()) {
-                        Object extensibilityElement = exteElements.next();
-                        if (extensibilityElement instanceof SOAPOperation) {
-                            SOAPOperation soapOp = (SOAPOperation) extensibilityElement;
-                            axisOperation.addParameter(new Parameter(AxisOperation.SOAP_ACTION,
-                                    soapOp.getSoapActionURI()));
-                        }
-                    }
-                }
-                axisService.addOperation(axisOperation);
-            }
-
-        } catch (IOException e) {
-            throw new AxisFault("IOException" + e.getMessage());
-        } catch (ParserConfigurationException e) {
-            throw new AxisFault("ParserConfigurationException" + e.getMessage());
-        } catch (SAXException e) {
-            throw new AxisFault("SAXException" + e.getMessage());
-        } catch (WSDLException e) {
-            throw new AxisFault("WSDLException" + e.getMessage());
-        }
-        return axisService;
     }
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/receivers/AbstractMessageReceiver.java?rev=384115&r1=384114&r2=384115&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 Mar  7 20:24:10 2006
@@ -80,14 +80,14 @@
      */
     protected Object getTheImplementationObject(MessageContext msgContext) throws AxisFault {
         ServiceContext serviceContext = msgContext.getOperationContext().getServiceContext();
-        Object serviceimpl = serviceContext.getServiceImpl();
+        Object serviceimpl = serviceContext.getProperty(ServiceContext.SERVICE_CLASS);
         if (serviceimpl != null) {
             // since service impl is there in service context , take that from there
             return serviceimpl;
         } else {
             // create a new service impl class for that service
             serviceimpl = makeNewServiceObject(msgContext);
-            serviceContext.setServiceImpl(serviceimpl);
+            serviceContext.setProperty(ServiceContext.SERVICE_CLASS, serviceimpl);
             return serviceimpl;
         }
     }

Modified: webservices/axis2/trunk/java/modules/core/test-resources/deployment/module1/META-INF/module.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test-resources/deployment/module1/META-INF/module.xml?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test-resources/deployment/module1/META-INF/module.xml (original)
+++ webservices/axis2/trunk/java/modules/core/test-resources/deployment/module1/META-INF/module.xml Tue Mar  7 20:24:10 2006
@@ -1,28 +1,28 @@
 <module name="module1">
     <inflow>
         <handler name="h1" class="org.apache.axis2.registry.Handler3">
-            <order phase="userphase1"/>
+            <order phase="OperationInPhase"/>
         </handler>
         <handler name="h2" class="org.apache.axis2.registry.Handler3">
-            <order phase="userphase1"/>
+            <order phase="OperationInPhase"/>
         </handler>
     </inflow>
 
     <outflow>
         <handler name="h3" class="org.apache.axis2.registry.Handler3">
-            <order phase="userphase1"/>
+            <order phase="OperationOutPhase"/>
         </handler>
     </outflow>
 
     <Outfaultflow>
         <handler name="h4" class="org.apache.axis2.registry.Handler3">
-            <order phase="userphase1"/>
+            <order phase="OperationOutFaultPhase"/>
         </handler>
     </Outfaultflow>
 
     <INfaultflow>
         <handler name="h5" class="org.apache.axis2.registry.Handler3">
-            <order phase="userphase1"/>
+            <order phase="OperationInFaultPhase"/>
         </handler>
     </INfaultflow>
 

Modified: webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml (original)
+++ webservices/axis2/trunk/java/modules/core/test-resources/deployment/moduleDisEngegeRepo/modules/testModule/META-INF/module.xml Tue Mar  7 20:24:10 2006
@@ -10,7 +10,7 @@
         </handler>
         <handler name="Handler3"
                  class="org.apache.axis2.deployment.SpeakingHandler">
-            <order phase="userphase1"/>
+            <order phase="OperationInPhase"/>
         </handler>
     </inflow>
 

Modified: webservices/axis2/trunk/java/modules/core/test-resources/deployment/serviceModule/META-INF/module.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/test-resources/deployment/serviceModule/META-INF/module.xml?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/test-resources/deployment/serviceModule/META-INF/module.xml (original)
+++ webservices/axis2/trunk/java/modules/core/test-resources/deployment/serviceModule/META-INF/module.xml Tue Mar  7 20:24:10 2006
@@ -16,13 +16,13 @@
 
     <Outfaultflow>
         <handler name="h4" class="org.apache.axis2.ModuleHandler1">
-            <order phase="userphase1"/>
+            <order phase="OperationOutFaultPhase"/>
         </handler>
     </Outfaultflow>
 
     <INfaultflow>
         <handler name="h5" class="org.apache.axis2.ModuleHandler1">
-            <order phase="userphase1"/>
+            <order phase="OperationInFaultPhase"/>
         </handler>
     </INfaultflow>
 </module>

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/ServiceCreateTest.java Tue Mar  7 20:24:10 2006
@@ -50,7 +50,7 @@
 
     public void testServiceCreate() throws AxisFault {
         AxisConfiguration axisConfig = configContext.getAxisConfiguration();
-        AxisService service = Utils.createService("org.apache.axis2.engine.MyService", axisConfig);
+        AxisService service = AxisService.createService("org.apache.axis2.engine.MyService", axisConfig);
         assertNotNull(service);
         axisConfig.addService(service);
         assertEquals("MyService", service.getName());

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java Tue Mar  7 20:24:10 2006
@@ -37,7 +37,7 @@
 
     protected void setUp() throws Exception {
         UtilServer.start();
-        service = org.apache.axis2.deployment.util.Utils.createService(Echo.class.getName(),
+        service = AxisService.createService(Echo.class.getName(),
                 UtilServer.getConfigurationContext().getAxisConfiguration());
         service.setName(serviceName.getLocalPart());
         UtilServer.deployService(service);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java?rev=384115&r1=384114&r2=384115&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java Tue Mar  7 20:24:10 2006
@@ -446,7 +446,6 @@
         Object [] response = sender.invokeBlocking(operationName, args.toArray(), ret.toArray());
         assertEquals(((Integer) response[0]).intValue(), 10);
         assertEquals(response[1], "foo");
-//        assertEquals(Byte.parseByte(response.getFirstElement().getText()),1);
     }
 
     public void testStringArray() throws AxisFault {
@@ -461,29 +460,15 @@
         RPCServiceClient sender = new RPCServiceClient(configContext, null);
         sender.setOptions(options);
 
-        String str = "<req:handleStringArray xmlns:req=\"http://org.apache.axis2/xsd\">\n" +
-                "    <item0>abc</item0>\n" +
-                "    <item0>def</item0>\n" +
-                "    <item0>ghi</item0>\n" +
-                "    <item0>klm</item0>\n" +
-                "</req:handleStringArray>";
-        StAXOMBuilder staxOMBuilder;
-        try {
-            XMLStreamReader xmlReader = XMLInputFactory.newInstance().createXMLStreamReader(new
-                    ByteArrayInputStream(str.getBytes()));
-            OMFactory fac = OMAbstractFactory.getOMFactory();
-
-            staxOMBuilder = new
-                    StAXOMBuilder(fac, xmlReader);
-        } catch (XMLStreamException e) {
-            throw new AxisFault(e);
-        } catch (FactoryConfigurationError factoryConfigurationError) {
-            throw new AxisFault(factoryConfigurationError);
-        }
-        ;
-
-        OMElement result = sender.sendReceive(staxOMBuilder.getDocumentElement());
-        assertEquals(result.getFirstElement().getText(), "true");
+        ArrayList args = new ArrayList();
+        String [] values = new String[]{"abc", "cde", "efg"};
+        args.add(values);
+        ArrayList ret = new ArrayList();
+        ret.add(Boolean.class);
+        Object [] objs = sender.invokeBlocking(operationName, args.toArray(),
+                ret.toArray());
+        assertNotNull(objs);
+        assertEquals(Boolean.TRUE, Boolean.valueOf(objs[0].toString()));
     }
 
     public void testmulReturn() throws AxisFault {



Mime
View raw message