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 ra...@epiphany.com on 2005/07/11 19:53:00 UTC

RE: svn commit: r210165 [10/20] - in /webservices/axis/trunk/java/modules: addressing/src/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/addressing/ addressing/test/org/apache/axis2/handlers/util/ core/src/org/apache/axis2

How do I unsubscribe from this mailing list?

thanks,

-----Original Message-----
From: gdaniels@apache.org [mailto:gdaniels@apache.org] 
Sent: Monday, July 11, 2005 10:49 AM
To: axis-cvs@ws.apache.org
Subject: svn commit: r210165 [10/20] - in
/webservices/axis/trunk/java/modules:
addressing/src/org/apache/axis2/handlers/addressing/
addressing/test/org/apache/axis2/handlers/addressing/
addressing/test/org/apache/axis2/handlers/util/
core/src/org/apache/axis2/...

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/EchoRawXMLOnTwoChannelsSyncTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsSyncTest.java?rev=
210165&r1=210164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/EchoRawXMLOnTwoChannelsSyncTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/EchoRawXMLOnTwoChannelsSyncTest.java Mon Jul 11 10:48:55 2005
@@ -39,13 +39,14 @@
 public class EchoRawXMLOnTwoChannelsSyncTest extends TestCase {
     private EndpointReference targetEPR =
             new EndpointReference(AddressingConstants.WSA_TO,
-                                  "http://127.0.0.1:"
-                                  + (UtilServer.TESTING_PORT)
-                                  +
"/axis/services/EchoXMLService/echoOMElement");
+                    "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 QName transportName = new QName("http://localhost/my",
+            "NullTransport");
 
     private AxisConfiguration engineRegistry;
     private MessageContext mc;
@@ -65,13 +66,17 @@
 
     protected void setUp() throws Exception {
         UtilServer.start();
-
UtilServer.getConfigurationContext().getAxisConfiguration().engageModule
(new QName("addressing"));
+        UtilServer.getConfigurationContext().getAxisConfiguration()
+                .engageModule(new QName("addressing"));
 
         ServiceDescription service =
-                Utils.createSimpleService(serviceName,
Echo.class.getName(), operationName);
+                Utils.createSimpleService(serviceName,
+                        Echo.class.getName(),
+                        operationName);
         UtilServer.deployService(service);
         serviceContext =
-
UtilServer.getConfigurationContext().createServiceContext(service.getNam
e());
+
UtilServer.getConfigurationContext().createServiceContext(
+                        service.getName());
 
     }
 
@@ -84,10 +89,11 @@
     public void testEchoXMLCompleteSync() throws Exception {
         ServiceDescription service =
                 Utils.createSimpleService(serviceName,
-                                          Echo.class.getName(),
-                                          operationName);
+                        Echo.class.getName(),
+                        operationName);
 
-        ServiceContext serviceContext =
UtilServer.createAdressedEnabledClientSide(service);
+        ServiceContext serviceContext =
UtilServer.createAdressedEnabledClientSide(
+                service);
 
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
@@ -97,12 +103,16 @@
         value.setText("Isaac Assimov, the foundation Sega");
         method.addChild(value);
 
-        org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call(serviceContext);
+        org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call(
+                serviceContext);
         call.setTo(targetEPR);
         call.engageModule(new QName(Constants.MODULE_ADDRESSING));
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, true);
+        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                Constants.TRANSPORT_HTTP,
+                true);
 
-        OMElement result = (OMElement)
call.invokeBlocking(operationName.getLocalPart(), method);
+        OMElement result = (OMElement) call.invokeBlocking(
+                operationName.getLocalPart(), method);
         TestingUtils.campareWithCreatedOMElement(result);
         call.close();
 

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/EchoRawXMLOnTwoChannelsTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/EchoRawXMLOnTwoChannelsTest.java?rev=2101
65&r1=210164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/EchoRawXMLOnTwoChannelsTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/EchoRawXMLOnTwoChannelsTest.java Mon Jul 11 10:48:55 2005
@@ -41,13 +41,14 @@
 public class EchoRawXMLOnTwoChannelsTest extends TestCase {
     private EndpointReference targetEPR =
             new EndpointReference(AddressingConstants.WSA_TO,
-                                  "http://127.0.0.1:"
-                                  + (UtilServer.TESTING_PORT)
-                                  +
"/axis/services/EchoXMLService/echoOMElement");
+                    "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 QName transportName = new QName("http://localhost/my",
+            "NullTransport");
 
     private AxisConfiguration engineRegistry;
     private MessageContext mc;
@@ -67,15 +68,17 @@
 
     protected void setUp() throws Exception {
         UtilServer.start();
-
UtilServer.getConfigurationContext().getAxisConfiguration().engageModule
(new QName("addressing"));
+        UtilServer.getConfigurationContext().getAxisConfiguration()
+                .engageModule(new QName("addressing"));
 
         ServiceDescription service =
                 Utils.createSimpleService(serviceName,
-                                          Echo.class.getName(),
-                                          operationName);
+                        Echo.class.getName(),
+                        operationName);
         UtilServer.deployService(service);
         serviceContext =
-
UtilServer.getConfigurationContext().createServiceContext(service.getNam
e());
+
UtilServer.getConfigurationContext().createServiceContext(
+                        service.getName());
 
     }
 
@@ -88,10 +91,11 @@
     public void testEchoXMLCompleteASync() throws Exception {
         ServiceDescription service =
                 Utils.createSimpleService(serviceName,
-                                          Echo.class.getName(),
-                                          operationName);
+                        Echo.class.getName(),
+                        operationName);
 
-        ServiceContext serviceContext =
UtilServer.createAdressedEnabledClientSide(service);
+        ServiceContext serviceContext =
UtilServer.createAdressedEnabledClientSide(
+                service);
 
         OMFactory fac = OMAbstractFactory.getOMFactory();
 
@@ -101,15 +105,20 @@
         value.setText("Isaac Assimov, the foundation Sega");
         method.addChild(value);
 
