axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject svn commit: r526324 [1/2] - in /webservices/axis2/trunk/java/modules: integration/src/test/interop/whitemesa/ integration/src/test/soap12testing/client/ integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/...
Date Sat, 07 Apr 2007 00:09:51 GMT
Author: gdaniels
Date: Fri Apr  6 17:09:47 2007
New Revision: 526324

URL: http://svn.apache.org/viewvc?view=rev&rev=526324
Log:
* Protect AxisFault(Exception) constructor, to force people to use AxisFault.makeFault(exception) instead - this autoprotects against doubly-wrapped AxisFaults, and can inject other logic too.

* Change all occurrences of new AxisFault(ex) to use makeFault

* Apply patch to jaxws pom (see AXIS2-2483), though this still doesn't fix M2 builds for me.  Dims is working on M2 now.

* Bits and pieces of code cleanup while touching files

* Get rid of empty DefaultHttpServiceProcessor.java file


Removed:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/DefaultHttpServiceProcessor.java
Modified:
    webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/SunClient.java
    webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/WhiteMesaIneterop.java
    webservices/axis2/trunk/java/modules/integration/src/test/soap12testing/client/MessageComparator.java
    webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/MessageContextInjectionTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
    webservices/axis2/trunk/java/modules/jaxws/pom.xml
    webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl
    webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONMessageFormatter.java
    webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONOMBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/ApplicationXMLBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MultipartFormDataBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/SOAPBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAllAxisServicesBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DefaultObjectSupplier.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DependencyManager.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/server/HttpFactory.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/RESTUtil.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/SOAPUtil.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/util/URLTemplatingUtil.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalResponder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportReceiver.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/local/LocalTransportSender.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EMailSender.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/EmailReceiver.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/MailTransportSender.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/MailSorter.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/POP3Server.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/mail/server/SMTPServer.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPServer.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/tcp/TCPTransportSender.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/MessageContextBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/Utils.java
    webservices/axis2/trunk/java/modules/samples/deprecated/groovy/src/sample/groovy/GroovyReceiver.java
    webservices/axis2/trunk/java/modules/scripting/src/org/apache/axis2/scripting/ScriptReceiver.java
    webservices/axis2/trunk/java/modules/scripting/src/org/apache/axis2/scripting/convertors/ConvertorFactory.java

Modified: webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/SunClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/SunClient.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/SunClient.java (original)
+++ webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/SunClient.java Fri Apr  6 17:09:47 2007
@@ -17,7 +17,6 @@
 package test.interop.whitemesa;
 
 import org.apache.axiom.soap.SOAPEnvelope;
-import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.OperationClient;
@@ -35,41 +34,35 @@
 public class SunClient {
 
     public SOAPEnvelope sendMsg(SunClientUtil util, String epUrl, String soapAction)
-            throws AxisFault {
+            throws Exception {
 
         SOAPEnvelope resEnv;
-        URL url;
-        try {
-            url = new URL(epUrl);
-
-            Options options = new Options();
-            options.setProperty(HTTPConstants.CHUNKED, Constants.VALUE_FALSE);
-            options.setTo(new EndpointReference(url.toString()));
-            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
-            options.setAction(soapAction);
-
-            MessageContext messageContext = new MessageContext();
-            SOAPEnvelope requestEnvilope = util.getEchoSoapEnvelope();
-            messageContext.setEnvelope(requestEnvilope);
-
-            ConfigurationContextFactory factory = new ConfigurationContextFactory();
-            ConfigurationContext configContext =
-                    //factory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo", null);
-                    factory.createConfigurationContextFromFileSystem(
-                            "itest-resources/integrationRepo", null);
-            ServiceClient serviceClient = new ServiceClient(configContext, null);
-            serviceClient.setOptions(options);
-            OperationClient opClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
-            opClient.addMessageContext(messageContext);
-            opClient.execute(true);
-            MessageContext responseMCtx =
-                    opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
-
-            resEnv = responseMCtx.getEnvelope();
-
-        } catch (Exception e) {
-            throw new AxisFault(e);
-        }
+        URL url = new URL(epUrl);
+
+        Options options = new Options();
+        options.setProperty(HTTPConstants.CHUNKED, Constants.VALUE_FALSE);
+        options.setTo(new EndpointReference(url.toString()));
+        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+        options.setAction(soapAction);
+
+        MessageContext messageContext = new MessageContext();
+        SOAPEnvelope requestEnvilope = util.getEchoSoapEnvelope();
+        messageContext.setEnvelope(requestEnvilope);
+
+        ConfigurationContext configContext =
+                //factory.createConfigurationContextFromFileSystem("target/test-resources/integrationRepo", null);
+                ConfigurationContextFactory.createConfigurationContextFromFileSystem(
+                        "itest-resources/integrationRepo", null);
+        ServiceClient serviceClient = new ServiceClient(configContext, null);
+        serviceClient.setOptions(options);
+        OperationClient opClient = serviceClient.createClient(ServiceClient.ANON_OUT_IN_OP);
+        opClient.addMessageContext(messageContext);
+        opClient.execute(true);
+        MessageContext responseMCtx =
+                opClient.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+
+        resEnv = responseMCtx.getEnvelope();
+
         return resEnv;
     }
 }

Modified: webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/WhiteMesaIneterop.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/WhiteMesaIneterop.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/WhiteMesaIneterop.java (original)
+++ webservices/axis2/trunk/java/modules/integration/src/test/interop/whitemesa/WhiteMesaIneterop.java Fri Apr  6 17:09:47 2007
@@ -62,7 +62,7 @@
                 }
             }
         } catch (Exception e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -86,7 +86,7 @@
 
             assertEquals(textElem.getText(), WhiteMesaConstants.ECHO_STRING);
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -121,7 +121,7 @@
             assertEquals(itemElem.getText(), WhiteMesaConstants.ECHO_STRING_ARR_3);
 
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -145,7 +145,7 @@
 
             assertEquals(textElem.getText(), WhiteMesaConstants.ECHO_INTEGER);
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -180,7 +180,7 @@
             assertEquals(itemElem.getText(), WhiteMesaConstants.ECHO_INTEGER_ARR_3);
 
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -204,7 +204,7 @@
 
             assertEquals(textElem.getText(), WhiteMesaConstants.ECHO_FLOAT);
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -239,7 +239,7 @@
             assertEquals(itemElem.getText(), WhiteMesaConstants.ECHO_FLOAT_ARR_3);
 
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -279,7 +279,7 @@
             assertEquals(textElem.getText(), WhiteMesaConstants.ECHO_STRUCT_STRING);
 
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -352,7 +352,7 @@
             assertNotNull(varStringElem);
             assertEquals(varStringElem.getText(), WhiteMesaConstants.ECHO_STRUCT_ARRAY_FLOAT_3);
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -389,7 +389,7 @@
 
             assertEquals(textElem.getText(), WhiteMesaConstants.ECHO_BASE_64);
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -414,7 +414,7 @@
             boolean equal = WhiteMesaConstants.ECHO_HEX_BINARY.equalsIgnoreCase(textElem.getText());
             assertTrue(equal);
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -438,7 +438,7 @@
 
             assertEquals(textElem.getText(), WhiteMesaConstants.ECHO_DATE);
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -462,7 +462,7 @@
 
             assertEquals(textElem.getText(), WhiteMesaConstants.ECHO_DECIMAL);
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -486,7 +486,7 @@
 
             assertEquals(textElem.getText(), WhiteMesaConstants.ECHO_BOOLEAN);
         } catch (JaxenException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/integration/src/test/soap12testing/client/MessageComparator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/src/test/soap12testing/client/MessageComparator.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/src/test/soap12testing/client/MessageComparator.java (original)
+++ webservices/axis2/trunk/java/modules/integration/src/test/soap12testing/client/MessageComparator.java Fri Apr  6 17:09:47 2007
@@ -213,7 +213,7 @@
                 state = BEFORE_SEPARATOR;
             }
         } catch (IOException e) {
-            throw new AxisFault(e.getMessage(), e);
+            throw AxisFault.makeFault(e);
         }
 
         return map;
