axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r439272 - in /webservices/axis2/trunk/java/modules: integration/test/org/apache/axis2/addressing/ integration/test/org/apache/axis2/deployment/ integration/test/org/apache/axis2/engine/ integration/test/org/apache/axis2/mtom/ integration/te...
Date Fri, 01 Sep 2006 11:28:14 GMT
Author: deepal
Date: Fri Sep  1 04:28:13 2006
New Revision: 439272

URL: http://svn.apache.org/viewvc?rev=439272&view=rev
Log:
fixing 1100

Modified:
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/addressing/AddressingServiceTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/deployment/TargetResolverServiceTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFaultReportTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/addressing/AddressingServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/addressing/AddressingServiceTest.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/addressing/AddressingServiceTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/addressing/AddressingServiceTest.java
Fri Sep  1 04:28:13 2006
@@ -1,10 +1,7 @@
 package org.apache.axis2.addressing;
 
-import javax.xml.namespace.QName;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
@@ -17,23 +14,18 @@
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.InOnlyAxisOperation;
-import org.apache.axis2.description.OutOnlyAxisOperation;
-import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.engine.util.TestConstants;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.integration.UtilServerBasedTestCase;
-import org.apache.axis2.receivers.AbstractMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.util.Utils;
 import org.apache.axis2.wsdl.WSDLConstants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
 /*
 * Copyright 2004,2005,2006 The Apache Software Foundation.
 *
@@ -54,7 +46,6 @@
 
 public class AddressingServiceTest extends UtilServerBasedTestCase implements TestConstants
{
 
-	private static final Log log = LogFactory.getLog(AddressingServiceTest.class);
     protected QName transportName = new QName("http://localhost/my",
             "NullTransport");
     EndpointReference targetEPR = new EndpointReference(
@@ -62,10 +53,10 @@
 
     EndpointReference replyTo = new EndpointReference(
             "http://127.0.0.1:" + (UtilServer.TESTING_PORT) + "/axis2/services/RedirectReceiverService/echoOMElementResponse");
-    
+
     EndpointReference faultTo = new EndpointReference(
             "http://127.0.0.1:" + (UtilServer.TESTING_PORT) + "/axis2/services/RedirectReceiverService/fault");
-    
+
     protected AxisConfiguration engineRegistry;
     protected MessageContext mc;
     protected ServiceContext serviceContext;
@@ -82,58 +73,58 @@
                 Echo.class.getName(),
                 operationName);
         UtilServer.deployService(echoService);
-        
+
         rrService = createRedirectReceiverService();
         UtilServer.deployService(rrService);
     }
-    
+
     AxisService createRedirectReceiverService() throws AxisFault {
         AxisService service = new AxisService("RedirectReceiverService");
-        
+
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_CLASS, RedirectReceiver.class.getName()));
-        
+        service.addParameter(new Parameter(Constants.SERVICE_CLASS, RedirectReceiver.class.getName()));
+
         AxisOperation axisOp = new InOnlyAxisOperation(new QName("echoOMElementResponse"));
-        
+
         axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
         axisOp.setStyle(WSDLConstants.STYLE_RPC);
         service.addOperation(axisOp);
         service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "echoOMElementResponse",
axisOp);
-        
+
         AxisOperation axisOp2 = new InOnlyAxisOperation(new QName("fault"));
-        
+
         axisOp2.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
         axisOp2.setStyle(WSDLConstants.STYLE_RPC);
         service.addOperation(axisOp2);
         service.mapActionToOperation(Constants.AXIS2_NAMESPACE_URI + "/" + "fault", axisOp2);
-        
+
         return service;
     }
-    
+
     protected void tearDown() throws Exception {
         UtilServer.unDeployService(serviceName);
         UtilServer.unDeployService(new QName("RedirectReceiverService"));
         UtilServer.unDeployClientService();
     }
-    
+
     public static AxisService createSimpleOneWayServiceforClient(QName serviceName,
-            String className,
-            QName opName)
-    throws AxisFault {
+                                                                 String className,
+                                                                 QName opName)
+            throws AxisFault {
         AxisService service = new AxisService(serviceName.getLocalPart());
-        
+
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_CLASS, className));
-        
+        service.addParameter(new Parameter(Constants.SERVICE_CLASS, className));
+
         AxisOperation axisOp = new OutOnlyAxisOperation(opName);
-        
+
         axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
         axisOp.setStyle(WSDLConstants.STYLE_RPC);
         service.addOperation(axisOp);
-        
+
         return service;
     }
-    
+
     public void testEchoToReplyTo() throws Exception {
         OMElement method = createEchoOMElement("this message should not cause a fault.");
         ServiceClient sender = null;
@@ -179,8 +170,8 @@
                 sender.finalizeInvoke();
         }
     }
-    
-    private OMElement createEchoOMElement(String text){
+
+    private OMElement createEchoOMElement(String text) {
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
         OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
@@ -188,20 +179,20 @@
         OMElement value = fac.createOMElement("myValue", omNs);
         value.setText(text);
         method.addChild(value);
-        
+
         return method;
     }
-    
-    private ServiceClient createServiceClient() throws AxisFault{
+
+    private ServiceClient createServiceClient() throws AxisFault {
         AxisService service =
-            createSimpleOneWayServiceforClient(serviceName,
+                createSimpleOneWayServiceforClient(serviceName,
                         Echo.class.getName(),
                         operationName);
 
         ConfigurationContext configcontext = UtilServer.createClientConfigurationContext();
 
-        ServiceClient sender = null;
-        
+        ServiceClient sender;
+
         Options options = new Options();
         options.setTo(targetEPR);
         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
@@ -212,11 +203,11 @@
         sender = new ServiceClient(configcontext, service);
         sender.setOptions(options);
         sender.engageModule(new QName("addressing"));
-        
+
         return sender;
     }
-    
-    public void testUsingAddressingRequired() throws Exception{
+
+    public void testUsingAddressingRequired() throws Exception {
         echoService.setWSAddressingFlag("required");
 
         OMElement method = createEchoOMElement("this message should cause a fault.");
@@ -224,27 +215,27 @@
 
         try {
             sender = createNoAddressingServiceClient();
-            try{
-                sender.sendReceive(operationName,method);
+            try {
+                sender.sendReceive(operationName, method);
                 fail("Should have received a specific fault");
-            }catch(AxisFault af){
+            } catch (AxisFault af) {
                 af.printStackTrace();
                 assertEquals(Final.FAULT_ADDRESSING_HEADER_REQUIRED_REASON, af.getMessage());
             }
-        }finally {
+        } finally {
             if (sender != null)
                 sender.finalizeInvoke();
         }
     }
 
-    private ServiceClient createNoAddressingServiceClient() throws AxisFault{
+    private ServiceClient createNoAddressingServiceClient() throws AxisFault {
         AxisService service =
-            Utils.createSimpleServiceforClient(serviceName,
-                    Echo.class.getName(),
-                    operationName);
+                Utils.createSimpleServiceforClient(serviceName,
+                        Echo.class.getName(),
+                        operationName);
 
         ConfigurationContext configcontext = UtilServer.createClientConfigurationContext();
-        ServiceClient sender = null;
+        ServiceClient sender;
 
         Options options = new Options();
         options.setTo(targetEPR);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/deployment/TargetResolverServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/deployment/TargetResolverServiceTest.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/deployment/TargetResolverServiceTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/deployment/TargetResolverServiceTest.java
Fri Sep  1 04:28:13 2006
@@ -18,11 +18,8 @@
 
 package org.apache.axis2.deployment;
 
-import javax.xml.namespace.QName;
-
 import junit.framework.Test;
 import junit.framework.TestSuite;
-
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
@@ -44,28 +41,26 @@
 import org.apache.axis2.engine.util.TestConstants;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.integration.UtilServerBasedTestCase;
-import org.apache.axis2.receivers.AbstractMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.util.Utils;
 import org.apache.axis2.wsdl.WSDLConstants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
+import javax.xml.namespace.QName;
 
 
 public class TargetResolverServiceTest extends UtilServerBasedTestCase implements TestConstants
{
 
-	private static final Log log = LogFactory.getLog(TargetResolverServiceTest.class);
     protected QName transportName = new QName("http://localhost/my",
             "NullTransport");
-    
+
     // 2 special urls that the TestTargetResolver will modify into ones that can be targeted
     EndpointReference targetEPR = new EndpointReference(
             "trtest://" + (UtilServer.TESTING_PORT) + "/axis2/services/EchoXMLService/echoOMElement");
 
     EndpointReference replyTo = new EndpointReference(
             "http://ws.apache.org/new/anonymous/address");
-    
+
     protected AxisConfiguration engineRegistry;
     protected MessageContext mc;
     protected ServiceContext serviceContext;
@@ -73,7 +68,7 @@
     protected AxisService rrService;
 
     public static Test suite() {
-        return getTestSetup2(new TestSuite(TargetResolverServiceTest.class),Constants.TESTING_PATH+"deployment_repo");
+        return getTestSetup2(new TestSuite(TargetResolverServiceTest.class), Constants.TESTING_PATH
+ "deployment_repo");
     }
 
     protected void setUp() throws Exception {
@@ -83,30 +78,30 @@
                 operationName);
         UtilServer.deployService(echoService);
     }
-    
+
     protected void tearDown() throws Exception {
         UtilServer.unDeployService(serviceName);
         UtilServer.unDeployClientService();
     }
-    
+
     public static AxisService createSimpleServiceforClient(QName serviceName,
-            String className,
-            QName opName)
-    throws AxisFault {
+                                                           String className,
+                                                           QName opName)
+            throws AxisFault {
         AxisService service = new AxisService(serviceName.getLocalPart());
-        
+
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_CLASS, className));
-        
+        service.addParameter(new Parameter(Constants.SERVICE_CLASS, className));
+
         AxisOperation axisOp = new OutInAxisOperation(opName);
-        
+
         axisOp.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
         axisOp.setStyle(WSDLConstants.STYLE_RPC);
         service.addOperation(axisOp);
-        
+
         return service;
     }
-    
+
     public void testEchoToReplyTo() throws Exception {
         OMElement method = createEchoOMElement("this message should not cause a fault.");
         ServiceClient sender = null;
@@ -119,8 +114,8 @@
                 sender.finalizeInvoke();
         }
     }
-    
-    private OMElement createEchoOMElement(String text){
+
+    private OMElement createEchoOMElement(String text) {
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
         OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
@@ -128,19 +123,19 @@
         OMElement value = fac.createOMElement("myValue", omNs);
         value.setText(text);
         method.addChild(value);
-        
+
         return method;
     }
-    
-    private ServiceClient createServiceClient() throws AxisFault{
+
+    private ServiceClient createServiceClient() throws AxisFault {
         AxisService service =
-            createSimpleServiceforClient(serviceName,
+                createSimpleServiceforClient(serviceName,
                         Echo.class.getName(),
                         operationName);
 
-        ConfigurationContext configcontext = UtilServer.createClientConfigurationContext(Constants.TESTING_PATH+"deployment_repo");
-        ServiceClient sender = null;
-        
+        ConfigurationContext configcontext = UtilServer.createClientConfigurationContext(Constants.TESTING_PATH
+ "deployment_repo");
+        ServiceClient sender ;
+
         Options options = new Options();
         options.setTo(targetEPR);
         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
@@ -150,7 +145,7 @@
         sender = new ServiceClient(configcontext, service);
         sender.setOptions(options);
         sender.engageModule(new QName("addressing"));
-        
+
         return sender;
     }
 }

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
Fri Sep  1 04:28:13 2006
@@ -23,26 +23,18 @@
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axis2.Constants;
-import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
-import org.apache.axis2.description.AxisOperation;
-import org.apache.axis2.description.AxisService;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.InOnlyAxisOperation;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.util.TestConstants;
-import org.apache.axis2.receivers.AbstractMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
+import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.transport.local.LocalTransportReceiver;
 import org.apache.axis2.transport.local.LocalTransportSender;
-import org.apache.axis2.transport.TransportListener;
 
 import javax.xml.namespace.QName;
 
@@ -95,21 +87,21 @@
         dispatchPhase.addHandler(id);
         config.getGlobalInFlow().add(dispatchPhase);
         TransportInDescription tIn = new TransportInDescription(new QName(Constants.TRANSPORT_LOCAL));
-        tIn.setReceiver(new TransportListener(){
+        tIn.setReceiver(new TransportListener() {
 
-            public void init(ConfigurationContext axisConf, TransportInDescription transprtIn)
throws AxisFault {
+            public void init(ConfigurationContext axisConf, TransportInDescription transprtIn)
{
                 //To change body of implemented methods use File | Settings | File Templates.
             }
 
-            public void start() throws AxisFault {
+            public void start() {
                 //To change body of implemented methods use File | Settings | File Templates.
             }
 
-            public void stop() throws AxisFault {
+            public void stop() {
                 //To change body of implemented methods use File | Settings | File Templates.
             }
 
-            public EndpointReference getEPRForService(String serviceName, String ip) throws
AxisFault {
+            public EndpointReference getEPRForService(String serviceName, String ip) {
                 return null;  //To change body of implemented methods use File | Settings
| File Templates.
             }
         });
@@ -124,7 +116,7 @@
 
         AxisService service = new AxisService(serviceName.getLocalPart());
         service.addParameter(
-                new Parameter(AbstractMessageReceiver.SERVICE_CLASS,
+                new Parameter(Constants.SERVICE_CLASS,
                         MessageContextEnabledEcho.class.getName()));
         AxisOperation axisOperation = new InOnlyAxisOperation(
                 operationName);
@@ -154,7 +146,7 @@
         OMElement payload = createEnvelope();
 
         ConfigurationContext configContext =
-                ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo",null);
+                ConfigurationContextFactory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo",
null);
         ServiceClient sender = new ServiceClient(configContext, null);
         Options options = new Options();
         sender.setOptions(options);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFaultReportTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFaultReportTest.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFaultReportTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mtom/EchoRawMTOMFaultReportTest.java
Fri Sep  1 04:28:13 2006
@@ -16,9 +16,8 @@
 
 package org.apache.axis2.mtom;
 
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
 import junit.framework.Test;
+import junit.framework.TestSuite;
 import org.apache.axis2.Constants;
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
@@ -26,7 +25,6 @@
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.integration.UtilServerBasedTestCase;
-import org.apache.axis2.receivers.AbstractMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.swa.EchoRawSwATest;
 import org.apache.axis2.wsdl.WSDLConstants;
@@ -43,8 +41,6 @@
 
 public class EchoRawMTOMFaultReportTest extends UtilServerBasedTestCase {
 
-	private static final Log log = LogFactory.getLog(EchoRawMTOMFaultReportTest.class);
-
     private QName serviceName = new QName("EchoService");
 
     private QName operationName = new QName("mtomSample");
@@ -58,14 +54,14 @@
     }
 
     public static Test suite() {
-        return getTestSetup2(new TestSuite(EchoRawMTOMFaultReportTest.class),Constants.TESTING_PATH
+ "MTOM-enabledRepository");
+        return getTestSetup2(new TestSuite(EchoRawMTOMFaultReportTest.class), Constants.TESTING_PATH
+ "MTOM-enabledRepository");
     }
 
 
     protected void setUp() throws Exception {
         AxisService service = new AxisService(serviceName.getLocalPart());
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_CLASS,
+        service.addParameter(new Parameter(Constants.SERVICE_CLASS,
                 EchoService.class.getName()));
 
         AxisOperation axisOp = new OutInAxisOperation(operationName);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/spring/SpringServiceTest.java
Fri Sep  1 04:28:13 2006
@@ -130,7 +130,7 @@
         AxisService service = new AxisService(springServiceName.getLocalPart());
 
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_OBJECT_SUPPLIER,
supplierName));
+        service.addParameter(new Parameter(Constants.SERVICE_OBJECT_SUPPLIER, supplierName));
         service.addParameter(new Parameter(SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME,
beanName));
 
         AxisOperation axisOp = new InOutAxisOperation(opName);
@@ -152,7 +152,7 @@
         AxisService service = new AxisService(springServiceName.getLocalPart());
 
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_OBJECT_SUPPLIER,
supplierName));
+        service.addParameter(new Parameter(Constants.SERVICE_OBJECT_SUPPLIER, supplierName));
         service.addParameter(new Parameter(SpringAppContextAwareObjectSupplier.SERVICE_SPRING_BEANNAME,
beanName));
 
         AxisOperation axisOp = new OutInAxisOperation(opName);

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/swa/EchoRawSwATest.java
Fri Sep  1 04:28:13 2006
@@ -16,21 +16,17 @@
 
 package org.apache.axis2.swa;
 
-import junit.framework.TestCase;
 import junit.framework.Test;
 import junit.framework.TestSuite;
-import org.apache.axiom.om.OMText;
-import org.apache.axiom.om.impl.llom.OMTextImpl;
 import org.apache.axis2.Constants;
-import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.description.*;
+import org.apache.axis2.description.AxisOperation;
+import org.apache.axis2.description.AxisService;
+import org.apache.axis2.description.InOutAxisOperation;
+import org.apache.axis2.description.Parameter;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.axis2.integration.UtilServerBasedTestCase;
-import org.apache.axis2.receivers.AbstractMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.wsdl.WSDLConstants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 import java.io.BufferedReader;
@@ -42,18 +38,10 @@
 
 public class EchoRawSwATest extends UtilServerBasedTestCase {
 
-	private static final Log log = LogFactory.getLog(EchoRawSwATest.class);
-
     private QName serviceName = new QName("EchoSwAService");
 
     private QName operationName = new QName("echoAttachment");
 
-    private ServiceContext serviceContext;
-
-    private boolean finish = false;
-
-    private OMTextImpl expectedTextData;
-
     public EchoRawSwATest() {
         super(EchoRawSwATest.class.getName());
     }
@@ -64,14 +52,14 @@
 
     public static Test suite() {
         return getTestSetup2(new TestSuite(EchoRawSwATest.class),
-                             Constants.TESTING_PATH + "MTOM-enabledRepository");
+                Constants.TESTING_PATH + "MTOM-enabledRepository");
     }
 
     protected void setUp() throws Exception {
         AxisService service = new AxisService(serviceName.getLocalPart());
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
         service.addParameter(new Parameter(
-                AbstractMessageReceiver.SERVICE_CLASS, EchoSwA.class
+                Constants.SERVICE_CLASS, EchoSwA.class
                 .getName()));
         AxisOperation axisOp = new InOutAxisOperation(operationName);
         axisOp.setMessageReceiver(new RawXMLINOutMessageReceiver());
@@ -88,7 +76,7 @@
     public void testEchoXMLSync() throws Exception {
         Socket socket = new Socket("127.0.0.1", 5555);
         OutputStream outStream = socket.getOutputStream();
-        InputStream inStream = socket.getInputStream();
+        socket.getInputStream();
         InputStream requestMsgInStream = getResourceAsStream("/org/apache/axis2/swa/swainput.bin");
         int data;
         while ((data = requestMsgInStream.read()) != -1) {
@@ -119,9 +107,5 @@
         return this.getClass().getResourceAsStream(path);
     }
 
-    private void compareWithCreatedOMText(OMText actualTextData) {
-        String originalTextValue = expectedTextData.getText();
-        String returnedTextValue = actualTextData.getText();
-        TestCase.assertEquals(returnedTextValue, originalTextValue);
-    }
+
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/Constants.java Fri Sep
 1 04:28:13 2006
@@ -105,6 +105,7 @@
 
     //Parameter name of Service impl class
     public static final String SERVICE_CLASS = "ServiceClass";
+    public static final String SERVICE_OBJECT_SUPPLIER = "ServiceObjectSupplier";
 
     /**
      * Field REQUEST_URL_PREFIX

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
Fri Sep  1 04:28:13 2006
@@ -18,6 +18,7 @@
 package org.apache.axis2.engine;
 
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.OperationContext;
 import org.apache.axis2.context.ServiceContext;
@@ -26,7 +27,6 @@
 import org.apache.axis2.description.AxisServiceGroup;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.i18n.Messages;
-import org.apache.axis2.receivers.AbstractMessageReceiver;
 
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
@@ -126,7 +126,7 @@
             ServiceContext serviceContext = serviceGroupContext.getServiceContext(axisService);
             AxisService service = serviceContext.getAxisService();
             ClassLoader classLoader = service.getClassLoader();
-            Parameter implInfoParam = service.getParameter(AbstractMessageReceiver.SERVICE_CLASS);
+            Parameter implInfoParam = service.getParameter(Constants.SERVICE_CLASS);
             if (implInfoParam != null) {
                 try {
                     Class implClass = Class.forName(((String) implInfoParam.getValue()).trim(),
true,
@@ -149,7 +149,7 @@
     public static void startService(AxisService axisService,
                                     ConfigurationContext configCtx) {
         ClassLoader classLoader = axisService.getClassLoader();
-        Parameter implInfoParam = axisService.getParameter(AbstractMessageReceiver.SERVICE_CLASS);
+        Parameter implInfoParam = axisService.getParameter(Constants.SERVICE_CLASS);
         if (implInfoParam != null) {
             try {
                 Class implClass = Class.forName(((String) implInfoParam.getValue()).trim(),
true,

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Handler.java Fri
Sep  1 04:28:13 2006
@@ -23,7 +23,6 @@
 import org.apache.axis2.description.Parameter;
 
 import javax.xml.namespace.QName;
-import java.io.Serializable;
 
 /**
  * Interface Handler
@@ -32,10 +31,8 @@
 
     /**
      * Method cleanup.
-     *
-     * @throws AxisFault
      */