-        org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call(serviceContext);
+        org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call(
+                serviceContext);
         call.engageModule(new QName(Constants.MODULE_ADDRESSING));
 
         try {
             call.setTo(targetEPR);
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, true);
+            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                    Constants.TRANSPORT_HTTP,
+                    true);
             Callback callback = new Callback() {
                 public void onComplete(AsyncResult result) {
-
TestingUtils.campareWithCreatedOMElement(result.getResponseEnvelope().ge
tBody().getFirstElement());
+                    TestingUtils.campareWithCreatedOMElement(
+                            result.getResponseEnvelope().getBody()
+                            .getFirstElement());
                     finish = true;
                 }
 
@@ -119,13 +128,16 @@
                 }
             };
 
-            call.invokeNonBlocking(operationName.getLocalPart(),
method, callback);
+            call.invokeNonBlocking(operationName.getLocalPart(),
+                    method,
+                    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");
+                    throw new AxisFault(
+                            "Server is shutdown as the Async response
take too longs time");
                 }
             }
             log.info("send the reqest");

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/EchoRawXMLTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/EchoRawXMLTest.java?rev=210165&r1=210164&
r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/EchoRawXMLTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/EchoRawXMLTest.java Mon Jul 11 10:48:55 2005
@@ -41,13 +41,14 @@
 public class EchoRawXMLTest extends TestCase {
     private EndpointReference targetEPR =
             new EndpointReference(AddressingConstants.WSA_TO,
-                                  "http://127.0.0.1:"
-                                  + (UtilServer.TESTING_PORT)
-                                  +
"/axis/services/EchoXMLService/echoOMElement");
+                    "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 QName transportName = new QName("http://localhost/my",
+            "NullTransport");
 
     private AxisConfiguration engineRegistry;
     private MessageContext mc;
@@ -70,11 +71,12 @@
         UtilServer.start();
         service =
                 Utils.createSimpleService(serviceName,
-                                          Echo.class.getName(),
-                                          operationName);
+                        Echo.class.getName(),
+                        operationName);
         UtilServer.deployService(service);
         serviceContext =
-
UtilServer.getConfigurationContext().createServiceContext(service.getNam
e());
+
UtilServer.getConfigurationContext().createServiceContext(
+                        service.getName());
 
     }
 
@@ -90,11 +92,14 @@
         org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call();
 
         call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);
+        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                Constants.TRANSPORT_HTTP,
+                false);
 
         Callback callback = new Callback() {
             public void onComplete(AsyncResult result) {
-
TestingUtils.campareWithCreatedOMElement(result.getResponseEnvelope().ge
tBody().getFirstElement());
+                TestingUtils.campareWithCreatedOMElement(
+
result.getResponseEnvelope().getBody().getFirstElement());
                 finish = true;
             }
 
@@ -104,13 +109,16 @@
             }
         };
 
-        call.invokeNonBlocking(operationName.getLocalPart(), payload,
callback);
+        call.invokeNonBlocking(operationName.getLocalPart(),
+                payload,
+                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");
+                throw new AxisFault(
+                        "Server is shutdown as the Async response take
too longs time");
             }
         }
         call.close();
@@ -127,10 +135,13 @@
         org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call();
 
         call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);
+        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                Constants.TRANSPORT_HTTP,
+                false);
 
         OMElement result =
-                (OMElement)
call.invokeBlocking(operationName.getLocalPart(), payload);
+                (OMElement)
call.invokeBlocking(operationName.getLocalPart(),
+                        payload);
         TestingUtils.campareWithCreatedOMElement(result);
         call.close();
     }
@@ -142,9 +153,12 @@
         org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call();
 
         call.setTo(targetEPR);
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);
+        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                Constants.TRANSPORT_HTTP,
+                false);
 
-        OMElement result = (OMElement)
call.invokeBlocking(operationName.getLocalPart(), payload);
+        OMElement result = (OMElement) call.invokeBlocking(
+                operationName.getLocalPart(), payload);
         TestingUtils.campareWithCreatedOMElement(result);
         call.close();
     }

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/HandlerFailureTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/HandlerFailureTest.java?rev=210165&r1=210
164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/HandlerFailureTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/HandlerFailureTest.java Mon Jul 11 10:48:55 2005
@@ -49,10 +49,12 @@
     private static final String OPERATION_NAME = "echoOMElement";
 
 
-    private static final String ADDRESS = "http://127.0.0.1:" +
(UtilServer.TESTING_PORT) +
+    private static final String ADDRESS = "http://127.0.0.1:" +
+            (UtilServer.TESTING_PORT) +
             "/axis/services/" + SERVICE_NAME + "/" + OPERATION_NAME;
 //    private static final String ADDRESS =
"http://127.0.0.1:8080/axis/services/" + SERVICE_NAME;
-    private EndpointReference targetEPR = new
EndpointReference(AddressingConstants.WSA_TO, ADDRESS);
+    private EndpointReference targetEPR = new EndpointReference(
+            AddressingConstants.WSA_TO, ADDRESS);
     private QName serviceName = new QName("", SERVICE_NAME);
     //private QName serviceName = new QName("", targetEPR.getValue());
 