@@ -239,7 +239,7 @@
 
             return str.toString();
         } catch (Exception e) {
-            throw new AxisFault(e.getMessage(), e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/SOAP12Testing/SOAP12TestModuleB/org/apache/axis2/soap12testing/handlers/SOAP12InFlowHandlerDefaultB.java Fri Apr  6 17:09:47 2007
@@ -122,7 +122,7 @@
                                     msgContext.setProperty(SOAP12Constants.SOAP_FAULT_REASON_LOCAL_NAME, reason);
 
                                 } catch (SOAPProcessingException e) {
-                                   throw new AxisFault(e);
+                                   throw AxisFault.makeFault(e);
                                 }
 
                                 headerBlock.discard();

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?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- 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 Apr  6 17:09:47 2007
@@ -134,8 +134,7 @@
         service.addParameter(
                 new Parameter(Constants.SERVICE_CLASS,
                               MessageContextEnabledEcho.class.getName()));
-        AxisOperation axisOperation = new InOnlyAxisOperation(
-                operationName);
+        AxisOperation axisOperation = new InOnlyAxisOperation(operationName);
         axisOperation.setMessageReceiver(new RawXMLINOnlyMessageReceiver());
         service.addOperation(axisOperation);
         service.setClassLoader(Thread.currentThread().getContextClassLoader());

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- 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 Fri Apr  6 17:09:47 2007
@@ -53,30 +53,24 @@
         UtilServer.unDeployClientService();
     }
 
