You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2005/07/11 17:49:55 UTC

svn commit: r210150 [18/35] - in /webservices/axis/trunk/java: ./ etc/ modules/addressing/ modules/addressing/src/org/apache/axis2/handlers/addressing/ modules/addressing/test-resources/ modules/addressing/test/org/apache/axis2/handlers/addressing/ mod...

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/commons-http-enabled-axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/commons-http-enabled-axis2.xml?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/commons-http-enabled-axis2.xml (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/commons-http-enabled-axis2.xml Mon Jul 11 08:49:30 2005
@@ -1,65 +1,61 @@
 <axisconfig name="AxisJava2.0">
-   <!-- ================================================= -->
-   <!-- Parameters -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
     <parameter name="hotdeployment" locked="xsd:false">true</parameter>
     <parameter name="hotupdate" locked="xsd:false">false</parameter>
 
 
-
     <parameter name="userName" locked="xsd:false">admin</parameter>
     <parameter name="password" locked="xsd:false">axis2</parameter>
 
 
 
-   <!-- ================================================= -->
-   <!-- Message Receivers -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
     <!-- This is the Deafult Message Receiver for the Request Response style Operations -->
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
-   <!-- ================================================= -->
-   <!-- Transport Ins -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
     <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
         <parameter name="port" locked="xsd:false">6060</parameter>
     </transportReceiver>
 
-    
-
-  
 
     <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
         <parameter name="port" locked="xsd:false">6060</parameter>
     </transportReceiver>
 
-   <!-- ================================================= -->
-   <!-- Transport Outs -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
 
     <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender">
-    	<parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
-	    <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
+        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
-    
+
     <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
     <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>
 
-     <transportSender name="commons-http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
-    	<parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
-	    <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
+    <transportSender name="commons-http" class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="xsd:false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="xsd:false">chunked</parameter>
     </transportSender>
-    
 
-   <!-- ================================================= -->
-   <!-- Global Modules  -->
-   <!-- ================================================= -->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
     <!-- Uncomment this to enable Addressing
     <module ref="addressing"/> -->
 
-   <!-- ================================================= -->
-   <!-- Phases  -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
     <phaseOrder type="inflow">
         <!--  System pre defined phases       -->
         <phase name="TransportIn"/>

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/util/MyInOutMEPClient.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/util/MyInOutMEPClient.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/util/MyInOutMEPClient.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine/util/MyInOutMEPClient.java Mon Jul 11 08:49:30 2005
@@ -27,7 +27,7 @@
  * author : Eran Chinthaka (chinthaka@apache.org)
  */
 
-public class MyInOutMEPClient extends Call{
+public class MyInOutMEPClient extends Call {
 
     public MyInOutMEPClient() throws AxisFault {
         super(assumeServiceContext(null));
@@ -35,8 +35,8 @@
 
     public SOAPEnvelope invokeBlockingWithEnvelopeOut(String axisop, OMElement toSend) throws AxisFault {
         OperationDescription axisConfig =
-            serviceContext.getServiceConfig().getOperation(new QName(axisop));
-         if (axisConfig == null) {
+                serviceContext.getServiceConfig().getOperation(new QName(axisop));
+        if (axisConfig == null) {
             axisConfig = new OperationDescription(new QName(axisop));
             axisConfig.setRemainingPhasesInFlow(operationTemplate.getRemainingPhasesInFlow());
             axisConfig.setPhasesOutFlow(operationTemplate.getPhasesOutFlow());

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/Constants.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/Constants.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/Constants.java Mon Jul 11 08:49:30 2005
@@ -13,14 +13,14 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 package org.apache.axis2.integration;
 
 /**
  * @author hemapani
- *
- * To change the template for this generated type comment go to
- * Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
+ *         <p/>
+ *         To change the template for this generated type comment go to
+ *         Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
  */
 public class Constants {
 

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/EchoTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/EchoTest.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/EchoTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/EchoTest.java Mon Jul 11 08:49:30 2005
@@ -30,25 +30,23 @@
 public class EchoTest extends TestCase {
     private final SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
     private final OMNamespace ns =
-        fac.createOMNamespace("http://apache.ws.apache.org/samples", "samples");
+            fac.createOMNamespace("http://apache.ws.apache.org/samples", "samples");
     private final OMNamespace arrayNs =
-        fac.createOMNamespace(OMConstants.ARRAY_ITEM_NSURI, OMConstants.ARRAY_ITEM_NS_PREFIX);
+            fac.createOMNamespace(OMConstants.ARRAY_ITEM_NSURI, OMConstants.ARRAY_ITEM_NS_PREFIX);
     private final OMNamespace targetNs = fac.createOMNamespace("http://axis.apache.org", "s");
     private final URLClassLoader cl;
 
     public EchoTest() throws MalformedURLException {
         cl =
-            new URLClassLoader(
-                new URL[] { new File("target/test-resources/samples/services/echo.jar").toURL()},
-                EchoTest.class.getClassLoader());
+                new URLClassLoader(new URL[]{new File("target/test-resources/samples/services/echo.jar").toURL()},
+                                   EchoTest.class.getClassLoader());
     }
 
     public EchoTest(String arg0) throws MalformedURLException {
         super(arg0);
         cl =
-            new URLClassLoader(
-                new URL[] { new File("target/test-resources/samples/services/echo.jar").toURL()},
-                EchoTest.class.getClassLoader());
+                new URLClassLoader(new URL[]{new File("target/test-resources/samples/services/echo.jar").toURL()},
+                                   EchoTest.class.getClassLoader());
 
     }
 

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/TestingUtils.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/TestingUtils.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/TestingUtils.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/TestingUtils.java Mon Jul 11 08:49:30 2005
@@ -33,12 +33,12 @@
         method.addChild(value);
         return method;
     }
-    
-    public static void campareWithCreatedOMElement(OMElement element){
+
+    public static void campareWithCreatedOMElement(OMElement element) {
         OMElement firstChild = element.getFirstElement();
         TestCase.assertNotNull(firstChild);
         String textValue = firstChild.getText();
-        TestCase.assertEquals(textValue,"Isaac Assimov, the foundation Sega");
+        TestCase.assertEquals(textValue, "Isaac Assimov, the foundation Sega");
     }
 
 }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilServer.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilServer.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilServer.java Mon Jul 11 08:49:30 2005
@@ -45,7 +45,7 @@
     public static synchronized void unDeployService(QName service) throws AxisFault {
         receiver.getSystemContext().getAxisConfiguration().removeService(service);
     }
-    
+
     public static synchronized void start() throws Exception {
         start(org.apache.axis2.Constants.TESTING_REPOSITORY);
     }
@@ -55,7 +55,7 @@
             ConfigurationContextFactory erfac = new ConfigurationContextFactory();
             File file = new File(repositry);
             if (!file.exists()) {
-                throw new Exception("repository directory "+ file.getAbsolutePath()+ " does not exists");
+                throw new Exception("repository directory " + file.getAbsolutePath() + " does not exists");
             }
             ConfigurationContext er = erfac.buildConfigurationContext(file.getAbsolutePath());
             try {
@@ -95,7 +95,7 @@
     }
 
     public static ServiceContext createAdressedEnabledClientSide(ServiceDescription service)
-        throws AxisFault {
+            throws AxisFault {
         DeploymentEngine deploymentEngine = new DeploymentEngine();
         File file = new File(org.apache.axis2.Constants.TESTING_REPOSITORY + "/modules/addressing.mar");
         TestCase.assertTrue(file.exists());
@@ -103,7 +103,7 @@
 
         ConfigurationContextFactory efac = new ConfigurationContextFactory();
         ConfigurationContext sysContext = efac.buildClientConfigurationContext(null);
-        
+
         sysContext.getAxisConfiguration().addMdoule(moduleDesc);
         //sysContext.getAxisConfiguration().engageModule(moduleDesc.getName());
 

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilsTCPServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilsTCPServer.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilsTCPServer.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integration/UtilsTCPServer.java Mon Jul 11 08:49:30 2005
@@ -34,13 +34,13 @@
     public static final String FAILURE_MESSAGE = "Intentional Faliure";
 
     public static synchronized void deployService(ServiceDescription service)
-        throws AxisFault {
+            throws AxisFault {
         configurationContext.getAxisConfiguration().addService(service);
 
     }
 
     public static synchronized void unDeployService(QName service)
-        throws AxisFault {
+            throws AxisFault {
         configurationContext.getAxisConfiguration().removeService(service);
     }
 
@@ -50,7 +50,7 @@
             //start tcp server
 
             ConfigurationContextFactory erfac =
-                new ConfigurationContextFactory();
+                    new ConfigurationContextFactory();
             File file = new File(org.apache.axis2.Constants.TESTING_REPOSITORY);
             System.out.println(file.getAbsoluteFile());
             if (!file.exists()) {
@@ -58,16 +58,15 @@
             }
 
             configurationContext =
-                erfac.buildConfigurationContext(file.getAbsolutePath());
+                    erfac.buildConfigurationContext(file.getAbsolutePath());
             try {
                 Thread.sleep(2000);
             } catch (InterruptedException e1) {
                 throw new AxisFault("Thread interuptted", e1);
             }
-            configurationContext.getAxisConfiguration().engageModule(
-                new QName("addressing"));
+            configurationContext.getAxisConfiguration().engageModule(new QName("addressing"));
             receiver =
-                new TCPServer(UtilServer.TESTING_PORT, configurationContext);
+                    new TCPServer(UtilServer.TESTING_PORT, configurationContext);
             receiver.start();
 
         }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java Mon Jul 11 08:49:30 2005
@@ -48,19 +48,17 @@
 import java.io.File;
 
 public class MailOneWayRawXMLTest extends TestCase {
-    private static final String MAIL_TRANSPORT_ENABLED_REPO_PATH = Constants.TESTING_PATH+ "mail-transport-enabledRepository"; 
-    
-    
+    private static final String MAIL_TRANSPORT_ENABLED_REPO_PATH = Constants.TESTING_PATH + "mail-transport-enabledRepository";
+
+
     private EndpointReference targetEPR =
-        new EndpointReference(
-            AddressingConstants.WSA_TO,
-            "axis2@127.0.0.1" + "/axis/services/EchoXMLService/echoOMElement");
+            new EndpointReference(AddressingConstants.WSA_TO,
+                                  "axis2@127.0.0.1" + "/axis/services/EchoXMLService/echoOMElement");
     private Log log = LogFactory.getLog(getClass());
     private QName serviceName = new QName("EchoXMLService");
     private QName operationName = new QName("echoOMElement");
 
 
-
     private ConfigurationContext configContext;
 
     private SOAPEnvelope envelope;
@@ -78,13 +76,11 @@
     protected void setUp() throws Exception {
         configContext = createNewConfigurationContext();  
         //start the mail server      
-        MailServer server = new MailServer(configContext,MailConstants.POP_SERVER_PORT,MailConstants.SMTP_SERVER_PORT);
-        
+        MailServer server = new MailServer(configContext, MailConstants.POP_SERVER_PORT, MailConstants.SMTP_SERVER_PORT);
+
         SimpleMailListener ml = new SimpleMailListener();
-        ml.init(
-            configContext,
-            configContext.getAxisConfiguration().getTransportIn(
-                new QName(Constants.TRANSPORT_MAIL)));
+        ml.init(configContext,
+                configContext.getAxisConfiguration().getTransportIn(new QName(Constants.TRANSPORT_MAIL)));
         ml.start();
 
         ServiceDescription service = new ServiceDescription(serviceName);
@@ -140,7 +136,7 @@
         int index = 0;
         while (envelope == null) {
 //          if(index < 10){
-                Thread.sleep(4000);
+            Thread.sleep(4000);
 //                index++;
 //            }else{
 //                fail("The messsge was not delivered even after 40 seconds");
@@ -150,11 +146,11 @@
 
     public ConfigurationContext createNewConfigurationContext() throws Exception {
         File file = new File(MAIL_TRANSPORT_ENABLED_REPO_PATH);
-        assertTrue("Mail repository directory "+ file.getAbsolutePath() + " does not exsist",file.exists());
+        assertTrue("Mail repository directory " + file.getAbsolutePath() + " does not exsist", file.exists());
         ConfigurationContextFactory builder = new ConfigurationContextFactory();
         ConfigurationContext configContext =
-            builder.buildConfigurationContext(file.getAbsolutePath());
+                builder.buildConfigurationContext(file.getAbsolutePath());
         return configContext;
     }
-    
+
 }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java Mon Jul 11 08:49:30 2005
@@ -49,9 +49,8 @@
 
 public class MailRequestResponseRawXMLTest extends TestCase {
     private EndpointReference targetEPR =
-        new EndpointReference(
-            AddressingConstants.WSA_TO,
-            "foo@127.0.0.1" + "/axis/services/EchoXMLService/echoOMElement");
+            new EndpointReference(AddressingConstants.WSA_TO,
+                                  "foo@127.0.0.1" + "/axis/services/EchoXMLService/echoOMElement");
     private Log log = LogFactory.getLog(getClass());
     private QName serviceName = new QName("EchoXMLService");
     private QName operationName = new QName("echoOMElement");
@@ -73,19 +72,17 @@
     }
 
     protected void setUp() throws Exception {
-        ConfigurationContext configContext = createServerConfigurationContext(); 
-        MailServer server = new MailServer(configContext,MailConstants.POP_SERVER_PORT,MailConstants.SMTP_SERVER_PORT);
+        ConfigurationContext configContext = createServerConfigurationContext();
+        MailServer server = new MailServer(configContext, MailConstants.POP_SERVER_PORT, MailConstants.SMTP_SERVER_PORT);
         SimpleMailListener ml = new SimpleMailListener();
 
-         
-        ml.init(
-            configContext,
-            configContext.getAxisConfiguration().getTransportIn(
-                new QName(Constants.TRANSPORT_MAIL)));
+
+        ml.init(configContext,
+                configContext.getAxisConfiguration().getTransportIn(new QName(Constants.TRANSPORT_MAIL)));
         ml.start();
         configContext.getAxisConfiguration().engageModule(new QName(Constants.MODULE_ADDRESSING));
         ServiceDescription service =
-            Utils.createSimpleService(serviceName, Echo.class.getName(), operationName);
+                Utils.createSimpleService(serviceName, Echo.class.getName(), operationName);
         configContext.getAxisConfiguration().addService(service);
         Utils.resolvePhases(configContext.getAxisConfiguration(), service);
         ServiceContext serviceContext = configContext.createServiceContext(serviceName);
@@ -123,63 +120,62 @@
         org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call(serviceContext);
         call.engageModule(new QName(Constants.MODULE_ADDRESSING));
 
-            call.setTo(targetEPR);
-            call.setTransportInfo(Constants.TRANSPORT_MAIL, Constants.TRANSPORT_MAIL, true);
-            Callback callback = new Callback() {
-                public void onComplete(AsyncResult result) {
-                    try {
-                        result.getResponseEnvelope().serialize(
-                            new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
-                    } catch (XMLStreamException e) {
-                        reportError(e);
-                    } finally {
-                        finish = true;
-                    }
-                }
-
-                public void reportError(Exception e) {
-                    e.printStackTrace();
+        call.setTo(targetEPR);
+        call.setTransportInfo(Constants.TRANSPORT_MAIL, Constants.TRANSPORT_MAIL, true);
+        Callback callback = new Callback() {
+            public void onComplete(AsyncResult result) {
+                try {
+                    result.getResponseEnvelope().serialize(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+                } catch (XMLStreamException e) {
+                    reportError(e);
+                } finally {
                     finish = true;
                 }
-            };
+            }
 
-            call.invokeNonBlocking(operationName.getLocalPart(), createEnvelope(), callback);
-            int index = 0;
-            while (!finish) {
-                Thread.sleep(1000);
-                index++;
-                if (index > 10) {
-                    throw new AxisFault("Server is shutdown as the Async response take too longs time");
-                }
+            public void reportError(Exception e) {
+                e.printStackTrace();
+                finish = true;
+            }
+        };
+
+        call.invokeNonBlocking(operationName.getLocalPart(), createEnvelope(), callback);
+        int index = 0;
+        while (!finish) {
+            Thread.sleep(1000);
+            index++;
+            if (index > 10) {
+                throw new AxisFault("Server is shutdown as the Async response take too longs time");
             }
-            call.close();
+        }
+        call.close();
 
     }
+
     public ConfigurationContext createServerConfigurationContext() throws Exception {
         ConfigurationContextFactory builder = new ConfigurationContextFactory();
         ConfigurationContext configContext =
-            builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);
+                builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);
 
         TransportInDescription transportIn =
-            new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
+                new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
         transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
         transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "foo@127.0.0.1"));
         transportIn.addParameter(new ParameterImpl("transport.mail.pop3.password", "axis2"));
         transportIn.addParameter(new ParameterImpl("transport.mail.pop3.port", "1134"));
-        transportIn.addParameter(
-            new ParameterImpl("transport.mail.replyToAddress", "foo@127.0.0.1"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.replyToAddress", "foo@127.0.0.1"));
         transportIn.setReceiver(new SimpleMailListener());
-        transportIn.getReciever().init(configContext,transportIn);
+        transportIn.getReciever().init(configContext, transportIn);
 
         TransportOutDescription transportOut =
-            new TransportOutDescription(new QName(Constants.TRANSPORT_MAIL));
+                new TransportOutDescription(new QName(Constants.TRANSPORT_MAIL));
 
         transportOut.addParameter(new ParameterImpl("transport.mail.smtp.host", "127.0.0.1"));
         transportOut.addParameter(new ParameterImpl("transport.mail.smtp.user", "foo"));
         transportOut.addParameter(new ParameterImpl("transport.mail.smtp.password", "axis2"));
         transportOut.addParameter(new ParameterImpl("transport.mail.smtp.port", "1049"));
         transportOut.setSender(new MailTransportSender());
-        transportOut.getSender().init(configContext,transportOut);
+        transportOut.getSender().init(configContext, transportOut);
 
         configContext.getAxisConfiguration().addTransportIn(transportIn);
         configContext.getAxisConfiguration().addTransportOut(transportOut);
@@ -189,28 +185,27 @@
     public ConfigurationContext createClientConfigurationContext() throws Exception {
         ConfigurationContextFactory builder = new ConfigurationContextFactory();
         ConfigurationContext configContext =
-            builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);
+                builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);
 
         TransportInDescription transportIn =
-            new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
+                new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
         transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
         transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "bar@127.0.0.1"));
         transportIn.addParameter(new ParameterImpl("transport.mail.pop3.password", "axis2"));
         transportIn.addParameter(new ParameterImpl("transport.mail.pop3.port", "1134"));
-        transportIn.addParameter(
-            new ParameterImpl("transport.mail.replyToAddress", "bar@127.0.0.1"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.replyToAddress", "bar@127.0.0.1"));
         transportIn.setReceiver(new SimpleMailListener());
-        transportIn.getReciever().init(configContext,transportIn);
+        transportIn.getReciever().init(configContext, transportIn);
 
         TransportOutDescription transportOut =
-            new TransportOutDescription(new QName(Constants.TRANSPORT_MAIL));
+                new TransportOutDescription(new QName(Constants.TRANSPORT_MAIL));
 
         transportOut.addParameter(new ParameterImpl("transport.mail.smtp.host", "127.0.0.1"));
         transportOut.addParameter(new ParameterImpl("transport.mail.smtp.user", "bar"));
         transportOut.addParameter(new ParameterImpl("transport.mail.smtp.password", "axis2"));
         transportOut.addParameter(new ParameterImpl("transport.mail.smtp.port", "1049"));
         transportOut.setSender(new MailTransportSender());
-        transportOut.getSender().init(configContext,transportOut);
+        transportOut.getSender().init(configContext, transportOut);
 
         configContext.getAxisConfiguration().addTransportIn(transportIn);
         configContext.getAxisConfiguration().addTransportOut(transportOut);

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailetRequestResponceRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailetRequestResponceRawXMLTest.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailetRequestResponceRawXMLTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/MailetRequestResponceRawXMLTest.java Mon Jul 11 08:49:30 2005
@@ -1,27 +1,22 @@
-    /*
-     * Copyright 2004,2005 The Apache Software Foundation.
-     * 
-     * Licensed under the Apache License, Version 2.0 (the "License");
-     * you may not use this file except in compliance with the License.
-     * You may obtain a copy of the License at
-     * 
-     *      http://www.apache.org/licenses/LICENSE-2.0
-     * 
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
+/*
+ * Copyright 2004,2005 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.apache.axis2.mail;
 
 
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-
 import junit.framework.TestCase;
-
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
@@ -31,197 +26,189 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.description.OperationDescription;
-import org.apache.axis2.description.ParameterImpl;
-import org.apache.axis2.description.ServiceDescription;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.AxisFault;
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.engine.MessageReceiver;
-import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMFactory;
-import org.apache.axis2.om.OMNamespace;
-import org.apache.axis2.om.OMOutput;
+import org.apache.axis2.om.*;
 import org.apache.axis2.soap.SOAPEnvelope;
-import org.apache.axis2.transport.mail.server.MailConstants;
 import org.apache.axis2.transport.mail.MailTransportSender;
 import org.apache.axis2.transport.mail.SimpleMailListener;
+import org.apache.axis2.transport.mail.server.MailConstants;
 import org.apache.axis2.transport.mail.server.MailServer;
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+
 /**
  * This will use the In out functionality to test the mailet functionality. This code was
  * based on the code on the MailRequestResponceRawXMLTest.java.
- * 
+ *
  * @author Chamil Thanthrimudalige <ch...@gmail.com>
- * 
-  */
+ */
 public class MailetRequestResponceRawXMLTest extends TestCase {
-        private EndpointReference targetEPR =
-            new EndpointReference(
-                AddressingConstants.WSA_TO,
-                "axis2-server@127.0.0.1" + "/axis/services/EchoXMLService/echoOMElement");
-        private Log log = LogFactory.getLog(getClass());
-        private QName serviceName = new QName("EchoXMLService");
-        private QName operationName = new QName("echoOMElement");
-        private QName transportName = new QName("http://localhost/my", "NullTransport");
-
-        private AxisConfiguration engineRegistry;
-        private MessageContext mc;
-
-        private SOAPEnvelope envelope;
-
-        private boolean finish = false;
-
-        public MailetRequestResponceRawXMLTest() {
-            super(MailetRequestResponceRawXMLTest.class.getName());
-        }
-
-        public MailetRequestResponceRawXMLTest(String testName) {
-            super(testName);
-        }
-
-        protected void setUp() throws Exception {
-            ConfigurationContext configContext = createServerConfigurationContext(); 
-            MailServer server = new MailServer(configContext, MailConstants.POP_SERVER_PORT, MailConstants.SMTP_SERVER_PORT);
-            configContext.getAxisConfiguration().engageModule(new QName(Constants.MODULE_ADDRESSING));
-            ServiceDescription service =
+    private EndpointReference targetEPR =
+            new EndpointReference(AddressingConstants.WSA_TO,
+                                  "axis2-server@127.0.0.1" + "/axis/services/EchoXMLService/echoOMElement");
+    private Log log = LogFactory.getLog(getClass());
+    private QName serviceName = new QName("EchoXMLService");
+    private QName operationName = new QName("echoOMElement");
+    private QName transportName = new QName("http://localhost/my", "NullTransport");
+
+    private AxisConfiguration engineRegistry;
+    private MessageContext mc;
+
+    private SOAPEnvelope envelope;
+
+    private boolean finish = false;
+
+    public MailetRequestResponceRawXMLTest() {
+        super(MailetRequestResponceRawXMLTest.class.getName());
+    }
+
+    public MailetRequestResponceRawXMLTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+        ConfigurationContext configContext = createServerConfigurationContext();
+        MailServer server = new MailServer(configContext, MailConstants.POP_SERVER_PORT, MailConstants.SMTP_SERVER_PORT);
+        configContext.getAxisConfiguration().engageModule(new QName(Constants.MODULE_ADDRESSING));
+        ServiceDescription service =
                 Utils.createSimpleService(serviceName, Echo.class.getName(), operationName);
-            configContext.getAxisConfiguration().addService(service);
-            Utils.resolvePhases(configContext.getAxisConfiguration(), service);
-            ServiceContext serviceContext = configContext.createServiceContext(serviceName);
-        }
-
-        protected void tearDown() throws Exception {
-        }
-
-        private OMElement createEnvelope() {
-            OMFactory fac = OMAbstractFactory.getOMFactory();
-            OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
-            OMElement method = fac.createOMElement("echoOMElement", omNs);
-            OMElement value = fac.createOMElement("myValue", omNs);
-            value.addChild(fac.createText(value, "Isaac Assimov, the foundation Sega"));
-            method.addChild(value);
-
-            return method;
-        }
-
-        public void testEchoXMLCompleteASync() throws Exception {
-
-            ConfigurationContext configContext = createClientConfigurationContext();
-            ServiceDescription service = new ServiceDescription(serviceName);
-            OperationDescription operation = new OperationDescription(operationName);
-            operation.setMessageReciever(new MessageReceiver() {
-                public void recieve(MessageContext messgeCtx) throws AxisFault {
-                    envelope = messgeCtx.getEnvelope();
+        configContext.getAxisConfiguration().addService(service);
+        Utils.resolvePhases(configContext.getAxisConfiguration(), service);
+        ServiceContext serviceContext = configContext.createServiceContext(serviceName);
+    }
+
+    protected void tearDown() throws Exception {
+    }
+
+    private OMElement createEnvelope() {
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+        OMElement method = fac.createOMElement("echoOMElement", omNs);
+        OMElement value = fac.createOMElement("myValue", omNs);
+        value.addChild(fac.createText(value, "Isaac Assimov, the foundation Sega"));
+        method.addChild(value);
+
+        return method;
+    }
+
+    public void testEchoXMLCompleteASync() throws Exception {
+
+        ConfigurationContext configContext = createClientConfigurationContext();
+        ServiceDescription service = new ServiceDescription(serviceName);
+        OperationDescription operation = new OperationDescription(operationName);
+        operation.setMessageReciever(new MessageReceiver() {
+            public void recieve(MessageContext messgeCtx) throws AxisFault {
+                envelope = messgeCtx.getEnvelope();
+            }
+        });
+        service.addOperation(operation);
+        configContext.getAxisConfiguration().addService(service);
+        Utils.resolvePhases(configContext.getAxisConfiguration(), service);
+        ServiceContext serviceContext = configContext.createServiceContext(serviceName);
+
+        org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call(serviceContext);
+        call.engageModule(new QName(Constants.MODULE_ADDRESSING));
+
+        call.setTo(targetEPR);
+        call.setTransportInfo(Constants.TRANSPORT_MAIL, Constants.TRANSPORT_MAIL, true);
+        Callback callback = new Callback() {
+            public void onComplete(AsyncResult result) {
+                try {
+                    result.getResponseEnvelope().serialize(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+                } catch (XMLStreamException e) {
+                    reportError(e);
+                } finally {
+                    finish = true;
                 }
-            });
-            service.addOperation(operation);
-            configContext.getAxisConfiguration().addService(service);
-            Utils.resolvePhases(configContext.getAxisConfiguration(), service);
-            ServiceContext serviceContext = configContext.createServiceContext(serviceName);
-
-            org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call(serviceContext);
-            call.engageModule(new QName(Constants.MODULE_ADDRESSING));
-
-                call.setTo(targetEPR);
-                call.setTransportInfo(Constants.TRANSPORT_MAIL, Constants.TRANSPORT_MAIL, true);
-                Callback callback = new Callback() {
-                    public void onComplete(AsyncResult result) {
-                        try {
-                            result.getResponseEnvelope().serialize(
-                                new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
-                        } catch (XMLStreamException e) {
-                            reportError(e);
-                        } finally {
-                            finish = true;
-                        }
-                    }
-
-                    public void reportError(Exception e) {
-                        e.printStackTrace();
-                        finish = true;
-                    }
-                };
-
-                call.invokeNonBlocking(operationName.getLocalPart(), createEnvelope(), callback);
-                int index = 0;
-                while (!finish) {
-                    Thread.sleep(1000);
-                    index++;
-                    if (index > 10) {
-                        throw new AxisFault("Async response is taking too long[10s+]. Server is being shut down.");
-                    }
-                }
-                call.close();
+            }
 
-        }
-        public ConfigurationContext createServerConfigurationContext() throws Exception {
-            ConfigurationContextFactory builder = new ConfigurationContextFactory();
-            ConfigurationContext configContext =
+            public void reportError(Exception e) {
+                e.printStackTrace();
+                finish = true;
+            }
+        };
+
+        call.invokeNonBlocking(operationName.getLocalPart(), createEnvelope(), callback);
+        int index = 0;
+        while (!finish) {
+            Thread.sleep(1000);
+            index++;
+            if (index > 10) {
+                throw new AxisFault("Async response is taking too long[10s+]. Server is being shut down.");
+            }
+        }
+        call.close();
+
+    }
+
+    public ConfigurationContext createServerConfigurationContext() throws Exception {
+        ConfigurationContextFactory builder = new ConfigurationContextFactory();
+        ConfigurationContext configContext =
                 builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);
 
-            TransportInDescription transportIn =
+        TransportInDescription transportIn =
                 new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
-            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
-            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "server@127.0.0.1"));
-            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.password", "axis2"));
-            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.port", "1134"));
-            transportIn.addParameter(
-                new ParameterImpl("transport.mail.replyToAddress", "foo@127.0.0.1"));
-            transportIn.setReceiver(new SimpleMailListener());
-            transportIn.getReciever().init(configContext,transportIn);
+        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "server@127.0.0.1"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.password", "axis2"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.port", "1134"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.replyToAddress", "foo@127.0.0.1"));
+        transportIn.setReceiver(new SimpleMailListener());
+        transportIn.getReciever().init(configContext, transportIn);
 
-            TransportOutDescription transportOut =
+        TransportOutDescription transportOut =
                 new TransportOutDescription(new QName(Constants.TRANSPORT_MAIL));
 
-            transportOut.addParameter(new ParameterImpl("transport.mail.smtp.host", "127.0.0.1"));
-            transportOut.addParameter(new ParameterImpl("transport.mail.smtp.user", "server"));
-            transportOut.addParameter(new ParameterImpl("transport.mail.smtp.password", "axis2"));
-            transportOut.addParameter(new ParameterImpl("transport.mail.smtp.port", "1049"));
-            transportOut.setSender(new MailTransportSender());
-            transportOut.getSender().init(configContext,transportOut);
-
-            configContext.getAxisConfiguration().addTransportIn(transportIn);
-            configContext.getAxisConfiguration().addTransportOut(transportOut);
-            return configContext;
-        }
-
-        public ConfigurationContext createClientConfigurationContext() throws Exception {
-            ConfigurationContextFactory builder = new ConfigurationContextFactory();
-            ConfigurationContext configContext =
+        transportOut.addParameter(new ParameterImpl("transport.mail.smtp.host", "127.0.0.1"));
+        transportOut.addParameter(new ParameterImpl("transport.mail.smtp.user", "server"));
+        transportOut.addParameter(new ParameterImpl("transport.mail.smtp.password", "axis2"));
+        transportOut.addParameter(new ParameterImpl("transport.mail.smtp.port", "1049"));
+        transportOut.setSender(new MailTransportSender());
+        transportOut.getSender().init(configContext, transportOut);
+
+        configContext.getAxisConfiguration().addTransportIn(transportIn);
+        configContext.getAxisConfiguration().addTransportOut(transportOut);
+        return configContext;
+    }
+
+    public ConfigurationContext createClientConfigurationContext() throws Exception {
+        ConfigurationContextFactory builder = new ConfigurationContextFactory();
+        ConfigurationContext configContext =
                 builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REPOSITORY);
 
-            TransportInDescription transportIn =
+        TransportInDescription transportIn =
                 new TransportInDescription(new QName(Constants.TRANSPORT_MAIL));
-            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
-            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "client@127.0.0.1"));
-            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.password", "axis2"));
-            transportIn.addParameter(new ParameterImpl("transport.mail.pop3.port", "1134"));
-            transportIn.addParameter(
-                new ParameterImpl("transport.mail.replyToAddress", "client@127.0.0.1"));
-            transportIn.setReceiver(new SimpleMailListener());
-            transportIn.getReciever().init(configContext,transportIn);
+        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.host", "127.0.0.1"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.user", "client@127.0.0.1"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.password", "axis2"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.pop3.port", "1134"));
+        transportIn.addParameter(new ParameterImpl("transport.mail.replyToAddress", "client@127.0.0.1"));
+        transportIn.setReceiver(new SimpleMailListener());
+        transportIn.getReciever().init(configContext, transportIn);
 
-            TransportOutDescription transportOut =
+        TransportOutDescription transportOut =
                 new TransportOutDescription(new QName(Constants.TRANSPORT_MAIL));
 
-            transportOut.addParameter(new ParameterImpl("transport.mail.smtp.host", "127.0.0.1"));
-            transportOut.addParameter(new ParameterImpl("transport.mail.smtp.user", "client"));
-            transportOut.addParameter(new ParameterImpl("transport.mail.smtp.password", "axis2"));
-            transportOut.addParameter(new ParameterImpl("transport.mail.smtp.port", "1049"));
-            transportOut.setSender(new MailTransportSender());
-            transportOut.getSender().init(configContext,transportOut);
-
-            configContext.getAxisConfiguration().addTransportIn(transportIn);
-            configContext.getAxisConfiguration().addTransportOut(transportOut);
-            return configContext;
-        }
+        transportOut.addParameter(new ParameterImpl("transport.mail.smtp.host", "127.0.0.1"));
+        transportOut.addParameter(new ParameterImpl("transport.mail.smtp.user", "client"));
+        transportOut.addParameter(new ParameterImpl("transport.mail.smtp.password", "axis2"));
+        transportOut.addParameter(new ParameterImpl("transport.mail.smtp.port", "1049"));
+        transportOut.setSender(new MailTransportSender());
+        transportOut.getSender().init(configContext, transportOut);
+
+        configContext.getAxisConfiguration().addTransportIn(transportIn);
+        configContext.getAxisConfiguration().addTransportOut(transportOut);
+        return configContext;
+    }
 
 
 }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/mail-enabled-axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/mail-enabled-axis2.xml?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/mail-enabled-axis2.xml (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/mail-enabled-axis2.xml Mon Jul 11 08:49:30 2005
@@ -1,31 +1,30 @@
 <axisconfig name="AxisJava2.0">
-   <!-- ================================================= -->
-   <!-- Parameters -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
     <parameter name="hotdeployment" locked="xsd:false">true</parameter>
     <parameter name="hotupdate" locked="xsd:false">false</parameter>
 
 
-
     <parameter name="userName" locked="xsd:false">admin</parameter>
     <parameter name="password" locked="xsd:false">axis2</parameter>
 
 
 
-   <!-- ================================================= -->
-   <!-- Message Receivers -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
     <!-- This is the Deafult Message Receiver for the Request Response style Operations -->
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
-   <!-- ================================================= -->
-   <!-- Transport Ins -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
     <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
         <parameter name="port" locked="xsd:false">6060</parameter>
     </transportReceiver>
 
-  <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
         <parameter name="transport.mail.pop3.host" locked="xsd:false">127.0.0.1</parameter>
         <parameter name="transport.mail.pop3.user" locked="xsd:false">axis2@127.0.0.1</parameter>
         <parameter name="transport.mail.pop3.password" locked="xsd:false">axis2</parameter>
@@ -37,31 +36,31 @@
         <parameter name="port" locked="xsd:false">6060</parameter>
     </transportReceiver>
 
-   <!-- ================================================= -->
-   <!-- Transport Outs -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
 
     <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender"/>
     <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
     <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>
 
-    
+
     <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">
         <parameter name="transport.mail.smtp.host" locked="xsd:false">127.0.0.1</parameter>
         <parameter name="transport.mail.smtp.user" locked="xsd:false">axis2</parameter>
         <parameter name="transport.mail.smtp.password" locked="xsd:false">axis2</parameter>
         <parameter name="transport.mail.smtp.port" locked="xsd:false">1049</parameter>
-    </transportSender>  
+    </transportSender>
 
-   <!-- ================================================= -->
-   <!-- Global Modules  -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
     <!-- Uncomment this to enable Addressing -->
-    <module ref="addressing"/> 
+    <module ref="addressing"/>
 
-   <!-- ================================================= -->
-   <!-- Phases  -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
     <phaseOrder type="inflow">
         <!--  System pre defined phases       -->
         <phase name="TransportIn"/>

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java Mon Jul 11 08:49:30 2005
@@ -19,11 +19,8 @@
 /**
  * @author <a href="mailto:thilina@opensource.lk">Thilina Gunarathne </a>
  */
-import javax.activation.DataHandler;
-import javax.xml.namespace.QName;
 
 import junit.framework.TestCase;
-
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
@@ -34,106 +31,103 @@
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.integration.UtilServer;
-import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMFactory;
-import org.apache.axis2.om.OMNamespace;
-import org.apache.axis2.om.OMText;
+import org.apache.axis2.om.*;
 import org.apache.axis2.om.impl.llom.OMTextImpl;
 import org.apache.axis2.soap.SOAPFactory;
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+
 public class EchoRawMTOMLoadTest extends TestCase {
-	private EndpointReference targetEPR = new EndpointReference(
-			AddressingConstants.WSA_TO, "http://127.0.0.1:"
-					+ (UtilServer.TESTING_PORT)
-					+ "/axis/services/EchoXMLService/echoOMElement");
-
-	private Log log = LogFactory.getLog(getClass());
-
-	private QName serviceName = new QName("EchoXMLService");
-
-	private QName operationName = new QName("echoOMElement");
-
-	private QName transportName = new QName("http://localhost/my",
-			"NullTransport");
-
-	private AxisConfiguration engineRegistry;
-
-	private MessageContext mc;
-
-	private ServiceContext serviceContext;
-
-	private ServiceDescription service;
-
-	private boolean finish = false;
-
-	public EchoRawMTOMLoadTest() {
-		super(EchoRawMTOMLoadTest.class.getName());
-	}
-
-	public EchoRawMTOMLoadTest(String testName) {
-		super(testName);
-	}
-
-	protected void setUp() throws Exception {
-		UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
-		service = Utils.createSimpleService(serviceName, Echo.class.getName(),
-				operationName);
-		UtilServer.deployService(service);
-		serviceContext = UtilServer.getConfigurationContext()
-				.createServiceContext(service.getName());
-	}
-
-	protected void tearDown() throws Exception {
-		UtilServer.unDeployService(serviceName);
-		UtilServer.stop();
-	}
-
-	private OMElement createEnvelope() {
-
-		OMFactory fac = OMAbstractFactory.getOMFactory();
-		OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
-		OMElement rpcWrapEle = fac.createOMElement("echoOMElement", omNs);
-		OMElement data = fac.createOMElement("data", omNs);
-		byte[] byteArray = new byte[] { 13, 56, 65, 32, 12, 12, 7, -3, -2, -1,
-				98 };
-		for (int i = 0; i <4; i++) {
-			OMElement subData = fac.createOMElement("subData", omNs);
-			DataHandler dataHandler = new DataHandler(new ByteArrayDataSource(
-					byteArray));
-			OMText textData = new OMTextImpl(dataHandler, true);
-			//OMText textData = new OMTextImpl("Thilina Gunarathne");
-			subData.addChild(textData);
-			data.addChild(subData);
-			//System.out.println("Creating blobs "+i);
-		}
-		
-		rpcWrapEle.addChild(data);
-		return rpcWrapEle;
-	}
-
-	public void testEchoXMLSync() throws Exception {
-		for (int i = 0; i < 10; i++) {
-			SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
-
-			OMElement payload = createEnvelope();
-
-			org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call();
-			call.setTo(targetEPR);
-			call.set(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
-			call.setTransportInfo(Constants.TRANSPORT_HTTP,
-					Constants.TRANSPORT_HTTP, false);
-
-			OMElement result = (OMElement) call.invokeBlocking(operationName
-					.getLocalPart(), payload);
-			OMElement ele = (OMElement) result.getFirstChild();
-			OMElement ele1 = (OMElement)ele.getFirstChild();
-			OMText binaryNode = (OMText) ele1.getFirstChild();
-			System.out.println(i);
-		}
-	}
+    private EndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO, "http://127.0.0.1:"
+                                                                                            + (UtilServer.TESTING_PORT)
+                                                                                            + "/axis/services/EchoXMLService/echoOMElement");
+
+    private Log log = LogFactory.getLog(getClass());
+
+    private QName serviceName = new QName("EchoXMLService");
+
+    private QName operationName = new QName("echoOMElement");
+
+    private QName transportName = new QName("http://localhost/my",
+                                            "NullTransport");
+
+    private AxisConfiguration engineRegistry;
+
+    private MessageContext mc;
+
+    private ServiceContext serviceContext;
+
+    private ServiceDescription service;
+
+    private boolean finish = false;
+
+    public EchoRawMTOMLoadTest() {
+        super(EchoRawMTOMLoadTest.class.getName());
+    }
+
+    public EchoRawMTOMLoadTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+        UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
+        service = Utils.createSimpleService(serviceName, Echo.class.getName(),
+                                            operationName);
+        UtilServer.deployService(service);
+        serviceContext = UtilServer.getConfigurationContext()
+                .createServiceContext(service.getName());
+    }
+
+    protected void tearDown() throws Exception {
+        UtilServer.unDeployService(serviceName);
+        UtilServer.stop();
+    }
+
+    private OMElement createEnvelope() {
+
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+        OMElement rpcWrapEle = fac.createOMElement("echoOMElement", omNs);
+        OMElement data = fac.createOMElement("data", omNs);
+        byte[] byteArray = new byte[]{13, 56, 65, 32, 12, 12, 7, -3, -2, -1,
+                                      98};
+        for (int i = 0; i < 4; i++) {
+            OMElement subData = fac.createOMElement("subData", omNs);
+            DataHandler dataHandler = new DataHandler(new ByteArrayDataSource(byteArray));
+            OMText textData = new OMTextImpl(dataHandler, true);
+            //OMText textData = new OMTextImpl("Thilina Gunarathne");
+            subData.addChild(textData);
+            data.addChild(subData);
+            //System.out.println("Creating blobs "+i);
+        }
+
+        rpcWrapEle.addChild(data);
+        return rpcWrapEle;
+    }
+
+    public void testEchoXMLSync() throws Exception {
+        for (int i = 0; i < 10; i++) {
+            SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+
+            OMElement payload = createEnvelope();
+
+            org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call();
+            call.setTo(targetEPR);
+            call.set(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                                  Constants.TRANSPORT_HTTP, false);
+
+            OMElement result = (OMElement) call.invokeBlocking(operationName
+                                                               .getLocalPart(), payload);
+            OMElement ele = (OMElement) result.getFirstChild();
+            OMElement ele1 = (OMElement) ele.getFirstChild();
+            OMText binaryNode = (OMText) ele1.getFirstChild();
+            System.out.println(i);
+        }
+    }
 
 }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMTest.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMTest.java Mon Jul 11 08:49:30 2005
@@ -19,15 +19,8 @@
 /**
  * @author <a href="mailto:thilina@opensource.lk">Thilina Gunarathne </a>
  */
-import java.awt.Image;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-
-import javax.activation.DataHandler;
-import javax.xml.namespace.QName;
 
 import junit.framework.TestCase;
-
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
@@ -39,119 +32,120 @@
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.integration.UtilServer;
-import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMFactory;
-import org.apache.axis2.om.OMNamespace;
-import org.apache.axis2.om.OMText;
+import org.apache.axis2.om.*;
 import org.apache.axis2.om.impl.llom.OMTextImpl;
 import org.apache.axis2.soap.SOAPFactory;
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import java.awt.*;
+import java.io.FileOutputStream;
+import java.io.InputStream;
+
 public class EchoRawMTOMTest extends TestCase {
-	private EndpointReference targetEPR = new EndpointReference(
-			AddressingConstants.WSA_TO, "http://127.0.0.1:"
-					+ (UtilServer.TESTING_PORT)
-					+ "/axis/services/EchoXMLService/echoOMElement");
-
-	private Log log = LogFactory.getLog(getClass());
-
-	private QName serviceName = new QName("EchoXMLService");
-
-	private QName operationName = new QName("echoOMElement");
-
-	private QName transportName = new QName("http://localhost/my",
-			"NullTransport");
-
-	private String imageInFileName = "img/test.jpg";
-
-	private String imageOutFileName = "mtom/img/testOut.jpg";
-
-	private AxisConfiguration engineRegistry;
-
-	private MessageContext mc;
-
-	private ServiceContext serviceContext;
-
-	private ServiceDescription service;
-
-	private boolean finish = false;
-
-	public EchoRawMTOMTest() {
-		super(EchoRawMTOMTest.class.getName());
-	}
-
-	public EchoRawMTOMTest(String testName) {
-		super(testName);
-	}
-
-	protected void setUp() throws Exception {
-		UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
-		service = Utils.createSimpleService(serviceName, Echo.class.getName(),
-				operationName);
-		UtilServer.deployService(service);
-		serviceContext = UtilServer.getConfigurationContext()
-				.createServiceContext(service.getName());
-	}
-
-	protected void tearDown() throws Exception {
-		UtilServer.unDeployService(serviceName);
-		UtilServer.stop();
-	}
-
-	private OMElement createEnvelope() throws Exception {
-
-		DataHandler expectedDH;
-		OMFactory fac = OMAbstractFactory.getOMFactory();
-		OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
-		OMElement rpcWrapEle = fac.createOMElement("echoOMElement", omNs);
-		OMElement data = fac.createOMElement("data", omNs);
-		Image expectedImage;
-		expectedImage = new JDK13IO()
-				.loadImage(getResourceAsStream("org/apache/axis2/mtom/test.jpg"));
-
-		ImageDataSource dataSource = new ImageDataSource("test.jpg",
-				expectedImage);
-		expectedDH = new DataHandler(dataSource);
-		OMTextImpl textData = new OMTextImpl(expectedDH, true);
-		data.addChild(textData);
-		//OMTextImpl textData1 = new OMTextImpl(expectedDH, true);
-		//data.addChild(textData1);
-		rpcWrapEle.addChild(data);
-		return rpcWrapEle;
-
-	}
-
-	public void testEchoXMLSync() throws Exception {
-		SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
-
-		OMElement payload = createEnvelope();
-
-		org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call();
-		call.setTo(targetEPR);
-		call.set(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
-		call.setTransportInfo(Constants.TRANSPORT_HTTP,
-				Constants.TRANSPORT_HTTP, false);
-
-		OMElement result = (OMElement) call.invokeBlocking(operationName
-				.getLocalPart(), payload);
-		// result.serializeWithCache(new
-		// OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
-		OMElement ele = (OMElement) result.getFirstChild();
-		OMText binaryNode = (OMText) ele.getFirstChild();
-		DataHandler actualDH;
-		actualDH = binaryNode.getDataHandler();
-		Image actualObject = new JDK13IO().loadImage(actualDH.getDataSource()
-				.getInputStream());
-		FileOutputStream imageOutStream = new FileOutputStream("testout.jpg");
-		new JDK13IO().saveImage("image/jpeg", actualObject, imageOutStream);
-
-	}
-
-	private InputStream getResourceAsStream(String path) {
-		ClassLoader cl = Thread.currentThread().getContextClassLoader();
-		return cl.getResourceAsStream(path);
-	}
+    private EndpointReference targetEPR = new EndpointReference(AddressingConstants.WSA_TO, "http://127.0.0.1:"
+                                                                                            + (UtilServer.TESTING_PORT)
+                                                                                            + "/axis/services/EchoXMLService/echoOMElement");
+
+    private Log log = LogFactory.getLog(getClass());
+
+    private QName serviceName = new QName("EchoXMLService");
+
+    private QName operationName = new QName("echoOMElement");
+
+    private QName transportName = new QName("http://localhost/my",
+                                            "NullTransport");
+
+    private String imageInFileName = "img/test.jpg";
+
+    private String imageOutFileName = "mtom/img/testOut.jpg";
+
+    private AxisConfiguration engineRegistry;
+
+    private MessageContext mc;
+
+    private ServiceContext serviceContext;
+
+    private ServiceDescription service;
+
+    private boolean finish = false;
+
+    public EchoRawMTOMTest() {
+        super(EchoRawMTOMTest.class.getName());
+    }
+
+    public EchoRawMTOMTest(String testName) {
+        super(testName);
+    }
+
+    protected void setUp() throws Exception {
+        UtilServer.start(Constants.TESTING_PATH + "MTOM-enabledRepository");
+        service = Utils.createSimpleService(serviceName, Echo.class.getName(),
+                                            operationName);
+        UtilServer.deployService(service);
+        serviceContext = UtilServer.getConfigurationContext()
+                .createServiceContext(service.getName());
+    }
+
+    protected void tearDown() throws Exception {
+        UtilServer.unDeployService(serviceName);
+        UtilServer.stop();
+    }
+
+    private OMElement createEnvelope() throws Exception {
+
+        DataHandler expectedDH;
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+        OMElement rpcWrapEle = fac.createOMElement("echoOMElement", omNs);
+        OMElement data = fac.createOMElement("data", omNs);
+        Image expectedImage;
+        expectedImage = new JDK13IO()
+                .loadImage(getResourceAsStream("org/apache/axis2/mtom/test.jpg"));
+
+        ImageDataSource dataSource = new ImageDataSource("test.jpg",
+                                                         expectedImage);
+        expectedDH = new DataHandler(dataSource);
+        OMTextImpl textData = new OMTextImpl(expectedDH, true);
+        data.addChild(textData);
+        //OMTextImpl textData1 = new OMTextImpl(expectedDH, true);
+        //data.addChild(textData1);
+        rpcWrapEle.addChild(data);
+        return rpcWrapEle;
+
+    }
+
+    public void testEchoXMLSync() throws Exception {
+        SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+
+        OMElement payload = createEnvelope();
+
+        org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call();
+        call.setTo(targetEPR);
+        call.set(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                              Constants.TRANSPORT_HTTP, false);
+
+        OMElement result = (OMElement) call.invokeBlocking(operationName
+                                                           .getLocalPart(), payload);
+        // result.serializeWithCache(new
+        // OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+        OMElement ele = (OMElement) result.getFirstChild();
+        OMText binaryNode = (OMText) ele.getFirstChild();
+        DataHandler actualDH;
+        actualDH = binaryNode.getDataHandler();
+        Image actualObject = new JDK13IO().loadImage(actualDH.getDataSource()
+                                                     .getInputStream());
+        FileOutputStream imageOutStream = new FileOutputStream("testout.jpg");
+        new JDK13IO().saveImage("image/jpeg", actualObject, imageOutStream);
+
+    }
+
+    private InputStream getResourceAsStream(String path) {
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        return cl.getResourceAsStream(path);
+    }
 }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/EchoRawMTOMToBase64Test.java Mon Jul 11 08:49:30 2005
@@ -15,15 +15,12 @@
  */
 
 package org.apache.axis2.mtom;
+
 /**
  * @author <a href="mailto:thilina@opensource.lk">Thilina Gunarathne </a>
  */
-import javax.activation.DataHandler;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLOutputFactory;
 
 import junit.framework.TestCase;
-
 import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
@@ -34,23 +31,23 @@
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.integration.UtilServer;
-import org.apache.axis2.om.OMAbstractFactory;
-import org.apache.axis2.om.OMElement;
-import org.apache.axis2.om.OMFactory;
-import org.apache.axis2.om.OMNamespace;
-import org.apache.axis2.om.OMOutput;
+import org.apache.axis2.om.*;
 import org.apache.axis2.om.impl.llom.OMTextImpl;
 import org.apache.axis2.soap.SOAPFactory;
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.activation.DataHandler;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLOutputFactory;
+
 public class EchoRawMTOMToBase64Test extends TestCase {
     private EndpointReference targetEPR =
             new EndpointReference(AddressingConstants.WSA_TO,
-                    "http://127.0.0.1:"
-            + (UtilServer.TESTING_PORT)
-            + "/axis/services/EchoXMLService/echoMTOMtoBase64");
+                                  "http://127.0.0.1:"
+                                  + (UtilServer.TESTING_PORT)
+                                  + "/axis/services/EchoXMLService/echoMTOMtoBase64");
     private Log log = LogFactory.getLog(getClass());
     private QName serviceName = new QName("EchoXMLService");
     private QName operationName = new QName("echoMTOMtoBase64");
@@ -59,7 +56,7 @@
     private AxisConfiguration engineRegistry;
     private MessageContext mc;
     //private Thread thisThread;
-   // private SimpleHTTPServer sas;
+    // private SimpleHTTPServer sas;
     private ServiceContext serviceContext;
     private ServiceDescription service;
 
@@ -77,8 +74,8 @@
         UtilServer.start();
         service =
                 Utils.createSimpleService(serviceName,
-        Echo.class.getName(),
-                        operationName);
+                                          Echo.class.getName(),
+                                          operationName);
         UtilServer.deployService(service);
         serviceContext =
                 UtilServer.getConfigurationContext().createServiceContext(service.getName());
@@ -90,40 +87,39 @@
     }
 
     private OMElement createEnvelope() {
-    	
-    	 OMFactory fac = OMAbstractFactory.getOMFactory();
-    	 OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
-    	 OMElement rpcWrapEle = fac.createOMElement("echoMTOMtoBase64",omNs);
-		 OMElement data = fac.createOMElement("data", omNs);
-		 byte[] byteArray = new byte[] { 13, 56, 65, 32, 12, 12, 7, -3, -2, -1,
-				98 };
-		 DataHandler dataHandler = new DataHandler(new ByteArrayDataSource(byteArray));
-		 OMTextImpl textData = new OMTextImpl(dataHandler, true);
-		 data.addChild(textData); 
-         rpcWrapEle.addChild(data);
-		 return rpcWrapEle;
+
+        OMFactory fac = OMAbstractFactory.getOMFactory();
+        OMNamespace omNs = fac.createOMNamespace("http://localhost/my", "my");
+        OMElement rpcWrapEle = fac.createOMElement("echoMTOMtoBase64", omNs);
+        OMElement data = fac.createOMElement("data", omNs);
+        byte[] byteArray = new byte[]{13, 56, 65, 32, 12, 12, 7, -3, -2, -1,
+                                      98};
+        DataHandler dataHandler = new DataHandler(new ByteArrayDataSource(byteArray));
+        OMTextImpl textData = new OMTextImpl(dataHandler, true);
+        data.addChild(textData);
+        rpcWrapEle.addChild(data);
+        return rpcWrapEle;
     }
 
 
     public void testEchoXMLSync() throws Exception {
-    	for(int i=0; i<10;i++)
-    	{
-    	SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
-
-        OMElement payload = createEnvelope();
-
-        org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call();
-
-        call.setTo(targetEPR);
-        call.set(Constants.Configuration.ENABLE_MTOM,Constants.VALUE_TRUE);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
-
-        OMElement result =
-                (OMElement) call.invokeBlocking(operationName.getLocalPart(), payload);
-        result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
-        call.close();
-        System.out.println(i);
-    	}
+        for (int i = 0; i < 10; i++) {
+            SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
+
+            OMElement payload = createEnvelope();
+
+            org.apache.axis2.clientapi.Call call = new org.apache.axis2.clientapi.Call();
+
+            call.setTo(targetEPR);
+            call.set(Constants.Configuration.ENABLE_MTOM, Constants.VALUE_TRUE);
+            call.setTransportInfo(Constants.TRANSPORT_HTTP, Constants.TRANSPORT_HTTP, false);
+
+            OMElement result =
+                    (OMElement) call.invokeBlocking(operationName.getLocalPart(), payload);
+            result.serializeWithCache(new OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out)));
+            call.close();
+            System.out.println(i);
+        }
     }
 
 }

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/MTOM-enabled-axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/MTOM-enabled-axis2.xml?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/MTOM-enabled-axis2.xml (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/MTOM-enabled-axis2.xml Mon Jul 11 08:49:30 2005
@@ -1,14 +1,13 @@
 <axisconfig name="AxisJava2.0">
-   <!-- ================================================= -->
-   <!-- Parameters -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Parameters -->
+    <!-- ================================================= -->
     <parameter name="hotdeployment" locked="xsd:false">true</parameter>
     <parameter name="hotupdate" locked="xsd:false">false</parameter>
     <parameter name="enableMTOM" locked="xsd:false">true</parameter>
     <parameter name="cacheAttachments" locked="xsd:false">false</parameter>
     <!-- Uncomment this to enable REST support -->
-<!--    <parameter name="eanbleREST" locked="xsd:false">true</parameter>-->
-
+    <!--    <parameter name="eanbleREST" locked="xsd:false">true</parameter>-->
 
 
     <parameter name="userName" locked="xsd:false">admin</parameter>
@@ -16,58 +15,58 @@
 
 
 
-   <!-- ================================================= -->
-   <!-- Message Receivers -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Message Receivers -->
+    <!-- ================================================= -->
     <!-- This is the Deafult Message Receiver for the Request Response style Operations -->
     <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
 
-   <!-- ================================================= -->
-   <!-- Transport Ins -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Transport Ins -->
+    <!-- ================================================= -->
     <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
         <parameter name="port" locked="xsd:false">6060</parameter>
     </transportReceiver>
 
-  <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
-  <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
-        <parameter name="transport.mail.pop3.host" locked="xsd:false">127.0.0.1</parameter>
-        <parameter name="transport.mail.pop3.user" locked="xsd:false">axis2</parameter>
-        <parameter name="transport.mail.pop3.password" locked="xsd:false">axis2</parameter>
-        <parameter name="transport.mail.pop3.port" locked="xsd:false">110</parameter>
-        <parameter name="transport.mail.replyToAddress" locked="xsd:false">axis2@127.0.0.1</parameter>
-    </transportReceiver> -->
+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
+    <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
+          <parameter name="transport.mail.pop3.host" locked="xsd:false">127.0.0.1</parameter>
+          <parameter name="transport.mail.pop3.user" locked="xsd:false">axis2</parameter>
+          <parameter name="transport.mail.pop3.password" locked="xsd:false">axis2</parameter>
+          <parameter name="transport.mail.pop3.port" locked="xsd:false">110</parameter>
+          <parameter name="transport.mail.replyToAddress" locked="xsd:false">axis2@127.0.0.1</parameter>
+      </transportReceiver> -->
 
     <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
         <parameter name="port" locked="xsd:false">6060</parameter>
     </transportReceiver>
 
-   <!-- ================================================= -->
-   <!-- Transport Outs -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Transport Outs -->
+    <!-- ================================================= -->
 
     <transportSender name="http" class="org.apache.axis2.transport.http.HTTPTransportSender"/>
     <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
     <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>
 
-     <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
-    <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">
-        <parameter name="transport.mail.smtp.host" locked="xsd:false">127.0.0.1</parameter>
-        <parameter name="transport.mail.smtp.user" locked="xsd:false">axis2</parameter>
-        <parameter name="transport.mail.smtp.password" locked="xsd:false">axis2</parameter>
-        <parameter name="transport.mail.smtp.port" locked="xsd:false">25</parameter>
-    </transportSender>
-    -->
-
-   <!-- ================================================= -->
-   <!-- Global Modules  -->
-   <!-- ================================================= -->
+    <!-- Uncomment this one with the appropriate papameters to enable the SMTP transport Receiver
+   <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">
+       <parameter name="transport.mail.smtp.host" locked="xsd:false">127.0.0.1</parameter>
+       <parameter name="transport.mail.smtp.user" locked="xsd:false">axis2</parameter>
+       <parameter name="transport.mail.smtp.password" locked="xsd:false">axis2</parameter>
+       <parameter name="transport.mail.smtp.port" locked="xsd:false">25</parameter>
+   </transportSender>
+   -->
+
+    <!-- ================================================= -->
+    <!-- Global Modules  -->
+    <!-- ================================================= -->
     <!-- Uncomment this to enable Addressing
     <module ref="addressing"/> -->
 
-   <!-- ================================================= -->
-   <!-- Phases  -->
-   <!-- ================================================= -->
+    <!-- ================================================= -->
+    <!-- Phases  -->
+    <!-- ================================================= -->
     <phaseOrder type="inflow">
         <!--  System pre defined phases       -->
         <phase name="TransportIn"/>

Modified: webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/HttpGetRESTBasedTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/HttpGetRESTBasedTest.java?rev=210150&r1=210149&r2=210150&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/HttpGetRESTBasedTest.java (original)
+++ webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/rest/HttpGetRESTBasedTest.java Mon Jul 11 08:49:30 2005
@@ -44,27 +44,27 @@
     }
 
     protected void setUp() throws Exception {
-       UtilServer.start();
-       
-       ServiceDescription service =
-                       Utils.createSimpleService(serviceName,Echo.class.getName(),operationName);
-               UtilServer.deployService(service);
+        UtilServer.start();
+
+        ServiceDescription service =
+                Utils.createSimpleService(serviceName, Echo.class.getName(), operationName);
+        UtilServer.deployService(service);
 
     }
 
     protected void tearDown() throws Exception {
         UtilServer.unDeployService(serviceName);
-       UtilServer.stop();
+        UtilServer.stop();
     }
 
     public void testEchoXMLSync() throws Exception {
         //TODO support the GET with the Simple Axis Server and enable this test case
         URL wsdlrequestUrl =
-            new URL("http://127.0.0.1:5555/axis2/services/EchoXMLService/echoOMElement?value1=value1,value2=value2");
+                new URL("http://127.0.0.1:5555/axis2/services/EchoXMLService/echoOMElement?value1=value1,value2=value2");
 
         HttpURLConnection connection = (HttpURLConnection) wsdlrequestUrl.openConnection();
         BufferedReader reader =
-            new BufferedReader(new InputStreamReader(connection.getInputStream()));
+                new BufferedReader(new InputStreamReader(connection.getInputStream()));
         connection.getResponseCode();
         String line = reader.readLine();
         while (line != null) {