@@ -77,14 +79,28 @@
 
     public void testFailureAtServerRequestFlow() throws Exception {
         Flow flow = new FlowImpl();
-        Utils.addHandler(flow, new SpeakingHandler(),
PhaseMetadata.PHASE_POLICY_DETERMINATION);
-        Utils.addHandler(flow, new SpeakingHandler(),
PhaseMetadata.PHASE_POLICY_DETERMINATION);
-        Utils.addHandler(flow, new SpeakingHandler(),
PhaseMetadata.PHASE_POLICY_DETERMINATION);
-        Utils.addHandler(flow, new SpeakingHandler(),
PhaseMetadata.PHASE_POLICY_DETERMINATION);
-        Utils.addHandler(flow, culprit,
PhaseMetadata.PHASE_POLICY_DETERMINATION);
-        Utils.addHandler(flow, new SpeakingHandler(),
PhaseMetadata.PHASE_POLICY_DETERMINATION);
-
-        ServiceDescription service =
Utils.createSimpleService(serviceName, Echo.class.getName(),
operationName);
+        Utils.addHandler(flow,
+                new SpeakingHandler(),
+                PhaseMetadata.PHASE_POLICY_DETERMINATION);
+        Utils.addHandler(flow,
+                new SpeakingHandler(),
+                PhaseMetadata.PHASE_POLICY_DETERMINATION);
+        Utils.addHandler(flow,
+                new SpeakingHandler(),
+                PhaseMetadata.PHASE_POLICY_DETERMINATION);
+        Utils.addHandler(flow,
+                new SpeakingHandler(),
+                PhaseMetadata.PHASE_POLICY_DETERMINATION);
+        Utils.addHandler(flow,
+                culprit,
+                PhaseMetadata.PHASE_POLICY_DETERMINATION);
+        Utils.addHandler(flow,
+                new SpeakingHandler(),
+                PhaseMetadata.PHASE_POLICY_DETERMINATION);
+
+        ServiceDescription service =
Utils.createSimpleService(serviceName,
+                Echo.class.getName(),
+                operationName);
         service.setInFlow(flow);
 
         UtilServer.start();
@@ -142,7 +158,8 @@
         try {
             SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
 
-            OMNamespace omNs =
fac.createOMNamespace("http://localhost/my", "my");
+            OMNamespace omNs =
fac.createOMNamespace("http://localhost/my",
+                    "my");
             OMElement method = fac.createOMElement("echoOMElement",
omNs);
             OMElement value = fac.createOMElement("myValue", omNs);
             value.setText("Isaac Assimov, the foundation Sega");
@@ -151,16 +168,22 @@
             org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call();
             //EndpointReference targetEPR = new
EndpointReference(AddressingConstants.WSA_TO, "http://127.0.0.1:" +
Utils.TESTING_PORT + "/axis/services/EchoXMLService");
             
-            call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);
+            call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                    Constants.TRANSPORT_HTTP,
+                    false);
             call.setTo(targetEPR);
-            OMElement result =
call.invokeBlocking(operationName.getLocalPart(), method);
-            OMOutput omOutput = new
OMOutput(XMLOutputFactory.newInstance().createXMLStreamWriter(System.out
));
+            OMElement result = call.invokeBlocking(
+                    operationName.getLocalPart(), method);
+            OMOutput omOutput = new OMOutput(
+
XMLOutputFactory.newInstance().createXMLStreamWriter(
+                            System.out));
             result.serialize(omOutput);
             omOutput.flush();
             fail("the test must fail due to bad service Name");
         } catch (AxisFault e) {
             e.printStackTrace();
-
assertTrue((e.getMessage().indexOf(UtilServer.FAILURE_MESSAGE)) > 0);
+            assertTrue(
+
(e.getMessage().indexOf(UtilServer.FAILURE_MESSAGE)) > 0);
             return;
         }
 

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/MessageWithServerTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/MessageWithServerTest.java?rev=210165&r1=
210164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/MessageWithServerTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/MessageWithServerTest.java Mon Jul 11 10:48:55 2005
@@ -56,19 +56,23 @@
 
     protected void setUp() throws Exception {
         UtilServer.start();
-        ServiceDescription service =
Utils.createSimpleService(serviceName, Echo.class.getName(),
operationName);
+        ServiceDescription service =
Utils.createSimpleService(serviceName,
+                Echo.class.getName(),
+                operationName);
 
 
         service.setInFlow(new MockFlow("service inflow", 4));
         service.setOutFlow(new MockFlow("service outflow", 5));
         //service.setFaultInFlow(new MockFlow("service faultflow", 1));
 
-        ModuleDescription m1 = new ModuleDescription(new QName("", "A
Mdoule 1"));
+        ModuleDescription m1 = new ModuleDescription(
+                new QName("", "A Mdoule 1"));
         m1.setInFlow(new MockFlow("service module inflow", 4));
         //m1.setFaultInFlow(new MockFlow("service module faultflow",
1));
         service.engageModule(m1);
 
-        OperationDescription operation = new
OperationDescription(operationName);
+        OperationDescription operation = new OperationDescription(
+                operationName);
         service.addOperation(operation);
 
         UtilServer.deployService(service);

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/MockFlow.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/MockFlow.java?rev=210165&r1=210164&r2=210
165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/MockFlow.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/MockFlow.java Mon Jul 11 10:48:55 2005
@@ -23,7 +23,8 @@
     public MockFlow(String message, int length) {

         super();

         for (int i = 0; i < length; i++) {

-            SpeakingHandler1 h1 = new SpeakingHandler1("Executing " + i
+ " inside " + message);

+            SpeakingHandler1 h1 = new SpeakingHandler1(

+                    "Executing " + i + " inside " + message);

             this.addHandler(h1.getHandlerDescription());

         }

     }


Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/OneWayRawXMLTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/OneWayRawXMLTest.java?rev=210165&r1=21016
4&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/OneWayRawXMLTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/OneWayRawXMLTest.java Mon Jul 11 10:48:55 2005
@@ -40,13 +40,14 @@
 public class OneWayRawXMLTest extends TestCase {
     private EndpointReference targetEPR =
             new EndpointReference(AddressingConstants.WSA_TO,
-                                  "http://127.0.0.1:"
-                                  + (UtilServer.TESTING_PORT)
-                                  +
"/axis/services/EchoXMLService/echoOMElement");
+                    "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 QName transportName = new QName("http://localhost/my",
+            "NullTransport");
 
     private AxisConfiguration engineRegistry;
     private MessageContext mc;
@@ -67,11 +68,13 @@
         UtilServer.start();
 
         ServiceDescription service = new
ServiceDescription(serviceName);
-        OperationDescription operation = new
OperationDescription(operationName);
+        OperationDescription operation = new OperationDescription(
+                operationName);
         operation.setMessageReciever(new MessageReceiver() {
             public void recieve(MessageContext messgeCtx) throws
AxisFault {
                 envelope = messgeCtx.getEnvelope();
-
TestingUtils.campareWithCreatedOMElement(envelope.getBody().getFirstElem
ent());
+                TestingUtils.campareWithCreatedOMElement(
+                        envelope.getBody().getFirstElement());
             }
         });
         service.addOperation(operation);

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/SOAPversionTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/SOAPversionTest.java?rev=210165&r1=210164
&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/SOAPversionTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/SOAPversionTest.java Mon Jul 11 10:48:55 2005
@@ -9,7 +9,11 @@
 import org.apache.axis2.description.ServiceDescription;

 import org.apache.axis2.engine.util.MyInOutMEPClient;

 import org.apache.axis2.integration.UtilServer;

-import org.apache.axis2.om.*;

+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.soap.SOAPEnvelope;

 import org.apache.axis2.soap.SOAPFactory;

 import org.apache.axis2.soap.impl.llom.soap11.SOAP11Constants;

@@ -42,13 +46,14 @@
 public class SOAPversionTest extends TestCase {

     private EndpointReference targetEPR =

             new EndpointReference(AddressingConstants.WSA_TO,

-                                  "http://127.0.0.1:"

-                                  + (UtilServer.TESTING_PORT)

-                                  +
"/axis/services/EchoXMLService/echoOMElement");

+                    "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 QName transportName = new QName("http://localhost/my",

+            "NullTransport");

 

     private AxisConfiguration engineRegistry;

     private MessageContext mc;

@@ -63,11 +68,12 @@
         UtilServer.start();

         service =

                 Utils.createSimpleService(serviceName,

-                                          Echo.class.getName(),

-                                          operationName);

+                        Echo.class.getName(),

+                        operationName);

         UtilServer.deployService(service);

         serviceContext =