-    public void testWSDLClient() throws AxisFault {
-        try {
-            URL wsdlURL = new URL("http://localhost:" + UtilServer.TESTING_PORT +
-                    "/axis2/services/EchoXMLService?wsdl");
-            ServiceClient serviceClient = new ServiceClient(null, wsdlURL,
-                                                            new QName(
-                                                                    "http://engine.axis2.apache.org/xsd",
-                                                                    "EchoXMLService"),
-                                                            "EchoXMLServiceSOAP11port_http");
-            OMElement payload =
-                    TestingUtils.createDummyOMElement("http://engine.axis2.apache.org/xsd");
-            String epr = "http://127.0.0.1:" + UtilServer.TESTING_PORT +
-                    "/axis2/services/EchoXMLService";
-            //This is not smt we need to do but , my build is fail if I dont do that :)
-            serviceClient.getOptions().setTo(new EndpointReference(epr));
-            System.out.println(serviceClient.getOptions().getTo().getAddress());
-            OMElement response = serviceClient.sendReceive(new QName("", "echoOM"), payload);
-            assertNotNull(response);
-            String textValue = response.getFirstElement().getFirstElement().getText();
-            assertEquals(textValue, "Isaac Asimov, The Foundation Trilogy");
-        } catch (Exception e) {
-            e.printStackTrace();
-            throw new AxisFault(e);
-        }
+    public void testWSDLClient() throws Exception {
+        URL wsdlURL = new URL("http://localhost:" + UtilServer.TESTING_PORT +
+                "/axis2/services/EchoXMLService?wsdl");
+        ServiceClient serviceClient = new ServiceClient(null, wsdlURL,
+                                                        new QName(
+                                                                "http://engine.axis2.apache.org/xsd",
+                                                                "EchoXMLService"),
+                                                        "EchoXMLServiceSOAP11port_http");
+        OMElement payload =
+                TestingUtils.createDummyOMElement("http://engine.axis2.apache.org/xsd");
+        String epr = "http://127.0.0.1:" + UtilServer.TESTING_PORT +
+                "/axis2/services/EchoXMLService";
+        //This is not smt we need to do but , my build is fail if I dont do that :)
+        serviceClient.getOptions().setTo(new EndpointReference(epr));
+        System.out.println(serviceClient.getOptions().getTo().getAddress());
+        OMElement response = serviceClient.sendReceive(new QName("", "echoOM"), payload);
+        assertNotNull(response);
+        String textValue = response.getFirstElement().getFirstElement().getText();
+        assertEquals(textValue, "Isaac Asimov, The Foundation Trilogy");
     }
-
 }

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/integration/UtilServer.java Fri Apr  6 17:09:47 2007
@@ -114,7 +114,7 @@
                 System.out.print("Server started on port "
                         + TESTING_PORT + ".....");
             } catch (Exception e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
 
             try {

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/MultirefTest.java Fri Apr  6 17:09:47 2007
@@ -45,8 +45,6 @@
 import org.apache.axis2.integration.UtilServerBasedTestCase;
 import org.apache.axis2.rpc.client.RPCServiceClient;
 import org.apache.axis2.wsdl.WSDLConstants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 import javax.xml.stream.FactoryConfigurationError;
@@ -61,7 +59,6 @@
             new EndpointReference("http://127.0.0.1:"
                     + (UtilServer.TESTING_PORT)
                     + "/axis2/services/EchoXMLService/concat");
-    private static final Log log = LogFactory.getLog(MultirefTest.class);
     protected QName serviceName = new QName("EchoXMLService");
     protected QName operationName = new QName(NAMESPACE, "concat");
     protected QName transportName = new QName(NAMESPACE,
@@ -299,7 +296,7 @@
     }
 
 
-    public void testMulitrefBean() throws AxisFault {
+    public void testMulitrefBean() throws Exception {
         configureSystem("editBean");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
@@ -320,16 +317,16 @@
 
         String ref1 =
                 "<reference id=\"1\"><name>Deepal</name><value href=\"#2\"/><address href=\"#3\"/></reference>";
-        OMElement om1 = getOMelemnt(ref1, fac);
+        OMElement om1 = getOMElement(ref1, fac);
         envelope.getBody().addChild(om1);
         String ref2 = "<reference id=\"2\">false</reference>";
-        OMElement om2 = getOMelemnt(ref2, fac);
+        OMElement om2 = getOMElement(ref2, fac);
         envelope.getBody().addChild(om2);
         String ref3 = "<reference id=\"3\"><town href=\"#4\"/><number>1010</number></reference>";
-        OMElement om3 = getOMelemnt(ref3, fac);
+        OMElement om3 = getOMElement(ref3, fac);
         envelope.getBody().addChild(om3);
         String ref4 = "<reference id=\"4\">Colombo3</reference>";
-        OMElement om4 = getOMelemnt(ref4, fac);
+        OMElement om4 = getOMElement(ref4, fac);
         envelope.getBody().addChild(om4);
 
         Options options = new Options();
@@ -361,7 +358,7 @@
     }
 
 
-    public void testbeanOM() throws AxisFault {
+    public void testbeanOM() throws Exception {
         configureSystem("beanOM");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
@@ -382,16 +379,16 @@
 
         String ref1 =
                 "<reference id=\"1\"><name>Deepal</name><value href=\"#2\"/><address href=\"#3\"/></reference>";
-        OMElement om1 = getOMelemnt(ref1, fac);
+        OMElement om1 = getOMElement(ref1, fac);
         envelope.getBody().addChild(om1);
         String ref2 = "<reference id=\"2\">false</reference>";
-        OMElement om2 = getOMelemnt(ref2, fac);
+        OMElement om2 = getOMElement(ref2, fac);
         envelope.getBody().addChild(om2);
         String ref3 = "<reference id=\"3\"><town href=\"#4\"/><number>1010</number></reference>";
-        OMElement om3 = getOMelemnt(ref3, fac);
+        OMElement om3 = getOMElement(ref3, fac);
         envelope.getBody().addChild(om3);
         String ref4 = "<reference id=\"4\">Colombo3</reference>";
-        OMElement om4 = getOMelemnt(ref4, fac);
+        OMElement om4 = getOMElement(ref4, fac);
         envelope.getBody().addChild(om4);
 
         Options options = new Options();
@@ -423,7 +420,7 @@
     }
 
 
-    public void testomrefs() throws AxisFault {
+    public void testomrefs() throws Exception {
         configureSystem("omrefs");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
@@ -446,16 +443,16 @@
 
         String ref1 =
                 "<reference id=\"1\"><name>Deepal</name><value href=\"#2\"/><address href=\"#3\"/></reference>";
-        OMElement om1 = getOMelemnt(ref1, fac);
+        OMElement om1 = getOMElement(ref1, fac);
         envelope.getBody().addChild(om1);
         String ref2 = "<reference id=\"2\">false</reference>";
-        OMElement om2 = getOMelemnt(ref2, fac);
+        OMElement om2 = getOMElement(ref2, fac);
         envelope.getBody().addChild(om2);
         String ref3 = "<reference id=\"3\"><town href=\"#4\"/><number>1010</number></reference>";
-        OMElement om3 = getOMelemnt(ref3, fac);
+        OMElement om3 = getOMElement(ref3, fac);
         envelope.getBody().addChild(om3);
         String ref4 = "<reference id=\"4\">Colombo3</reference>";
-        OMElement om4 = getOMelemnt(ref4, fac);
+        OMElement om4 = getOMElement(ref4, fac);
         envelope.getBody().addChild(om4);
         Options options = new Options();
         options.setTo(targetEPR);
@@ -489,23 +486,16 @@
         assertEquals(((Boolean)resBean[0]).booleanValue(), true);
     }
 
-    private OMElement getOMelemnt(String str, OMFactory fac) throws AxisFault {
+    private OMElement getOMElement(String str, OMFactory fac) throws Exception {
         StAXOMBuilder staxOMBuilder;
-        try {
-            XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new
-                    ByteArrayInputStream(str.getBytes()));
-            staxOMBuilder = new
-                    StAXOMBuilder(fac, xmlReader);
-        } catch (XMLStreamException e) {
-            throw new AxisFault(e);
-        } catch (FactoryConfigurationError factoryConfigurationError) {
-            throw new AxisFault(factoryConfigurationError);
-        }
+        XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new
+                ByteArrayInputStream(str.getBytes()));
+        staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
         return staxOMBuilder.getDocumentElement();
     }
 
 
-    public void testechoEmployee() throws AxisFault {
+    public void testechoEmployee() throws Exception {
         configureSystem("echoEmployee");
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
@@ -528,11 +518,11 @@
                 " <emplyer href=\"#1\"/>\n" +
                 " <address href=\"#2\"/>\n" +
                 "</reference>";
-        envelope.getBody().addChild(getOMelemnt(str, fac));
+        envelope.getBody().addChild(getOMElement(str, fac));
         str = "<reference id=\"2\">\n" +
                 "<town>Colombo3</town><number>1010</number>\n" +
                 "</reference>";
-        envelope.getBody().addChild(getOMelemnt(str, fac));
+        envelope.getBody().addChild(getOMElement(str, fac));
 
         Options options = new Options();
         options.setTo(targetEPR);
@@ -594,9 +584,9 @@
             staxOMBuilder = new
                     StAXOMBuilder(fac, xmlReader);
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (FactoryConfigurationError factoryConfigurationError) {
-            throw new AxisFault(factoryConfigurationError);
+            throw AxisFault.makeFault(factoryConfigurationError);
         }
         envelope.getBody().addChild(staxOMBuilder.getDocumentElement());
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/rpc/RPCCallTest.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- 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 Fri Apr  6 17:09:47 2007
@@ -44,8 +44,6 @@
 import org.apache.axis2.wsdl.WSDLConstants;
 
 import javax.xml.namespace.QName;
-import javax.xml.stream.FactoryConfigurationError;
-import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import java.io.ByteArrayInputStream;
 import java.text.SimpleDateFormat;
@@ -680,7 +678,7 @@
     }
 
 
-    public void testhandleArrayList() throws AxisFault {
+    public void testhandleArrayList() throws Exception {
         configureSystem("handleArrayList");
 
         Options options = new Options();
@@ -692,11 +690,11 @@
         RPCServiceClient sender = new RPCServiceClient(configContext, null);
         sender.setOptions(options);
 
-        OMElement elem = sender.sendReceive(getpayLoad());
+        OMElement elem = sender.sendReceive(getPayload());
         assertEquals(elem.getFirstElement().getText(), "abcdefghiklm10");
     }
 
-    public void testomElementArray() throws AxisFault {
+    public void testomElementArray() throws Exception {
         configureSystem("omElementArray");
         String str = "<req:omElementArray xmlns:req=\"http://rpc.axis2.apache.org/xsd\">\n" +
                 "    <arg0><abc>vaue1</abc></arg0>\n" +
@@ -705,18 +703,11 @@
                 "    <arg0><abc>vaue4</abc></arg0>\n" +
                 "</req:omElementArray>";
         StAXOMBuilder staxOMBuilder;
-        try {
-            XMLStreamReader xmlReader = StAXUtils.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);
-        }
+        XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new
+                ByteArrayInputStream(str.getBytes()));
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+
+        staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
         Options options = new Options();
         options.setTo(targetEPR);
         options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
@@ -730,7 +721,7 @@
         assertEquals("4", elem.getFirstElement().getText());
     }
 
-    private OMElement getpayLoad() throws AxisFault {
+    private OMElement getPayload() throws Exception {
         String str = "<req:handleArrayList xmlns:req=\"http://rpc.axis2.apache.org/xsd\">\n" +
                 "  <arg0>\n" +
                 "    <item0>abc</item0>\n" +
@@ -740,18 +731,11 @@
                 "  </arg0><arg1>10</arg1>" +
                 "</req:handleArrayList>";
         StAXOMBuilder staxOMBuilder;
-        try {
-            XMLStreamReader xmlReader = StAXUtils.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);
-        }
+        XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(
+                new ByteArrayInputStream(str.getBytes()));
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+
+        staxOMBuilder = new StAXOMBuilder(fac, xmlReader);
         return staxOMBuilder.getDocumentElement();
     }
 

Modified: webservices/axis2/trunk/java/modules/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/pom.xml?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/pom.xml (original)
+++ webservices/axis2/trunk/java/modules/jaxws/pom.xml Fri Apr  6 17:09:47 2007
@@ -256,6 +256,13 @@
     	    <classpath location="${compiled.classes.dir}"/>
     	   	<arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/AddNumbers.wsdl"/>
     	</java>
+    	<echo>Generating java from AddNumbersHandler.wsdl</echo>
+    	<java classname="com.sun.tools.xjc.Driver" fork="true"> 
+    	    <classpath refid="maven.runtime.classpath"/>
+    	    <classpath location="${compiled.classes.dir}"/>
+   	   	<arg line="-d ${schema.generated.src.dir} -quiet -wsdl ${wsdl.source.dir}/AddNumbersHandler.wsdl"/>
+    	</java>
+
     	<echo>Generating java from async_doclitwr.wsdl</echo>
     	<java classname="com.sun.tools.xjc.Driver" fork="true"> 
     	    <classpath refid="maven.runtime.classpath"/>
@@ -786,10 +793,10 @@
 			</fileset>
 		</copy>	
 
-        <copy toDir="target/test-classes/">
-             <fileset dir="test-resources/">
-               <include name="**/*.properties"/>
-             </fileset>
+        <copy toDir="target/test-classes/">
+             <fileset dir="test-resources/">
+               <include name="**/*.properties"/>
+             </fileset>
         </copy>		
 			  </tasks>
             </configuration>

Modified: webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/jibx/src/org/apache/axis2/jibx/template/JibXDatabindingTemplate.xsl Fri Apr  6 17:09:47 2007
@@ -286,7 +286,7 @@
       
     </xsl:choose>
           } catch (org.jibx.runtime.JiBXException e) {
-              throw new org.apache.axis2.AxisFault(e);
+              throw org.apache.axis2.AxisFault.makeFault(e);
           }
           return envelope;
       }
@@ -690,7 +690,7 @@
             } else if (ex instanceof java.rmi.RemoteException) {
                 throw (java.rmi.RemoteException)ex;
             } else {
-                throw new org.apache.axis2.AxisFault(ex);
+                throw org.apache.axis2.AxisFault.makeFault(ex);
             }
         }
     

Modified: webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONMessageFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONMessageFormatter.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONMessageFormatter.java (original)
+++ webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONMessageFormatter.java Fri Apr  6 17:09:47 2007
@@ -37,8 +37,6 @@
 import java.io.*;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.ArrayList;
-import java.util.Iterator;
 
 /**
  * This JSONMessageFormatter is the formatter for "Mapped" formatted JSON in Axis2. This type of
@@ -101,9 +99,9 @@
                 return bytesOut.toByteArray();
 
             } catch (XMLStreamException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             } catch (FactoryConfigurationError e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             } catch (IllegalStateException e) {
                 throw new AxisFault(
                         "Mapped formatted JSON with namespaces are not supported in Axis2. Make sure that your" +
@@ -176,9 +174,9 @@
                 jsonWriter.writeEndDocument();
             }
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (IllegalStateException e) {
             throw new AxisFault(
                     "Mapped formatted JSON with namespaces are not supported in Axis2. Make sure that your" +
@@ -215,11 +213,11 @@
 
                 return new URL(targetURL.getProtocol(), targetURL.getHost(), targetURL.getPort(), returnURLFile);
             } catch (MalformedURLException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             } catch (XMLStreamException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             } catch (UnsupportedEncodingException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
         } else {
             return targetURL;

Modified: webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONOMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONOMBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONOMBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/json/src/org/apache/axis2/json/JSONOMBuilder.java Fri Apr  6 17:09:47 2007
@@ -26,15 +26,11 @@
 import org.apache.axiom.om.impl.OMNamespaceImpl;
 import org.apache.axiom.om.impl.llom.OMSourcedElementImpl;
 import org.apache.axis2.AxisFault;
-import org.apache.axis2.Constants;
 import org.apache.axis2.transport.http.util.URIEncoderDecoder;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.builder.Builder;
 import org.apache.axis2.context.MessageContext;
 
-import java.io.IOException;
-import java.io.InputStream;
-
 /** Makes the OMSourcedElementImpl object with the JSONDataSource inside. */
 
 public class JSONOMBuilder implements Builder {
@@ -65,7 +61,7 @@
             try {
                 requestURL = URIEncoderDecoder.decode(endpointReference.getAddress());
             } catch (UnsupportedEncodingException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
 
             String jsonString;
@@ -104,7 +100,7 @@
                 }
             }
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
         JSONDataSource jsonDataSource = getDataSource(inputStream, prefix, localName);
         return new OMSourcedElementImpl(localName, ns, factory, jsonDataSource);

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/AxisFault.java Fri Apr  6 17:09:47 2007
@@ -68,7 +68,6 @@
  *                                                             </pre>
  */
 public class AxisFault extends RemoteException {
-
     private static final long serialVersionUID = -374933082062124907L;
 
     /**
@@ -222,12 +221,13 @@
     }
 
     /**
-     * construct a fault from an exception
-     * TODO: handle AxisFaults or SOAPFaultException implementations differently?
+     * Construct a fault from a Throwable.  This is a protected constructor - in general
+     * to make an AxisFault from an Exception, you should be calling AxisFault.makeFault(e),
+     * which prevents AxisFaults within AxisFaults.
      *
-     * @param cause
+     * @param cause the Throwable that caused the problem
      */
-    public AxisFault(Throwable cause) {
+    protected AxisFault(Throwable cause) {
         this((cause != null)
                 ? cause.getMessage()
                 : null, cause);
@@ -365,13 +365,9 @@
      * @param e the <code>Exception</code> to build a fault for
      * @return an <code>AxisFault</code> representing <code>e</code>
      */
-    public static AxisFault makeFault(Exception e) {
+    public static AxisFault makeFault(Throwable e) {
         if (e instanceof InvocationTargetException) {
-            Throwable t = ((InvocationTargetException) e).getTargetException();
-
-            if (t instanceof Exception) {
-                e = (Exception) t;
-            }
+            return makeFault(((InvocationTargetException) e).getTargetException());
         }
 
         if (e instanceof AxisFault) {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/addressing/EndpointReferenceHelper.java Fri Apr  6 17:09:47 2007
@@ -120,7 +120,7 @@
             return fromOM(new StAXOMBuilder(
                     new ByteArrayInputStream(eprString.getBytes())).getDocumentElement());
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/ApplicationXMLBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/ApplicationXMLBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/ApplicationXMLBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/ApplicationXMLBuilder.java Fri Apr  6 17:09:47 2007
@@ -61,9 +61,9 @@
             }
 
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
         return soapEnvelope;
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MTOMBuilder.java Fri Apr  6 17:09:47 2007
@@ -52,9 +52,9 @@
                     .getCharsetEncoding(), envelope.getNamespace().getNamespaceURI());
             return envelope;
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MultipartFormDataBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MultipartFormDataBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MultipartFormDataBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/MultipartFormDataBuilder.java Fri Apr  6 17:09:47 2007
@@ -54,7 +54,7 @@
                                                 OMAbstractFactory.getSOAP12Factory());
 
         } catch (FileUploadException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
 
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/SOAPBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/SOAPBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/SOAPBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/SOAPBuilder.java Fri Apr  6 17:09:47 2007
@@ -48,9 +48,9 @@
                     .getCharsetEncoding(), envelope.getNamespace().getNamespaceURI());
             return envelope;
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/builder/XFormURLEncodedBuilder.java Fri Apr  6 17:09:47 2007
@@ -75,14 +75,14 @@
         try {
             requestURL = URIEncoderDecoder.decode(endpointReference.getAddress());
         } catch (UnsupportedEncodingException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
         try {
             requestURL = extractParametersUsingHttpLocation(templatedPath, parameterMap,
                                                             requestURL,
                                                             queryParameterSeparator);
         } catch (UnsupportedEncodingException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
 
         String query = requestURL;
@@ -142,7 +142,7 @@
                     }
                 }
             } catch (IOException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
         }
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/context/ConfigurationContext.java Fri Apr  6 17:09:47 2007
@@ -517,13 +517,15 @@
     private String internalGetServiceContextPath() {
         String ctxRoot = getContextRoot();
         String path = "/";
-        if (!ctxRoot.equals("/")) {
-            path = ctxRoot + "/";
-        }
-        if (servicePath == null || servicePath.trim().length() == 0) {
-            throw new IllegalArgumentException("service path cannot be null or empty");
-        } else {
-            path += servicePath.trim();
+        if (ctxRoot != null) {
+            if (!ctxRoot.equals("/")) {
+                path = ctxRoot + "/";
+            }
+            if (servicePath == null || servicePath.trim().length() == 0) {
+                throw new IllegalArgumentException("service path cannot be null or empty");
+            } else {
+                path += servicePath.trim();
+            }
         }
         return path;
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java Fri Apr  6 17:09:47 2007
@@ -1000,7 +1000,7 @@
             fillServiceGroup(serviceGroup, serviceList, null, axisConfig);
             return serviceGroup;
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/ServiceBuilder.java Fri Apr  6 17:09:47 2007
@@ -393,7 +393,7 @@
             service.setObjectSupplier(
                     objectSupplier);
         } catch (Exception e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/repository/util/DeploymentFileData.java Fri Apr  6 17:09:47 2007
@@ -121,7 +121,7 @@
                     urlsToLoadFrom = new URL[]{file.toURL()};
                     classLoader = new DeploymentClassLoader(urlsToLoadFrom, parent,false);
                 } catch (Exception e) {
-                    throw new AxisFault(e);
+                    throw AxisFault.makeFault(e);
                 }
             }
         } else {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/PhasesInfo.java Fri Apr  6 17:09:47 2007
@@ -272,7 +272,7 @@
                 axisOperation.setPhasesInFaultFlow(getOperationInFaultPhases());
                 axisOperation.setPhasesOutFaultFlow(getOperationOutFaultPhases());
             } catch (DeploymentException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
         }
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/util/Utils.java Fri Apr  6 17:09:47 2007
@@ -92,9 +92,9 @@
                 handler.init(handlermd);
                 handlermd.setHandler(handler);
             } catch (InstantiationException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             } catch (IllegalAccessException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
         }
     }
