axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject svn commit: r535544 [2/2] - in /webservices/axis2/trunk/java/modules: addressing/test/org/apache/axis2/handlers/addressing/ clustering/test/org/apache/axis2/clustering/ integration/test/org/apache/axis2/integration/ integration/test/org/apache/axis2/jm...
Date Sat, 05 May 2007 16:16:28 GMT
Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcherTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcherTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcherTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RelatesToBasedServiceDispatcherTest.java
Sat May  5 09:16:25 2007
@@ -17,13 +17,14 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.RelatesTo;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.ServiceContext;
+import org.apache.axis2.context.ServiceGroupContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.InOnlyAxisOperation;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.engine.AxisConfiguration;
 
 import javax.xml.namespace.QName;
@@ -36,16 +37,16 @@
 
         AxisConfiguration ac = new AxisConfiguration();
         ConfigurationContext cc = new ConfigurationContext(ac);
-
         AxisService as1 = new AxisService("Service1");
-        ServiceContext sc1 =
-                new ServiceContext(as1, ContextFactory.createServiceGroupContext(cc, null));
-
-        AxisService as2 = new AxisService("Service2");
+        AxisServiceGroup sg = new AxisServiceGroup(ac);
+        sg.addService(as1);
+        ServiceGroupContext sgc = cc.createServiceGroupContext(sg);
 
-        ServiceContext sc2 =
-                new ServiceContext(as2, ContextFactory.createServiceGroupContext(cc, null));
+        ServiceContext sc1 = sgc.getServiceContext(as1);
 
+        AxisService as2 = new AxisService("Service2");
+        sg.addService(as2);
+        ServiceContext sc2 = sgc.getServiceContext(as2);
 
         ac.addService(as1);
         ac.addService(as2);
@@ -56,12 +57,12 @@
         as2.addOperation(operation2);
 
 
-        OperationContext oc1 = ContextFactory.createOperationContext(operation1, sc1);
-        OperationContext oc2 = ContextFactory.createOperationContext(operation2, sc2);
+        OperationContext oc1 = sc1.createOperationContext(operation1);
+        OperationContext oc2 = sc2.createOperationContext(operation2);
 
         cc.registerOperationContext("urn:org.apache.axis2.dispatchers.messageid:123", oc1);
         cc.registerOperationContext("urn:org.apache.axis2.dispatchers.messageid:456", oc2);
-        messageContext = ContextFactory.createMessageContext(cc);
+        messageContext = cc.createMessageContext();
         messageContext
                 .addRelatesTo(new RelatesTo("urn:org.apache.axis2.dispatchers.messageid:456"));
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcherTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcherTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcherTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedOperationDispatcherTest.java
Sat May  5 09:16:25 2007
@@ -18,7 +18,6 @@
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
@@ -42,7 +41,7 @@
         ConfigurationContext cc = ConfigurationContextFactory.createEmptyConfigurationContext();
         AxisConfiguration ac = cc.getAxisConfiguration();
         ac.addService(as1);
-        messageContext = ContextFactory.createMessageContext(cc);
+        messageContext = cc.createMessageContext();
 
         messageContext.setTo(new EndpointReference(
                 "http://127.0.0.1:8080/axis2/services/Service1/operation2"));

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcherTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcherTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcherTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/RequestURIBasedServiceDispatcherTest.java
Sat May  5 09:16:25 2007
@@ -18,7 +18,6 @@
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.engine.AxisConfiguration;
@@ -34,7 +33,7 @@
         AxisConfiguration ac = cc.getAxisConfiguration();
         ac.addService(as1);
         ac.addService(as2);
-        messageContext = ContextFactory.createMessageContext(cc);
+        messageContext = cc.createMessageContext();
 
         messageContext
                 .setTo(new EndpointReference("http://127.0.0.1:8080/axis2/services/Service2"));

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcherTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcherTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcherTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcherTest.java
Sat May  5 09:16:25 2007
@@ -20,7 +20,6 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
@@ -44,7 +43,7 @@
         ConfigurationContext cc = ConfigurationContextFactory.createEmptyConfigurationContext();
         AxisConfiguration ac = cc.getAxisConfiguration();
         ac.addService(as1);