-
UtilServer.getConfigurationContext().createServiceContext(service.getNam
e());

+
UtilServer.getConfigurationContext().createServiceContext(

+                        service.getName());

 

     }

 

@@ -76,13 +82,19 @@
 

         OMElement payload = createEnvelope();

         MyInOutMEPClient inOutMEPClient = new MyInOutMEPClient();

-
inOutMEPClient.setSoapVersionURI(SOAP11Constants.SOAP_ENVELOPE_NAMESPACE
_URI);

+        inOutMEPClient.setSoapVersionURI(

+                SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);

         inOutMEPClient.setTo(targetEPR);

-        inOutMEPClient.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);

+        inOutMEPClient.setTransportInfo(Constants.TRANSPORT_HTTP,

+                Constants.TRANSPORT_HTTP,

+                false);

 

         SOAPEnvelope result =

-
inOutMEPClient.invokeBlockingWithEnvelopeOut(operationName.getLocalPart(
), payload);

-        assertEquals("SOAP Version received is not compatible",
SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,
result.getNamespace().getName());

+                inOutMEPClient.invokeBlockingWithEnvelopeOut(

+                        operationName.getLocalPart(), payload);

+        assertEquals("SOAP Version received is not compatible",

+                SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI,

+                result.getNamespace().getName());

         inOutMEPClient.close();

     }

 

@@ -91,13 +103,19 @@
 

         OMElement payload = createEnvelope();

         MyInOutMEPClient inOutMEPClient = new MyInOutMEPClient();

-
inOutMEPClient.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE
_URI);

+        inOutMEPClient.setSoapVersionURI(

+                SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);

         inOutMEPClient.setTo(targetEPR);

-        inOutMEPClient.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);

+        inOutMEPClient.setTransportInfo(Constants.TRANSPORT_HTTP,

+                Constants.TRANSPORT_HTTP,

+                false);

 

         SOAPEnvelope result =

-
inOutMEPClient.invokeBlockingWithEnvelopeOut(operationName.getLocalPart(
), payload);

-        assertEquals("SOAP Version received is not compatible",
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
result.getNamespace().getName());

+                inOutMEPClient.invokeBlockingWithEnvelopeOut(

+                        operationName.getLocalPart(), payload);

+        assertEquals("SOAP Version received is not compatible",

+                SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,

+                result.getNamespace().getName());

 

 

         inOutMEPClient.close();

@@ -108,13 +126,17 @@
 

         OMElement payload = createEnvelope();

         MyInOutMEPClient inOutMEPClient = new MyInOutMEPClient();

-
inOutMEPClient.setSoapVersionURI(SOAP12Constants.SOAP_ENVELOPE_NAMESPACE
_URI);

+        inOutMEPClient.setSoapVersionURI(

+                SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);

 

         inOutMEPClient.setTo(targetEPR);

-        inOutMEPClient.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);

+        inOutMEPClient.setTransportInfo(Constants.TRANSPORT_HTTP,

+                Constants.TRANSPORT_HTTP,

+                false);

 

         SOAPEnvelope result =

-
inOutMEPClient.invokeBlockingWithEnvelopeOut(operationName.getLocalPart(
), payload);