@@ -225,7 +225,7 @@
         try {
             handlerClass = Loader.loadClass(loader1, className);
         } catch (ClassNotFoundException e) {
-            throw new AxisFault(e.getMessage());
+            throw AxisFault.makeFault(e);
         }
 
         return handlerClass;
@@ -498,7 +498,7 @@
                 }
             }
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService.java Fri Apr  6 17:09:47 2007
@@ -828,7 +828,7 @@
                     WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
                     writer.writeWSDL(definition, out);
                 } catch (WSDLException e) {
-                    throw new AxisFault(e);
+                    throw AxisFault.makeFault(e);
                 }
             } else {
                 printWSDLError(out);
@@ -936,7 +936,7 @@
                     WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
                     writer.writeWSDL(definition, out);
                 } catch (WSDLException e) {
-                    throw new AxisFault(e);
+                    throw AxisFault.makeFault(e);
                 }
             } else {
                 printWSDLError(out);
@@ -994,7 +994,7 @@
                 out.flush();
                 out.close();
             } catch (Exception e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
         }
     }
@@ -1013,7 +1013,7 @@
             out.flush();
             out.close();
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -1032,7 +1032,7 @@
                     out.flush();
                     out.close();
                 } catch (IOException e) {
-                    throw new AxisFault(e);
+                    throw AxisFault.makeFault(e);
                 }
             } else {
                 printWSDLError(out);
@@ -1058,7 +1058,7 @@
             out.flush();
             out.close();
         } catch (Exception e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -1631,7 +1631,7 @@
                 axisService.setTargetNamespace(targetNamespace);
             }
         } catch (Exception e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
 
         JMethod[] method = schemaGenerator.getMethods();
@@ -1776,7 +1776,7 @@
                 axisService.setTargetNamespace(targetNameSpace);
             }
         } catch (Exception e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
 
         JMethod[] method = schemaGenerator.getMethods();
@@ -2296,11 +2296,11 @@
             dataLocator = Class.forName(className, true, serviceClassLoader);
             locator = (AxisDataLocator) dataLocator.newInstance();
         } catch (ClassNotFoundException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (IllegalAccessException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (InstantiationException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
 
         }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/AxisService2WSDL2.java Fri Apr  6 17:09:47 2007
@@ -120,7 +120,7 @@
                         typesElement.addChild(
                                 XMLUtils.toOM(new ByteArrayInputStream(schemaString.getBytes())));
                     } catch (XMLStreamException e) {
-                        throw new AxisFault(e);
+                        throw AxisFault.makeFault(e);
                     }
                 }
             }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/OutInAxisOperation.java Fri Apr  6 17:09:47 2007