-        messageContext = ContextFactory.createMessageContext(cc);
+        messageContext = cc.createMessageContext();
 
         messageContext.setAxisService(as1);
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcherTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcherTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcherTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/dispatchers/SOAPMessageBodyBasedServiceDispatcherTest.java
Sat May  5 09:16:25 2007
@@ -20,7 +20,6 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.engine.AxisConfiguration;
@@ -35,7 +34,7 @@
         AxisConfiguration ac = cc.getAxisConfiguration();
         ac.addService(as1);
         ac.addService(as2);
-        messageContext = ContextFactory.createMessageContext(cc);
+        messageContext = cc.createMessageContext();
 
         SOAPEnvelope se = OMAbstractFactory.getSOAP11Factory().createSOAPEnvelope();
         SOAPBody sb = OMAbstractFactory.getSOAP11Factory().createSOAPBody(se);

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EnginePausingTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EnginePausingTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EnginePausingTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EnginePausingTest.java
Sat May  5 09:16:25 2007
@@ -23,7 +23,6 @@
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisBinding;
 import org.apache.axis2.description.AxisBindingOperation;
@@ -122,7 +121,7 @@
 
         service.mapActionToOperation(operationName.getLocalPart(), axisOp);
 
-        mc = ContextFactory.createMessageContext(configContext);
+        mc = configContext.createMessageContext();
         mc.setTransportIn(transportIn);
         mc.setTransportOut(transportOut);
 