-    public void cleanup() throws AxisFault;
+    public void cleanup();
 
     /**
      * Method init.

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/Phase.java Fri
Sep  1 04:28:13 2006
@@ -187,7 +187,7 @@
         // Default version does nothing
     }
 
-    public void cleanup() throws AxisFault {
+    public void cleanup() {
 
         // Default version does nothing
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/handlers/AbstractHandler.java
Fri Sep  1 04:28:13 2006
@@ -17,7 +17,6 @@
 
 package org.apache.axis2.handlers;
 
-import org.apache.axis2.AxisFault;
 import org.apache.axis2.description.HandlerDescription;
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.engine.Handler;
@@ -49,10 +48,8 @@
 
     /**
      * Method cleanup.
-     *
-     * @throws AxisFault
      */
-    public void cleanup() throws AxisFault {
+    public void cleanup() {
     }
 
     /**

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/receivers/AbstractMessageReceiver.java
Fri Sep  1 04:28:13 2006
@@ -22,6 +22,7 @@
 import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axiom.soap.SOAPFactory;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.util.MultiParentClassLoader;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
@@ -35,8 +36,8 @@
 import java.net.URL;
 
 public abstract class AbstractMessageReceiver implements MessageReceiver {
-    public static final String SERVICE_CLASS = "ServiceClass";
-    public static final String SERVICE_OBJECT_SUPPLIER = "ServiceObjectSupplier";
+//    public static final String SERVICE_CLASS = "ServiceClass";
+//    public static final String SERVICE_OBJECT_SUPPLIER = "ServiceObjectSupplier";
     public static final String SCOPE = "scope";
 
     protected void saveTCCL(MessageContext msgContext) {
@@ -71,9 +72,9 @@
             ClassLoader classLoader = service.getClassLoader();
 
             // allow alternative definition of makeNewServiceObject
-            if (service.getParameter(SERVICE_OBJECT_SUPPLIER) != null) {
+            if (service.getParameter(Constants.SERVICE_OBJECT_SUPPLIER) != null) {
                 Parameter serviceObjectParam =
-                        service.getParameter(SERVICE_OBJECT_SUPPLIER);
+                        service.getParameter(Constants.SERVICE_OBJECT_SUPPLIER);
                 Class serviceObjectMaker = Class.forName(((String)
                         serviceObjectParam.getValue()).trim(), true, classLoader);
 
@@ -85,7 +86,7 @@
                     return method.invoke(null, new Object[] { msgContext });
             }
 
-            Parameter implInfoParam = service.getParameter(SERVICE_CLASS);
+            Parameter implInfoParam = service.getParameter(Constants.SERVICE_CLASS);
             if (implInfoParam != null) {
                 Class implClass = Class.forName(((String) implInfoParam.getValue()).trim(),
true,
                         classLoader);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java Fri Sep
 1 04:28:13 2006
@@ -32,7 +32,6 @@
 import org.apache.axis2.engine.Handler;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.i18n.Messages;
-import org.apache.axis2.receivers.AbstractMessageReceiver;
 import org.apache.axis2.receivers.RawXMLINOutMessageReceiver;
 import org.apache.axis2.wsdl.WSDLConstants;
 
@@ -157,7 +156,7 @@
         AxisService service = new AxisService(serviceName.getLocalPart());
 
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_CLASS, className));
+        service.addParameter(new Parameter(Constants.SERVICE_CLASS, className));
 
         AxisOperation axisOp = new InOutAxisOperation(opName);
 
@@ -177,7 +176,7 @@
         AxisService service = new AxisService(serviceName.getLocalPart());
 
         service.setClassLoader(Thread.currentThread().getContextClassLoader());
-        service.addParameter(new Parameter(AbstractMessageReceiver.SERVICE_CLASS, className));
+        service.addParameter(new Parameter(Constants.SERVICE_CLASS, className));
 
         AxisOperation axisOp = new OutInAxisOperation(opName);
 

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java?rev=439272&r1=439271&r2=439272&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/handler/WSDoAllHandler.java
Fri Sep  1 04:28:13 2006
@@ -22,7 +22,6 @@
 import org.apache.axis2.description.Parameter;
 import org.apache.axis2.engine.Handler;
 import org.apache.rampart.util.Axis2Util;
-import org.apache.ws.security.handler.RequestData;
 import org.apache.ws.security.handler.WSHandler;
 
 import javax.xml.namespace.QName;
@@ -39,23 +38,23 @@
             new HandlerDescription(new QName("deafult Handler"));
 
     private final static String WSS_PASSWORD = "password";
-    
+
     private final static String WSS_USERNAME = "username";
-    
+
     /**
      * Field handlerDesc
      */
     protected HandlerDescription handlerDesc;
-    
+
     /**
      * In Axis2, the user cannot set inflow and outflow parameters.
-     * Therefore, we need to map the Axis2 specific inflow and outflow 
+     * Therefore, we need to map the Axis2 specific inflow and outflow
      * parameters to WSS4J params,
-     * 
+     * <p/>
      * Knowledge of inhandler and out handler is used to get the mapped value.
      */
     protected boolean inHandler;
-    
+
     /**
      * Constructor AbstractHandler.
      */
@@ -64,18 +63,18 @@
     }
 
     public abstract void processMessage(MessageContext msgContext) throws AxisFault;