@@ -280,7 +280,7 @@
                     if (internalCallback.error instanceof AxisFault) {
                         throw (AxisFault) internalCallback.error;
                     } else if (internalCallback.error != null) {
-                        throw new AxisFault(internalCallback.error);
+                        throw AxisFault.makeFault(internalCallback.error);
                     } else if (! internalCallback.isComplete()) {
                         throw new AxisFault(Messages.getMessage("responseTimeOut"));
                     } else {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAllAxisServicesBuilder.java Fri Apr  6 17:09:47 2007
@@ -121,7 +121,7 @@
                 log.debug("populateAllServices caught Exception.  Converting to AxisFault. " +
                         e.toString());
             }
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL11ToAxisServiceBuilder.java Fri Apr  6 17:09:47 2007
@@ -290,10 +290,10 @@
             return axisService;
         } catch (WSDLException e) {
             log.error(e);
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (Exception e) {
             log.error(e);
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAllAxisServicesBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAllAxisServicesBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAllAxisServicesBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAllAxisServicesBuilder.java Fri Apr  6 17:09:47 2007
@@ -110,7 +110,7 @@
                 log.debug("populateAllServices caught Exception.  Converting to AxisFault. " +
                         e.toString());
             }
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/description/WSDL20ToAxisServiceBuilder.java Fri Apr  6 17:09:47 2007
@@ -2,9 +2,6 @@
 
 import org.apache.axiom.soap.SOAP11Constants;
 import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.om.OMAbstractFactory;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.OMNamespace;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.namespace.Constants;
 import org.apache.axis2.transport.http.util.RESTUtil;
@@ -92,10 +89,6 @@
 
     private String wsdlURI;
 
-    // FIXME @author Chathura THis shoud be a URI. Find whats used by
-    // woden.
-    private static String RPC = "rpc";
-
     protected String interfaceName;
 
     private String savedTargetNamespace;
@@ -223,7 +216,7 @@
             processService();
             return axisService;
         } catch (Exception e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -392,7 +385,7 @@
         } catch (AxisFault e) {
             throw e; // just rethrow AxisFaults
         } catch (Exception e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/dispatchers/SOAPMessageBodyBasedOperationDispatcher.java Fri Apr  6 17:09:47 2007
@@ -34,22 +34,22 @@
     public AxisOperation findOperation(AxisService service, MessageContext messageContext)
             throws AxisFault {
         OMElement bodyFirstChild = messageContext.getEnvelope().getBody().getFirstElement();
-        QName operationName = null;
         if (bodyFirstChild == null) {
             return null;
-        } else {
-            if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
-                log.debug(messageContext.getLogIDString() +
-                        " Checking for Operation using SOAP message body's first child's local name : "
-                        + bodyFirstChild.getLocalName());
-            }
-            operationName = new QName(bodyFirstChild.getLocalName());
         }
-
-        AxisOperation axisOperation = service.getOperation(operationName);
+        if (LoggingControl.debugLoggingAllowed && log.isDebugEnabled()) {
+            log.debug(messageContext.getLogIDString() +
+                    " Checking for Operation using SOAP message body's first child's local name : "
+                    + bodyFirstChild.getLocalName());
+        }
+        AxisOperation axisOperation = service.getOperation(new QName(bodyFirstChild.getLocalName()));
 
         if (axisOperation == null) {
             axisOperation = service.getOperationByMessageElementQName(bodyFirstChild.getQName());
+        }
+
+        if (axisOperation == null) {
+            axisOperation = service.getOperation(bodyFirstChild.getQName());
         }
         return axisOperation;
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AddressingBasedDispatcher.java Fri Apr  6 17:09:47 2007
@@ -79,7 +79,7 @@
         }
 
         ConfigurationContext configurationContext = messageContext.getConfigurationContext();