+                inOutMEPClient.invokeBlockingWithEnvelopeOut(

+                        operationName.getLocalPart(), payload);

 //        assertEquals("SOAP Version received is not compatible",
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI,
result.getNamespace().getName());

         try {

             OMOutput output = new OMOutput(System.out, false);

@@ -132,7 +154,8 @@
         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"));

+        value.addChild(

+                fac.createText(value, "Isaac Assimov, the foundation
Sega"));

         method.addChild(value);

 

         return method;


Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/ServiceDescriptionBuilderTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/ServiceDescriptionBuilderTest.java?rev=21
0165&r1=210164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/ServiceDescriptionBuilderTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/ServiceDescriptionBuilderTest.java Mon Jul 11 10:48:55 2005
@@ -40,11 +40,15 @@
     private void initialize() throws Exception {

 

         if (null == this.service) {

-            InputStream in = new FileInputStream(new
File("./test-resources/service.wsdl"));

+            InputStream in = new FileInputStream(

+                    new File("./test-resources/service.wsdl"));

             if (in == null) {

                 throw new Exception("Input Stream is null , fileNot
Found");

             }

-            WSDLDescription womDescription =
WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11).build(in, new
AxisDescWSDLComponentFactory()).getDescription();

+            WSDLDescription womDescription =
WOMBuilderFactory.getBuilder(

+                    WOMBuilderFactory.WSDL11)

+                    .build(in, new AxisDescWSDLComponentFactory())

+                    .getDescription();

             Iterator iterator =
womDescription.getServices().keySet().iterator();

             if (iterator.hasNext()) {

                 this.service = (ServiceDescription) iterator.next();


Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/ServiceDispatchingTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/engine/ServiceDispatchingTest.java?rev=210165&r1
=210164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/ServiceDispatchingTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/engine
/ServiceDispatchingTest.java Mon Jul 11 10:48:55 2005
@@ -40,13 +40,14 @@
 public class ServiceDispatchingTest extends TestCase {
     private EndpointReference targetEPR =
             new EndpointReference(AddressingConstants.WSA_TO,
-                                  "http://127.0.0.1:"
-                                  + (UtilServer.TESTING_PORT)
-                                  +
"/axis/services/EchoXMLService/echoOMElement");
+                    "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 QName transportName = new QName("http://localhost/my",
+            "NullTransport");
 
     private AxisConfiguration engineRegistry;
     private MessageContext mc;
@@ -67,10 +68,14 @@
 
     protected void setUp() throws Exception {
         UtilServer.start();
-        service = Utils.createSimpleService(serviceName,
Echo.class.getName(), operationName);
+        service =
+                Utils.createSimpleService(serviceName,
+                        Echo.class.getName(),
+                        operationName);
         UtilServer.deployService(service);
         serviceContext =
-
UtilServer.getConfigurationContext().createServiceContext(service.getNam
e());
+
UtilServer.getConfigurationContext().createServiceContext(
+                        service.getName());
 
     }
 
@@ -83,10 +88,14 @@
         SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
         OMElement payload = TestingUtils.createDummyOMElement();
         org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call();
-        call.setTo(new EndpointReference(AddressingConstants.WSA_TO,
-
"http://127.0.0.1:5555/axis/services/EchoXMLService/echoOMElement"));
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);
-        OMElement result = (OMElement)
call.invokeBlocking(operationName.getLocalPart(), payload);
+        call.setTo(
+                new EndpointReference(AddressingConstants.WSA_TO,
+
"http://127.0.0.1:5555/axis/services/EchoXMLService/echoOMElement"));
+        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                Constants.TRANSPORT_HTTP,
+                false);
+        OMElement result = (OMElement) call.invokeBlocking(
+                operationName.getLocalPart(), payload);
         TestingUtils.campareWithCreatedOMElement(result);
         call.close();
     }
@@ -96,14 +105,19 @@
         OMNamespace omNs = fac.createOMNamespace("http://dummyURL",
"my");
         OMElement payload = fac.createOMElement("echoOMElementRequest",
omNs);
         OMElement value = fac.createOMElement("myValue", omNs);
-        value.addChild(fac.createText(value, "Isaac Assimov, the
foundation Sega"));
+        value.addChild(
+                fac.createText(value, "Isaac Assimov, the foundation
Sega"));
         payload.addChild(value);
         org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call();
-        call.setTo(new EndpointReference(AddressingConstants.WSA_TO,
-
"http://127.0.0.1:5555/axis/services/EchoXMLService/"));
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);
+        call.setTo(
+                new EndpointReference(AddressingConstants.WSA_TO,
+
"http://127.0.0.1:5555/axis/services/EchoXMLService/"));
+        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                Constants.TRANSPORT_HTTP,
+                false);
         call.setSoapAction("echoOMElement");
-        OMElement result = (OMElement)
call.invokeBlocking(operationName.getLocalPart(), payload);
+        OMElement result = (OMElement) call.invokeBlocking(
+                operationName.getLocalPart(), payload);
         TestingUtils.campareWithCreatedOMElement(result);
         call.close();
     }
@@ -111,18 +125,24 @@
     public void testDispatchWithSOAPBody() throws Exception {
         SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
 
-        OMNamespace omNs =
fac.createOMNamespace("http://127.0.0.1:5555/axis/services/EchoXMLServic
e", "my");
+        OMNamespace omNs = fac.createOMNamespace(
+                "http://127.0.0.1:5555/axis/services/EchoXMLService",
"my");
         OMElement payload = fac.createOMElement("echoOMElement", omNs);
         OMElement value = fac.createOMElement("myValue", omNs);
-        value.addChild(fac.createText(value, "Isaac Assimov, the
foundation Sega"));
+        value.addChild(
+                fac.createText(value, "Isaac Assimov, the foundation
Sega"));
         payload.addChild(value);
 
 
         org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call();
-        call.setTo(new EndpointReference(AddressingConstants.WSA_TO,
-
"http://127.0.0.1:5555/axis/services/"));
-        call.setTransportInfo(Constants.TRANSPORT_HTTP,
Constants.TRANSPORT_HTTP, false);
-        OMElement result = (OMElement)
call.invokeBlocking(operationName.getLocalPart(), payload);
+        call.setTo(
+                new EndpointReference(AddressingConstants.WSA_TO,
+                        "http://127.0.0.1:5555/axis/services/"));
+        call.setTransportInfo(Constants.TRANSPORT_HTTP,
+                Constants.TRANSPORT_HTTP,
+                false);
+        OMElement result = (OMElement) call.invokeBlocking(
+                operationName.getLocalPart(), payload);
         TestingUtils.campareWithCreatedOMElement(result);
         call.close();
     }

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/sample
s/test/org/apache/axis2/engine/util/MyInOutMEPClient.java?rev=210165&r1=
210164&r2=210165&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 10:48:55 2005
@@ -33,15 +33,20 @@
         super(assumeServiceContext(null));

     }

 

-    public SOAPEnvelope invokeBlockingWithEnvelopeOut(String axisop,
OMElement toSend) throws AxisFault {

+    public SOAPEnvelope invokeBlockingWithEnvelopeOut(String axisop,

+                                                      OMElement toSend)
throws AxisFault {

         OperationDescription axisConfig =

-                serviceContext.getServiceConfig().getOperation(new
QName(axisop));

+                serviceContext.getServiceConfig().getOperation(

+                        new QName(axisop));

         if (axisConfig == null) {

             axisConfig = new OperationDescription(new QName(axisop));

-
axisConfig.setRemainingPhasesInFlow(operationTemplate.getRemainingPhases
InFlow());

+            axisConfig.setRemainingPhasesInFlow(

+                    operationTemplate.getRemainingPhasesInFlow());

 
axisConfig.setPhasesOutFlow(operationTemplate.getPhasesOutFlow());

-
axisConfig.setPhasesInFaultFlow(operationTemplate.getPhasesInFaultFlow()
);

-
axisConfig.setPhasesOutFaultFlow(operationTemplate.getPhasesOutFaultFlow
());

+            axisConfig.setPhasesInFaultFlow(

+                    operationTemplate.getPhasesInFaultFlow());

+            axisConfig.setPhasesOutFaultFlow(

+                    operationTemplate.getPhasesOutFaultFlow());

             serviceContext.getServiceConfig().addOperation(axisConfig);

         }

 

@@ -51,7 +56,8 @@
 //        }

         MessageContext msgctx = prepareTheSystem(toSend);

 

-        MessageContext responseContext =
super.invokeBlocking(axisConfig, msgctx);

+        MessageContext responseContext =
super.invokeBlocking(axisConfig,

+                msgctx);

         SOAPEnvelope envelope = responseContext.getEnvelope();

         return envelope;

     }


Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/EchoTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/integration/EchoTest.java?rev=210165&r1=210164&r
2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/EchoTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/EchoTest.java Mon Jul 11 10:48:55 2005
@@ -30,23 +30,32 @@
 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);
-    private final OMNamespace targetNs =
fac.createOMNamespace("http://axis.apache.org", "s");
+            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/integr
ation/TestingUtils.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/integration/TestingUtils.java?rev=210165&r1=2101
64&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/TestingUtils.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/TestingUtils.java Mon Jul 11 10:48:55 2005
@@ -29,7 +29,8 @@
         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"));
+        value.addChild(
+                fac.createText(value, "Isaac Assimov, the foundation
Sega"));
         method.addChild(value);
         return method;
     }

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/UtilServer.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/integration/UtilServer.java?rev=210165&r1=210164
&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/UtilServer.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/UtilServer.java Mon Jul 11 10:48:55 2005
@@ -39,11 +39,13 @@
 

     public static synchronized void deployService(ServiceDescription
service) throws AxisFault {

 
receiver.getSystemContext().getAxisConfiguration().addService(service);

-
Utils.resolvePhases(receiver.getSystemContext().getAxisConfiguration(),
service);

+
Utils.resolvePhases(receiver.getSystemContext().getAxisConfiguration(),

+                service);

     }

 

     public static synchronized void unDeployService(QName service)
throws AxisFault {

-
receiver.getSystemContext().getAxisConfiguration().removeService(service
);

+
receiver.getSystemContext().getAxisConfiguration().removeService(

+                service);

     }

 

     public static synchronized void start() throws Exception {

@@ -55,9 +57,12 @@
             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());

+            ConfigurationContext er = erfac.buildConfigurationContext(

+                    file.getAbsolutePath());

             try {

                 Thread.sleep(2000);

             } catch (InterruptedException e1) {

@@ -72,7 +77,9 @@
 

             try {

                 thread.start();

-                System.out.print("Server started on port " +
Constants.TESTING_PORT + ".....");

+                System.out.print(

+                        "Server started on port " +
Constants.TESTING_PORT +

+                        ".....");

             } finally {

 

             }

@@ -94,22 +101,27 @@
         return receiver.getSystemContext();

     }

 

-    public static ServiceContext
createAdressedEnabledClientSide(ServiceDescription service)

+    public static ServiceContext createAdressedEnabledClientSide(

+            ServiceDescription service)

             throws AxisFault {

         DeploymentEngine deploymentEngine = new DeploymentEngine();

-        File file = new
File(org.apache.axis2.Constants.TESTING_REPOSITORY +
"/modules/addressing.mar");

+        File file = new File(

+                org.apache.axis2.Constants.TESTING_REPOSITORY +

+                "/modules/addressing.mar");

         TestCase.assertTrue(file.exists());

         ModuleDescription moduleDesc =
deploymentEngine.buildModule(file);

 

         ConfigurationContextFactory efac = new
ConfigurationContextFactory();

-        ConfigurationContext sysContext =
efac.buildClientConfigurationContext(null);

+        ConfigurationContext sysContext =
efac.buildClientConfigurationContext(

+                null);

 

         sysContext.getAxisConfiguration().addMdoule(moduleDesc);

 
//sysContext.getAxisConfiguration().engageModule(moduleDesc.getName());

 

         sysContext.getAxisConfiguration().addService(service);

         //Utils.resolvePhases(sysContext.getEngineConfig(), service);

-        ServiceContext serviceContext =
sysContext.createServiceContext(service.getName());

+        ServiceContext serviceContext =
sysContext.createServiceContext(

+                service.getName());

         return serviceContext;

 

     }


Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/UtilsTCPServer.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/integration/UtilsTCPServer.java?rev=210165&r1=21
0164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/UtilsTCPServer.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/integr
ation/UtilsTCPServer.java Mon Jul 11 10:48:55 2005
@@ -64,9 +64,11 @@
             } 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/M
ailOneWayRawXMLTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java?rev=210165&r1=210
164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/M
ailOneWayRawXMLTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/M
ailOneWayRawXMLTest.java Mon Jul 11 10:48:55 2005
@@ -48,12 +48,14 @@
 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");
+                    "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");
@@ -76,15 +78,19 @@
     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)));
+                configContext.getAxisConfiguration().getTransportIn(
+                        new QName(Constants.TRANSPORT_MAIL)));
         ml.start();
 
         ServiceDescription service = new
ServiceDescription(serviceName);
-        OperationDescription operation = new
OperationDescription(operationName);
+        OperationDescription operation = new OperationDescription(
+                operationName);
         operation.setMessageReciever(new MessageReceiver() {
             public void recieve(MessageContext messgeCtx) throws
AxisFault {
                 envelope = messgeCtx.getEnvelope();
@@ -93,7 +99,8 @@
         service.addOperation(operation);
         configContext.getAxisConfiguration().addService(service);
         Utils.resolvePhases(configContext.getAxisConfiguration(),
service);
-        ServiceContext serviceContext =
configContext.createServiceContext(serviceName);
+        ServiceContext serviceContext =
configContext.createServiceContext(
+                serviceName);
     }
 
     protected void tearDown() throws Exception {
@@ -104,7 +111,8 @@
         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"));
+        value.addChild(
+                fac.createText(value, "Isaac Assimov, the foundation
Sega"));
         method.addChild(value);
 
         return method;
@@ -112,7 +120,8 @@
 
     public void testOneWay() throws Exception {
         ServiceDescription service = new
ServiceDescription(serviceName);
-        OperationDescription operation = new
OperationDescription(operationName);
+        OperationDescription operation = new OperationDescription(
+                operationName);
         operation.setMessageReciever(new MessageReceiver() {
             public void recieve(MessageContext messgeCtx) throws
AxisFault {
                 envelope = messgeCtx.getEnvelope();
@@ -121,7 +130,8 @@
         service.addOperation(operation);
         configContext.getAxisConfiguration().addService(service);
         Utils.resolvePhases(configContext.getAxisConfiguration(),
service);
-        ServiceContext serviceContext =
configContext.createServiceContext(serviceName);
+        ServiceContext serviceContext =
configContext.createServiceContext(
+                serviceName);
 
         SOAPFactory fac = OMAbstractFactory.getSOAP11Factory();
 
@@ -146,7 +156,10 @@
 
     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());

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/M
ailRequestResponseRawXMLTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java?rev=2101
65&r1=210164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/M
ailRequestResponseRawXMLTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/M
ailRequestResponseRawXMLTest.java Mon Jul 11 10:48:55 2005
@@ -28,12 +28,20 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.description.*;
+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.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.*;
+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.soap.SOAPEnvelope;
 import org.apache.axis2.transport.mail.MailTransportSender;
 import org.apache.axis2.transport.mail.SimpleMailListener;
@@ -50,11 +58,13 @@
 public class MailRequestResponseRawXMLTest extends TestCase {
     private EndpointReference targetEPR =
             new EndpointReference(AddressingConstants.WSA_TO,
-                                  "foo@127.0.0.1" +
"/axis/services/EchoXMLService/echoOMElement");
+                    "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");
-    private QName transportName = new QName("http://localhost/my",
"NullTransport");
+    private QName transportName = new QName("http://localhost/my",
+            "NullTransport");
 
     private AxisConfiguration engineRegistry;
     private MessageContext mc;
@@ -73,19 +83,26 @@
 
     protected void setUp() throws Exception {
         ConfigurationContext configContext =
createServerConfigurationContext();
-        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)));
+                configContext.getAxisConfiguration().getTransportIn(
+                        new QName(Constants.TRANSPORT_MAIL)));
         ml.start();
-        configContext.getAxisConfiguration().engageModule(new
QName(Constants.MODULE_ADDRESSING));
+        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);
+        ServiceContext serviceContext =
configContext.createServiceContext(
+                serviceName);
     }
 
     protected void tearDown() throws Exception {
@@ -96,7 +113,8 @@
         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"));
+        value.addChild(
+                fac.createText(value, "Isaac Assimov, the foundation
Sega"));
         method.addChild(value);
 
         return method;
@@ -106,7 +124,8 @@
 
         ConfigurationContext configContext =
createClientConfigurationContext();
         ServiceDescription service = new
ServiceDescription(serviceName);
-        OperationDescription operation = new
OperationDescription(operationName);
+        OperationDescription operation = new OperationDescription(
+                operationName);
         operation.setMessageReciever(new MessageReceiver() {
             public void recieve(MessageContext messgeCtx) throws
AxisFault {
                 envelope = messgeCtx.getEnvelope();
@@ -115,17 +134,24 @@
         service.addOperation(operation);
         configContext.getAxisConfiguration().addService(service);
         Utils.resolvePhases(configContext.getAxisConfiguration(),
service);
-        ServiceContext serviceContext =
configContext.createServiceContext(serviceName);
+        ServiceContext serviceContext =
configContext.createServiceContext(
+                serviceName);
 
-        org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call(serviceContext);
+        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);
+        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
)));
+                    result.getResponseEnvelope().serialize(
+                            new OMOutput(
+                                    XMLOutputFactory.newInstance()
+                            .createXMLStreamWriter(System.out)));
                 } catch (XMLStreamException e) {
                     reportError(e);
                 } finally {
@@ -139,13 +165,16 @@
             }
         };
 
-        call.invokeNonBlocking(operationName.getLocalPart(),
createEnvelope(), callback);
+        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");
+                throw new AxisFault(
+                        "Server is shutdown as the Async response take
too longs time");
             }
         }
         call.close();
@@ -155,25 +184,37 @@
     public ConfigurationContext createServerConfigurationContext()
throws Exception {
         ConfigurationContextFactory builder = new
ConfigurationContextFactory();
         ConfigurationContext configContext =
-
builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REP
OSITORY);
+                builder.buildConfigurationContext(
+                        org.apache.axis2.Constants.TESTING_REPOSITORY);
 
         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", "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.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.setReceiver(new SimpleMailListener());
         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.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);
 
@@ -185,25 +226,37 @@
     public ConfigurationContext createClientConfigurationContext()
throws Exception {
         ConfigurationContextFactory builder = new
ConfigurationContextFactory();
         ConfigurationContext configContext =
-
builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REP
OSITORY);
+                builder.buildConfigurationContext(
+                        org.apache.axis2.Constants.TESTING_REPOSITORY);
 
         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", "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.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.setReceiver(new SimpleMailListener());
         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.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);
 

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/M
ailetRequestResponceRawXMLTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/mail/MailetRequestResponceRawXMLTest.java?rev=21
0165&r1=210164&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/M
ailetRequestResponceRawXMLTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mail/M
ailetRequestResponceRawXMLTest.java Mon Jul 11 10:48:55 2005
@@ -26,12 +26,20 @@
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.description.*;
+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.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.*;
+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.soap.SOAPEnvelope;
 import org.apache.axis2.transport.mail.MailTransportSender;
 import org.apache.axis2.transport.mail.SimpleMailListener;
@@ -54,11 +62,13 @@
 public class MailetRequestResponceRawXMLTest extends TestCase {
     private EndpointReference targetEPR =
             new EndpointReference(AddressingConstants.WSA_TO,
-                                  "axis2-server@127.0.0.1" +
"/axis/services/EchoXMLService/echoOMElement");
+                    "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 QName transportName = new QName("http://localhost/my",
+            "NullTransport");
 
     private AxisConfiguration engineRegistry;
     private MessageContext mc;
@@ -77,13 +87,19 @@
 
     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));
+        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);
+                Utils.createSimpleService(serviceName,
+                        Echo.class.getName(),
+                        operationName);
         configContext.getAxisConfiguration().addService(service);
         Utils.resolvePhases(configContext.getAxisConfiguration(),
service);
-        ServiceContext serviceContext =
configContext.createServiceContext(serviceName);
+        ServiceContext serviceContext =
configContext.createServiceContext(
+                serviceName);
     }
 
     protected void tearDown() throws Exception {
@@ -94,7 +110,8 @@
         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"));
+        value.addChild(
+                fac.createText(value, "Isaac Assimov, the foundation
Sega"));
         method.addChild(value);
 
         return method;
@@ -104,7 +121,8 @@
 
         ConfigurationContext configContext =
createClientConfigurationContext();
         ServiceDescription service = new
ServiceDescription(serviceName);
-        OperationDescription operation = new
OperationDescription(operationName);
+        OperationDescription operation = new OperationDescription(
+                operationName);
         operation.setMessageReciever(new MessageReceiver() {
             public void recieve(MessageContext messgeCtx) throws
AxisFault {
                 envelope = messgeCtx.getEnvelope();
@@ -113,17 +131,24 @@
         service.addOperation(operation);
         configContext.getAxisConfiguration().addService(service);
         Utils.resolvePhases(configContext.getAxisConfiguration(),
service);
-        ServiceContext serviceContext =
configContext.createServiceContext(serviceName);
+        ServiceContext serviceContext =
configContext.createServiceContext(
+                serviceName);
 
-        org.apache.axis2.clientapi.Call call = new
org.apache.axis2.clientapi.Call(serviceContext);
+        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);
+        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
)));
+                    result.getResponseEnvelope().serialize(
+                            new OMOutput(
+                                    XMLOutputFactory.newInstance()
+                            .createXMLStreamWriter(System.out)));
                 } catch (XMLStreamException e) {
                     reportError(e);
                 } finally {
@@ -137,13 +162,16 @@
             }
         };
 