-    
+
     /* (non-Javadoc)
-     * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext)
-     */
+    * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext)
+    */
     public void invoke(MessageContext msgContext) throws AxisFault {
         //If the security module is not engaged for this service
         //do not do any processing
-        if(msgContext.isEngaged(new QName(WSSHandlerConstants.SECURITY_MODULE_NAME))) {
+        if (msgContext.isEngaged(new QName(WSSHandlerConstants.SECURITY_MODULE_NAME))) {
             this.processMessage(msgContext);
         }
     }
-    
+
     /**
      * Method getName.
      *
@@ -87,10 +86,8 @@
 
     /**
      * Method cleanup.
-     *
-     * @throws org.apache.axis2.AxisFault
      */
-    public void cleanup() throws AxisFault {
+    public void cleanup() {
     }
 
     /**
@@ -131,15 +128,15 @@
 
 
     public Object getProperty(Object msgContext, String axisKey) {
-    	
-    	int repetition = getCurrentRepetition(msgContext);
-    	
-    	String key = Axis2Util.getKey(axisKey,inHandler, repetition);
-        Object property = ((MessageContext)msgContext).getProperty(key);
-        if(property == null) {
+
+        int repetition = getCurrentRepetition(msgContext);
+
+        String key = Axis2Util.getKey(axisKey, inHandler, repetition);
+        Object property = ((MessageContext) msgContext).getProperty(key);
+        if (property == null) {
             //Try the description hierarchy
-            Parameter parameter = ((MessageContext)msgContext).getParameter(key);
-            if(parameter != null) {
+            Parameter parameter = ((MessageContext) msgContext).getParameter(key);
+            if (parameter != null) {
                 property = parameter.getValue();
             }
         }
@@ -148,60 +145,62 @@
 
     /**
      * Returns the repetition number from the message context
+     *
      * @param msgContext
      * @return Returns int.
      */
-	protected int getCurrentRepetition(Object msgContext) {
-		//get the repetition from the message context
-    	int repetition = 0;
-    	if(!inHandler) {//We only need to repete the out handler
-    		Integer count = (Integer)((MessageContext)msgContext).getProperty(WSSHandlerConstants.CURRENT_REPETITON);
-    		if(count != null) { //When we are repeting the handler
-    			repetition = count.intValue();
-    		}
-    	}
-		return repetition;
-	}
+    protected int getCurrentRepetition(Object msgContext) {
+        //get the repetition from the message context
+        int repetition = 0;
+        if (!inHandler) {//We only need to repete the out handler
+            Integer count = (Integer) ((MessageContext) msgContext).getProperty(WSSHandlerConstants.CURRENT_REPETITON);
+            if (count != null) { //When we are repeting the handler
+                repetition = count.intValue();
+            }
+        }
+        return repetition;
+    }
 
     public String getPassword(Object msgContext) {
-        return (String)((MessageContext)msgContext).getProperty(WSS_PASSWORD);
+        return (String) ((MessageContext) msgContext).getProperty(WSS_PASSWORD);
     }
 
     public void setPassword(Object msgContext, String password) {
-        ((MessageContext)msgContext).setProperty(WSS_PASSWORD,password);
+        ((MessageContext) msgContext).setProperty(WSS_PASSWORD, password);
     }
-    
+
     public String getUsername(Object msgContext) {
-        return (String)((MessageContext)msgContext).getProperty(WSS_USERNAME);
+        return (String) ((MessageContext) msgContext).getProperty(WSS_USERNAME);
     }
 
     public void setUsername(Object msgContext, String username) {
-        ((MessageContext)msgContext).setProperty(WSS_USERNAME,username);
+        ((MessageContext) msgContext).setProperty(WSS_USERNAME, username);
     }
-    
-	/**
-	 * Gets optoin. Extracts the configuration values from the service.xml 
-	 * and/or axis2.xml. Values set in the service.xml takes prority over 
-	 * values of the axis2.xml
-	 */
+
+    /**
+     * Gets optoin. Extracts the configuration values from the service.xml
+     * and/or axis2.xml. Values set in the service.xml takes prority over
+     * values of the axis2.xml
+     */
     public Object getOption(String axisKey) {
         Parameter parameter = this.handlerDesc.getParameter(axisKey);
-        return (parameter== null)?null:parameter.getValue();
+        return (parameter == null) ? null : parameter.getValue();
     }
 
-	public void setProperty(Object msgContext, String key, Object value) {
-		((MessageContext)msgContext).setProperty(key, value);
-	}
+    public void setProperty(Object msgContext, String key, Object value) {
+        ((MessageContext) msgContext).setProperty(key, value);
+    }
 
     /**
      * Overrides the class loader used to load the PW callback class.
+     *
      * @param msgCtx MessageContext
      * @return Returns class loader.
      */
     public java.lang.ClassLoader getClassLoader(Object msgCtx) {
         try {
-            
-            return ((MessageContext)msgCtx).getAxisService().getClassLoader();
+
+            return ((MessageContext) msgCtx).getAxisService().getClassLoader();
         } catch (Throwable t) {
             return super.getClassLoader(msgCtx);
         }



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