-        String[] values =
+        String[] values = 
                 Utils.parseRequestURLForServiceAndOperation(address,
                                                             configurationContext.
                                                                     getServiceContextPath());

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/AxisEngine.java Fri Apr  6 17:09:47 2007
@@ -17,12 +17,8 @@
 
 package org.apache.axis2.engine;
 
-import org.apache.axiom.soap.SOAP11Constants;
-import org.apache.axiom.soap.SOAP12Constants;
-import org.apache.axiom.soap.SOAPConstants;
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPHeaderBlock;
-import org.apache.axiom.soap.RolePlayer;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.context.ConfigurationContext;
@@ -53,7 +49,6 @@
      * Field log
      */
     private static final Log log = LogFactory.getLog(AxisEngine.class);
-    private ConfigurationContext engineContext;
 
     private static boolean RESUMING_EXECUTION = true;
     private static boolean NOT_RESUMING_EXECUTION = false;
@@ -64,7 +59,6 @@
      * Constructor AxisEngine
      */
     public AxisEngine(ConfigurationContext engineContext) {
-        this.engineContext = engineContext;
     }
 
     private void checkMustUnderstand(MessageContext msgContext) throws AxisFault {

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DefaultObjectSupplier.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DefaultObjectSupplier.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DefaultObjectSupplier.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/engine/DefaultObjectSupplier.java Fri Apr  6 17:09:47 2007
@@ -25,7 +25,7 @@
         try {
             return clazz.newInstance();
         } catch (Exception e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 }

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?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- 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 Apr  6 17:09:47 2007
@@ -93,7 +93,7 @@
                     serviceContext.setProperty(ServiceContext.SERVICE_OBJECT, serviceImpl);
                     initServiceClass(serviceImpl, serviceContext);
                 } catch (Exception e) {
-                    new AxisFault(e);
+                    AxisFault.makeFault(e);
                 }
             }
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/TransportUtils.java Fri Apr  6 17:09:47 2007
@@ -78,11 +78,11 @@
         } catch (AxisFault e) {
             throw e;
         } catch (OMException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (FactoryConfigurationError e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -207,7 +207,7 @@
                 outputMessage.serializeAndConsume(out, format);
                 out.flush();
             } catch (Exception e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
         } else {
             throw new AxisFault(Messages.getMessage("outMessageNull"));

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/ApplicationXMLFormatter.java Fri Apr  6 17:09:47 2007
@@ -59,7 +59,7 @@
             try {
                 omElement.serializeAndConsume(bytesOut, format);
             } catch (XMLStreamException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
 
             return bytesOut.toByteArray();
@@ -89,13 +89,13 @@
             try {
                 omElement.serializeAndConsume(outputStream, format);
             } catch (XMLStreamException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
         }
         try {
             outputStream.flush();
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisRequestEntity.java Fri Apr  6 17:09:47 2007
@@ -93,9 +93,9 @@
             }
             outStream.flush();
         } catch (FactoryConfigurationError e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
 
     }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/AxisServlet.java Fri Apr  6 17:09:47 2007
@@ -557,7 +557,7 @@
                     ip = "localhost";
                 }
             } catch (SocketException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
         }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/CommonsHTTPTransportSender.java Fri Apr  6 17:09:47 2007