-        call.invokeNonBlocking(operationName.getLocalPart(),
createEnvelope(), callback);
+        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.");
+                throw new AxisFault(
+                        "Async response is taking too long[10s+].
Server is being shut down.");
             }
         }
         call.close();
@@ -153,25 +181,38 @@
     public ConfigurationContext createServerConfigurationContext()
throws Exception {
         ConfigurationContextFactory builder = new
ConfigurationContextFactory();
         ConfigurationContext configContext =
-
builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REP
OSITORY);
+                builder.buildConfigurationContext(
+                        org.apache.axis2.Constants.TESTING_REPOSITORY);
 
         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.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 =
-                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", "server"));
-        transportOut.addParameter(new
ParameterImpl("transport.mail.smtp.password", "axis2"));
-        transportOut.addParameter(new
ParameterImpl("transport.mail.smtp.port", "1049"));
+        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);
 
@@ -183,25 +224,38 @@
     public ConfigurationContext createClientConfigurationContext()
throws Exception {
         ConfigurationContextFactory builder = new
ConfigurationContextFactory();
         ConfigurationContext configContext =
-
builder.buildConfigurationContext(org.apache.axis2.Constants.TESTING_REP
OSITORY);
+                builder.buildConfigurationContext(
+                        org.apache.axis2.Constants.TESTING_REPOSITORY);
 
         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.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 =
-                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", "client"));
-        transportOut.addParameter(new
ParameterImpl("transport.mail.smtp.password", "axis2"));
-        transportOut.addParameter(new
ParameterImpl("transport.mail.smtp.port", "1049"));
+        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);
 