@@ -177,8 +176,7 @@
     }
 
     public void testReceive() throws Exception {
-        mc.setTo(
-                new EndpointReference("/axis2/services/NullService"));
+        mc.setTo(new EndpointReference("/axis2/services/NullService"));
         mc.setWSAAction("DummyOp");
         AxisEngine engine = new AxisEngine(configContext);
         engine.receive(mc);

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/EngineWithoutPhaseResolvingTest.java
Sat May  5 09:16:25 2007
@@ -21,26 +21,25 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.context.ServiceGroupContext;
+import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.InOutAxisOperation;
 import org.apache.axis2.description.TransportInDescription;
 import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.transport.http.CommonsHTTPTransportSender;
 
 import javax.xml.namespace.QName;
 
 public class EngineWithoutPhaseResolvingTest extends AbstractEngineTest {
     private MessageContext mc;
-    private AxisConfiguration engineRegistry;
     private QName serviceName = new QName("axis2/services/NullService");
     private QName operationName = new QName("NullOperation");
-    private AxisService service;
     private ConfigurationContext configContext;
-    private AxisOperation axisOp;
 
     public EngineWithoutPhaseResolvingTest() {
     }
@@ -51,16 +50,16 @@
 
     protected void setUp() throws Exception {
 
-        engineRegistry = new AxisConfiguration();
+        AxisConfiguration engineRegistry = new AxisConfiguration();
         configContext = new ConfigurationContext(engineRegistry);
 
         TransportOutDescription transport = new TransportOutDescription("null");
         transport.setSender(new CommonsHTTPTransportSender());
 
         TransportInDescription transportIn = new TransportInDescription("null");
-        axisOp = new InOutAxisOperation(operationName);
+        AxisOperation axisOp = new InOutAxisOperation(operationName);
 
-        service = new AxisService(serviceName.getLocalPart());
+        AxisService service = new AxisService(serviceName.getLocalPart());
         axisOp.setMessageReceiver(new MessageReceiver() {
             public void receive(MessageContext messageCtx) throws AxisFault {
                 // TODO Auto-generated method stub
@@ -70,13 +69,17 @@
         engineRegistry.addService(service);
         service.addOperation(axisOp);
 
-        mc = ContextFactory.createMessageContext(configContext);
+        mc = configContext.createMessageContext();
         mc.setTransportIn(transportIn);
         mc.setTransportOut(transport);
 
-        OperationContext opCOntext = ContextFactory.createOperationContext(axisOp, null);
+        ServiceGroupContext sgc = configContext.createServiceGroupContext(
+                (AxisServiceGroup)service.getParent());
+        ServiceContext sc = sgc.getServiceContext(service);
 
-        mc.setOperationContext(opCOntext);
+        OperationContext opContext = sc.createOperationContext(axisOp);
+
+        mc.setOperationContext(opContext);
         mc.setTransportOut(transport);
         mc.setProperty(MessageContext.TRANSPORT_OUT, System.out);
         mc.setServerSide(true);

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveATest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveATest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveATest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveATest.java
Sat May  5 09:16:25 2007
@@ -23,7 +23,6 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.ServiceContext;
@@ -159,13 +158,11 @@
 
         //-----------------------------------------------------------------
 
-        serviceGroupContext = ContextFactory.createServiceGroupContext(configurationContext,
-                                                                       (AxisServiceGroup)
axisService
-                                                                               .getParent());
+        serviceGroupContext = configurationContext.
+                createServiceGroupContext((AxisServiceGroup)axisService.getParent());
         serviceGroupContext.setId("ServiceGroupContextTest");
 
-        ServiceContext serviceContext =
-                ContextFactory.createServiceContext(serviceGroupContext, axisService);
+        ServiceContext serviceContext = serviceGroupContext.getServiceContext(axisService);
 
         operationContext = serviceContext.createOperationContext(operationName);
 
@@ -193,7 +190,7 @@
 
         //-----------------------------------------------------------------
 
-        mc = ContextFactory.createMessageContext(configurationContext);
+        mc = configurationContext.createMessageContext();
         mc.setTransportIn(transportIn);
         mc.setTransportOut(transportOut);
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveBTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveBTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveBTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveBTest.java
Sat May  5 09:16:25 2007
@@ -23,7 +23,6 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.ServiceContext;
@@ -455,32 +454,29 @@
         //-----------------------------------------------------------------
         // setup the context objects
         //-----------------------------------------------------------------
-        srvGrpCtx_ABC = ContextFactory.createServiceGroupContext(configurationContext,
-                                                                 axisSrvGrp_ABC);
+        srvGrpCtx_ABC = configurationContext.createServiceGroupContext(axisSrvGrp_ABC);
         srvGrpCtx_ABC.setId(serviceGroupName_ABC);
 
-        srvGrpCtx_123 =
-                ContextFactory.createServiceGroupContext(configurationContext, axisSrvGrp_123);
+        srvGrpCtx_123 = configurationContext.createServiceGroupContext(axisSrvGrp_123);
         srvGrpCtx_123.setId(serviceGroupName_ABC);
 
-        srvGrpCtx_DAY =
-                ContextFactory.createServiceGroupContext(configurationContext, axisSrvGrp_DAY);
+        srvGrpCtx_DAY = configurationContext.createServiceGroupContext(axisSrvGrp_DAY);
         srvGrpCtx_DAY.setId(serviceGroupName_DAY);
 
-        srvCtx_A = ContextFactory.createServiceContext(srvGrpCtx_ABC, axisSrv_A);
-        srvCtx_B = ContextFactory.createServiceContext(srvGrpCtx_ABC, axisSrv_B);
-        srvCtx_C = ContextFactory.createServiceContext(srvGrpCtx_ABC, axisSrv_C);
-
-        srvCtx_1 = ContextFactory.createServiceContext(srvGrpCtx_123, axisSrv_1);
-        srvCtx_2 = ContextFactory.createServiceContext(srvGrpCtx_123, axisSrv_2);
-        srvCtx_3 = ContextFactory.createServiceContext(srvGrpCtx_123, axisSrv_3);
-        srvCtx_4 = ContextFactory.createServiceContext(srvGrpCtx_123, axisSrv_4);
-
-        srvCtx_Mon = ContextFactory.createServiceContext(srvGrpCtx_DAY, axisSrv_Mon);
-        srvCtx_Tue = ContextFactory.createServiceContext(srvGrpCtx_DAY, axisSrv_Tue);
-        srvCtx_Wed = ContextFactory.createServiceContext(srvGrpCtx_DAY, axisSrv_Wed);
-        srvCtx_Thu = ContextFactory.createServiceContext(srvGrpCtx_DAY, axisSrv_Thu);
-        srvCtx_Fri = ContextFactory.createServiceContext(srvGrpCtx_DAY, axisSrv_Fri);
+        srvCtx_A = srvGrpCtx_ABC.getServiceContext(axisSrv_A);
+        srvCtx_B = srvGrpCtx_ABC.getServiceContext(axisSrv_B);
+        srvCtx_C = srvGrpCtx_ABC.getServiceContext(axisSrv_C);
+
+        srvCtx_1 = srvGrpCtx_123.getServiceContext(axisSrv_1);
+        srvCtx_2 = srvGrpCtx_123.getServiceContext(axisSrv_2);
+        srvCtx_3 = srvGrpCtx_123.getServiceContext(axisSrv_3);
+        srvCtx_4 = srvGrpCtx_123.getServiceContext(axisSrv_4);
+
+        srvCtx_Mon = srvGrpCtx_DAY.getServiceContext(axisSrv_Mon);
+        srvCtx_Tue = srvGrpCtx_DAY.getServiceContext(axisSrv_Tue);
+        srvCtx_Wed = srvGrpCtx_DAY.getServiceContext(axisSrv_Wed);
+        srvCtx_Thu = srvGrpCtx_DAY.getServiceContext(axisSrv_Thu);
+        srvCtx_Fri = srvGrpCtx_DAY.getServiceContext(axisSrv_Fri);
 
         opCtx_A1 = srvCtx_A.createOperationContext(operation_QName_A1);
         opCtx_A2 = srvCtx_A.createOperationContext(operation_QName_A2);
@@ -511,7 +507,7 @@
 
 
     private MessageContext createMessageContext(OperationContext oc) throws Exception {
-        MessageContext mc = ContextFactory.createMessageContext(configurationContext);
+        MessageContext mc = configurationContext.createMessageContext();
         mc.setTransportIn(transportIn);
         mc.setTransportOut(transportOut);
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveCTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveCTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveCTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSaveCTest.java
Sat May  5 09:16:25 2007
@@ -23,7 +23,6 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.ServiceContext;
@@ -451,26 +450,25 @@
         //-----------------------------------------------------------------
         // setup the context objects
         //-----------------------------------------------------------------
-        srvGrpCtx_ABC_save = ContextFactory
-                .createServiceGroupContext(saveConfigurationContext, axisSrvGrp_ABC_save);
+        srvGrpCtx_ABC_save = saveConfigurationContext.createServiceGroupContext(axisSrvGrp_ABC_save);
         srvGrpCtx_ABC_save.setId(serviceGroupName_ABC);
 
-        srvCtx_A_save = ContextFactory.createServiceContext(srvGrpCtx_ABC_save, axisSrv_A_save);
-        srvCtx_B_save = ContextFactory.createServiceContext(srvGrpCtx_ABC_save, axisSrv_B_save);
-        srvCtx_C_save = ContextFactory.createServiceContext(srvGrpCtx_ABC_save, axisSrv_C_save);
+        srvCtx_A_save = srvGrpCtx_ABC_save.getServiceContext(axisSrv_A_save);
+        srvCtx_B_save = srvGrpCtx_ABC_save.getServiceContext(axisSrv_B_save);
+        srvCtx_C_save = srvGrpCtx_ABC_save.getServiceContext(axisSrv_C_save);
 
         opCtx_A1_save = srvCtx_A_save.createOperationContext(operation_QName_A1);
         opCtx_A2_save = srvCtx_A_save.createOperationContext(operation_QName_A2);
 
         //----------------------------------------
 
-        srvGrpCtx_ABC_equiv = ContextFactory.createServiceGroupContext(
-                equivConfigurationContext, axisSrvGrp_ABC_equiv);
+        srvGrpCtx_ABC_equiv =
+                equivConfigurationContext.createServiceGroupContext(axisSrvGrp_ABC_equiv);
         srvGrpCtx_ABC_equiv.setId(serviceGroupName_ABC);
 
-        srvCtx_A_equiv = ContextFactory.createServiceContext(srvGrpCtx_ABC_equiv, axisSrv_A_equiv);
-        srvCtx_B_equiv = ContextFactory.createServiceContext(srvGrpCtx_ABC_equiv, axisSrv_B_equiv);
-        srvCtx_C_equiv = ContextFactory.createServiceContext(srvGrpCtx_ABC_equiv, axisSrv_C_equiv);
+        srvCtx_A_equiv = srvGrpCtx_ABC_equiv.getServiceContext(axisSrv_A_equiv);
+        srvCtx_B_equiv = srvGrpCtx_ABC_equiv.getServiceContext(axisSrv_B_equiv);
+        srvCtx_C_equiv = srvGrpCtx_ABC_equiv.getServiceContext(axisSrv_C_equiv);
 
         opCtx_A1_equiv = srvCtx_A_equiv.createOperationContext(operation_QName_A1);
         opCtx_A2_equiv = srvCtx_A_equiv.createOperationContext(operation_QName_A2);
@@ -501,7 +499,7 @@
 
     private MessageContext createMessageContext(OperationContext oc, ConfigurationContext
cc,
                                                 int flowType) throws Exception {
-        MessageContext mc = ContextFactory.createMessageContext(cc);
+        MessageContext mc = cc.createMessageContext();
 
         mc.setFLOW(flowType);
         mc.setTransportIn(transportIn);

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextSelfManagedDataTest.java
Sat May  5 09:16:25 2007
@@ -23,7 +23,6 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.SelfManagedDataManager;
@@ -219,11 +218,11 @@
 
         //-----------------------------------------------------------------
 
-        serviceGroupContext = ContextFactory
-                .createServiceGroupContext(cfgContext, (AxisServiceGroup) axisService.getParent());
+        serviceGroupContext =
+                cfgContext.createServiceGroupContext((AxisServiceGroup)axisService.getParent());
         serviceGroupContext.setId("ServiceGroupContextTest");
 
-        serviceContext = ContextFactory.createServiceContext(serviceGroupContext, axisService);
+        serviceContext = serviceGroupContext.getServiceContext(axisService);
 
         operationContext = serviceContext.createOperationContext(operationName);
 
@@ -267,7 +266,7 @@
 
         invokecallcount = 0;
 
-        mc = ContextFactory.createMessageContext(cfgContext);
+        mc = cfgContext.createMessageContext();
         mc.setTransportIn(transportIn);
         mc.setTransportOut(transportOut);
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/MessageContextTest.java
Sat May  5 09:16:25 2007
@@ -22,7 +22,6 @@
 import org.apache.axis2.AbstractTestCase;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisService;
 
@@ -40,7 +39,7 @@
 
         ConfigurationContext engineContext = new ConfigurationContext(er);
 
-        MessageContext msgctx = ContextFactory.createMessageContext(engineContext);
+        MessageContext msgctx = engineContext.createMessageContext();
 
         SOAPFactory omFac = OMAbstractFactory.getSOAP11Factory();
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/OperationContextSaveTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/OperationContextSaveTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/OperationContextSaveTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/engine/OperationContextSaveTest.java
Sat May  5 09:16:25 2007
@@ -23,7 +23,6 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.ServiceContext;
@@ -152,12 +151,12 @@
 
         //-----------------------------------------------------------------
 
-        serviceGroupContext = ContextFactory.createServiceGroupContext(configurationContext,
-                                                                       (AxisServiceGroup)
axisService
-                                                                               .getParent());
+        serviceGroupContext =
+                configurationContext.createServiceGroupContext((AxisServiceGroup)axisService
+                        .getParent());
         serviceGroupContext.setId("ServiceGroupContextTest");
 
-        serviceContext = ContextFactory.createServiceContext(serviceGroupContext, axisService);
+        serviceContext = serviceGroupContext.getServiceContext(axisService);
 
         operationContext = serviceContext.createOperationContext(operationName);
 
@@ -170,7 +169,7 @@
 
         //-----------------------------------------------------------------
 
-        mc = ContextFactory.createMessageContext(configurationContext);
+        mc = configurationContext.createMessageContext();
         mc.setTransportIn(transportIn);
         mc.setTransportOut(transportOut);
         mc.setTransportOut(transportOut);

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleTests.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleTests.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/phaserule/PhaseRuleTests.java
Sat May  5 09:16:25 2007
@@ -25,7 +25,6 @@
 import org.apache.axis2.description.PhaseRule;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.ConfigurationContext;
 
 import java.util.ArrayList;
@@ -48,8 +47,8 @@
         Phase p2 = new Phase("PhaseB");
         phases.add(p2);
 
-        MessageContext msg = ContextFactory.createMessageContext(
-                new ConfigurationContext(new AxisConfiguration()));
+        MessageContext msg =
+                new ConfigurationContext(new AxisConfiguration()).createMessageContext();
 
         PhaseHolder ph = new PhaseHolder(phases);
         HandlerDescription hm = new HandlerDescription();
@@ -96,8 +95,8 @@
         Phase p2 = new Phase("PhaseB");
         phases.add(p2);
 
-        MessageContext msg = ContextFactory.createMessageContext(
-                new ConfigurationContext(new AxisConfiguration()));
+        MessageContext msg =
+                new ConfigurationContext(new AxisConfiguration()).createMessageContext();
         PhaseHolder ph = new PhaseHolder(phases);
 
 

Modified: webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/util/ThreadContextMigratorTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/util/ThreadContextMigratorTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/util/ThreadContextMigratorTest.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/test/org/apache/axis2/util/ThreadContextMigratorTest.java
Sat May  5 09:16:25 2007
@@ -19,7 +19,6 @@
 import junit.framework.TestCase;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.ConfigurationContext;
-import org.apache.axis2.context.ContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.AxisConfiguration;
 
@@ -29,8 +28,7 @@
     private MessageContext messageContext;
 
     public void setUp() {
-        messageContext = ContextFactory.createMessageContext(
-                new ConfigurationContext(new AxisConfiguration()));
+        messageContext = new ConfigurationContext(new AxisConfiguration()).createMessageContext();
     }
 
     public void testEmptyMigratorStructure()

Modified: webservices/axis2/trunk/java/modules/scripting/test/org/apache/axis2/scripting/ScriptReceiverTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/scripting/test/org/apache/axis2/scripting/ScriptReceiverTest.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/scripting/test/org/apache/axis2/scripting/ScriptReceiverTest.java
(original)
+++ webservices/axis2/trunk/java/modules/scripting/test/org/apache/axis2/scripting/ScriptReceiverTest.java
Sat May  5 09:16:25 2007
@@ -8,20 +8,19 @@
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.Parameter;
-import org.apache.axis2.engine.AxisConfiguration;
 
 public class ScriptReceiverTest extends TestCase {
     
     public void testInvokeBusinessLogic() throws AxisFault {
         ScriptReceiver scriptReceiver = new ScriptReceiver();
         MessageContext inMC = TestUtils.createMockMessageContext("<a>petra</a>");
-        AxisService axisServce = new AxisService();
-        axisServce.setParent(new AxisServiceGroup(new AxisConfiguration()));
-        axisServce.addParameter(new Parameter(ScriptReceiver.SCRIPT_ATTR, "foo.js"));
-        axisServce.addParameter(new Parameter(ScriptReceiver.SCRIPT_SRC_PROP, "function invoke(inMC,outMC)
{outMC.setPayloadXML(<a>petra</a>) }"));
-        inMC.setAxisService(axisServce);
+        AxisService axisService = inMC.getAxisService();
+        axisService.addParameter(new Parameter(ScriptReceiver.SCRIPT_ATTR, "foo.js"));
+        axisService.addParameter(new Parameter(ScriptReceiver.SCRIPT_SRC_PROP,
+                                               "function invoke(inMC,outMC) " +
+                                                       "{outMC.setPayloadXML(<a>petra</a>)
}"));
+        inMC.setAxisService(axisService);
         scriptReceiver.invokeBusinessLogic(inMC, inMC);
         Iterator iterator = inMC.getEnvelope().getChildElements();
         iterator.next();
@@ -31,11 +30,11 @@
     public void testAxisService() throws AxisFault {
         ScriptReceiver scriptReceiver = new ScriptReceiver();
         MessageContext inMC = TestUtils.createMockMessageContext("<a>petra</a>");
-        AxisService axisServce = new AxisService();
-        axisServce.setParent(new AxisServiceGroup(new AxisConfiguration()));
-        axisServce.addParameter(new Parameter(ScriptReceiver.SCRIPT_ATTR, "foo.js"));
-        axisServce.addParameter(new Parameter(ScriptReceiver.SCRIPT_SRC_PROP, "var scope
= _AxisService.getScope();function invoke(inMC,outMC) {outMC.setPayloadXML(<a>{scope}</a>)
}"));
-        inMC.setAxisService(axisServce);
+        AxisService axisService = inMC.getAxisService();
+        axisService.addParameter(new Parameter(ScriptReceiver.SCRIPT_ATTR, "foo.js"));
+        axisService.addParameter(ScriptReceiver.SCRIPT_SRC_PROP,
+                                "var scope = _AxisService.getScope();function invoke(inMC,outMC)
" +
+                                        "{outMC.setPayloadXML(<a>{scope}</a>)
}");
         scriptReceiver.invokeBusinessLogic(inMC, inMC);
         Iterator iterator = inMC.getEnvelope().getChildElements();
         iterator.next();

Modified: webservices/axis2/trunk/java/modules/scripting/test/org/apache/axis2/scripting/TestUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/scripting/test/org/apache/axis2/scripting/TestUtils.java?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/scripting/test/org/apache/axis2/scripting/TestUtils.java
(original)
+++ webservices/axis2/trunk/java/modules/scripting/test/org/apache/axis2/scripting/TestUtils.java
Sat May  5 09:16:25 2007
@@ -31,11 +31,13 @@
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.context.ServiceContext;
 import org.apache.axis2.context.ServiceGroupContext;
+import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.AxisServiceGroup;
 
 public class TestUtils {
 
@@ -44,8 +46,7 @@
 
             XMLStreamReader reader = XMLInputFactory.newInstance().createXMLStreamReader(new
StringReader(xml));
             StAXOMBuilder builder = new StAXOMBuilder(reader);
-            OMElement omElement = builder.getDocumentElement();
-            return omElement;
+            return builder.getDocumentElement();
 
         } catch (XMLStreamException e) {
             throw new RuntimeException(e);
@@ -59,9 +60,17 @@
         omDoc.addChild(envelope);
         envelope.getBody().addChild(TestUtils.createOMElement(payload));
         inMC.setEnvelope(envelope);
+        AxisConfiguration axisConfig = new AxisConfiguration();
         AxisService as = new AxisService();
-        as.addParameter(new Parameter("script.js", "function invoke(inMC, outMC) { outMC.setPayloadXML("
+ payload + ")}"));
-        inMC.setServiceContext(new ServiceContext(as, new ServiceGroupContext(null, null)));
+        AxisServiceGroup asg = new AxisServiceGroup(axisConfig);
+        asg.addService(as);
+        as.addParameter(new Parameter("script.js",
+                                      "function invoke(inMC, outMC) { outMC.setPayloadXML("
+
+                                              payload + ")}"));
+        ConfigurationContext cfgCtx = new ConfigurationContext(axisConfig);
+        ServiceGroupContext sgc = cfgCtx.createServiceGroupContext(asg);
+        inMC.setAxisService(as);
+        inMC.setServiceContext(sgc.getServiceContext(as));
         return inMC;
     }
 }

Modified: webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp?view=diff&rev=535544&r1=535543&r2=535544
==============================================================================
--- webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp
(original)
+++ webservices/axis2/trunk/java/modules/webapp/src/main/webapp/axis2-web/viewServiceContext.jsp
Sat May  5 09:16:25 2007
@@ -6,7 +6,6 @@
 <%@ page import="java.util.Hashtable" %>
 <%@ page import="java.util.Iterator" %>
 <%@ page import="java.util.Map" %>
-<%@ page import="org.apache.axis2.context.ContextFactory" %>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <%
  /*
@@ -37,7 +36,7 @@
     String ID = request.getParameter("ID");
     ServiceGroupContext sgContext = (ServiceGroupContext) serviceGroupContextsMap.get(sgID);
     AxisService service = sgContext.getDescription().getService(ID);
-    ServiceContext serviceContext = ContextFactory.createServiceContext(sgContext,service);
+    ServiceContext serviceContext = sgContext.getServiceContext(service);
     if (sgID != null && serviceContext != null) {
         if (type != null) {
             if ("VIEW".equals(type)) {



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