@@ -217,13 +217,13 @@
             }
         } catch (XMLStreamException e) {
             log.debug(e);
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (FactoryConfigurationError e) {
             log.debug(e);
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (IOException e) {
             log.debug(e);
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
         return InvocationResponse.CONTINUE;
     }
@@ -310,13 +310,13 @@
             sender.send(messageContext, url, findSOAPAction(messageContext));
         } catch (MalformedURLException e) {
             log.debug(e);
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (HttpException e) {
             log.debug(e);
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (IOException e) {
             log.debug(e);
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPSender.java Fri Apr  6 17:09:47 2007
@@ -100,7 +100,7 @@
             executeMethod(httpClient, msgContext, url, getMethod);
             handleResponse(msgContext, getMethod);
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
 
 
@@ -125,7 +125,7 @@
             executeMethod(httpClient, msgContext, url, deleteMethod);
             handleResponse(msgContext, deleteMethod);
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
 
     }
@@ -176,7 +176,7 @@
             executeMethod(httpClient, msgContext, url, postMethod);
             handleResponse(msgContext, postMethod);
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
 
     }
@@ -202,6 +202,8 @@
             charEncoding = MessageContext.DEFAULT_CHAR_SET_ENCODING;
         }
 
+        // TODO - Do something with charEncoding???
+
         PutMethod putMethod = new PutMethod();
         MessageFormatter messageFormatter =
                 populateCommonProperties(msgContext, url, putMethod, httpClient, soapActionString);
@@ -226,7 +228,7 @@
             executeMethod(httpClient, msgContext, url, putMethod);
             handleResponse(msgContext, putMethod);
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/HTTPTransportUtils.java Fri Apr  6 17:09:47 2007
@@ -281,17 +281,17 @@
 
             return pi;
         } catch (SOAPProcessingException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (AxisFault e) {
             throw e;
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (OMException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (FactoryConfigurationError e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } finally {
             if ((msgContext.getEnvelope() == null) && soapVersion != VERSION_SOAP11) {
                 msgContext.setEnvelope(new SOAP12Factory().getDefaultEnvelope());

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/MultipartFormDataFormatter.java Fri Apr  6 17:09:47 2007
@@ -93,7 +93,7 @@
                 // This is accessing a class of Commons-FlieUpload
                 Part.sendParts(bytesOut, parts, format.getMimeBoundary().getBytes());
             } catch (IOException e) {
-                throw new AxisFault(e);
+                throw AxisFault.makeFault(e);
             }
             return bytesOut.toByteArray();
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/RESTRequestEntity.java Fri Apr  6 17:09:47 2007
@@ -71,9 +71,9 @@
                 return bytesOut.toByteArray();
             }
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (FactoryConfigurationError e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -89,11 +89,11 @@
             }
             out.flush();
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (FactoryConfigurationError e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (IOException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SOAPMessageFormatter.java Fri Apr  6 17:09:47 2007
@@ -56,7 +56,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 
@@ -82,9 +82,9 @@
                 return bytesOut.toByteArray();
             }
         } catch (XMLStreamException e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         } catch (FactoryConfigurationError e) {
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java?view=diff&rev=526324&r1=526323&r2=526324
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java (original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/transport/http/SimpleHTTPServer.java Fri Apr  6 17:09:47 2007
@@ -118,7 +118,7 @@
                 hostAddress = httpFactory.getHostAddress();
             }
         } catch (Exception e1) {
-            throw new AxisFault(e1);
+            throw AxisFault.makeFault(e1);
         }
     }
 
@@ -215,7 +215,7 @@
             embedded.start();
         } catch (IOException e) {
             log.error(e);
-            throw new AxisFault(e);
+            throw AxisFault.makeFault(e);
         }
     }
 



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