Modified:
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/E
choRawMTOMLoadTest.java
URL:
http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/sample
s/test/org/apache/axis2/mtom/EchoRawMTOMLoadTest.java?rev=210165&r1=2101
64&r2=210165&view=diff
========================================================================
======
---
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/E
choRawMTOMLoadTest.java (original)
+++
webservices/axis/trunk/java/modules/samples/test/org/apache/axis2/mtom/E
choRawMTOMLoadTest.java Mon Jul 11 10:48:55 2005
@@ -31,7 +31,11 @@
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.integration.UtilServer;
-import org.apache.axis2.om.*;
+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.impl.llom.OMTextImpl;
 import org.apache.axis2.soap.SOAPFactory;
 import org.apache.axis2.util.Utils;
@@ -42,9 +46,11 @@
 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 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());
 
@@ -53,7 +59,7 @@
     private QName operationName = new QName("echoOMElement");
 
     private QName transportName = new QName("http://localhost/my",
-                                            "NullTransport");
+            "NullTransport");
 
     private AxisConfiguration engineRegistry;
 
@@ -76,7 +82,7 @@
     protected void setUp() throws Exception {
         UtilServer.start(Constants.TESTING_PATH +
"MTOM-enabledRepository");
         service = Utils.createSimpleService(serviceName,
Echo.class.getName(),
-                                            operationName);
+                operationName);
         UtilServer.deployService(service);
         serviceContext = UtilServer.getConfigurationContext()
                 .createServiceContext(service.getName());
@@ -97,7 +103,8 @@
                                       98};
         for (int i = 0; i < 4; i++) {
             OMElement subData = fac.createOMElement("subData", omNs);
-            DataHandler dataHandler = new DataHandler(new
ByteArrayDataSource(byteArray));
+            DataHandler dataHandler = new DataHandler(
+                    new ByteArrayDataSource(byteArray));
             OMText textData = new OMTextImpl(dataHandler, true);
             //OMText textData = new OMTextImpl("Thilina Gunarathne");
             subData.addChild(textData);
@@ -117,12 +124,14 @@
 
             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.set(Constants.Configuration.ENABLE_MTOM,
+                    Constants.VALUE_TRUE);
             call.setTransportInfo(Constants.TRANSPORT_HTTP,
-                                  Constants.TRANSPORT_HTTP, false);
+                    Constants.TRANSPORT_HTTP, false);
 
             OMElement result = (OMElement)
call.invokeBlocking(operationName
-
.getLocalPart(), payload);
+                    .getLocalPart(),
+                    payload);
             OMElement ele = (OMElement) result.getFirstChild();
             OMElement ele1 = (OMElement) ele.getFirstChild();
             OMText binaryNode = (OMText) ele1.getFirstChild();