axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cha...@apache.org
Subject svn commit: r398148 - in /webservices/axis2/trunk/java/modules: core/src/org/apache/axis2/transport/mail/ core/src/org/apache/axis2/transport/mail/server/ integration/test/org/apache/axis2/mail/
Date Sat, 29 Apr 2006 13:29:13 GMT
Author: chamil
Date: Sat Apr 29 06:29:11 2006
New Revision: 398148

URL: http://svn.apache.org/viewcvs?rev=398148&view=rev
Log:
Bringing the mail transport upto speed with the latest changes in the way axis2 work. 

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailTransportSender.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/SMTPWorker.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/UtilsMailServer.java
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-client-axis2.xml
    webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-server-axis2.xml

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailTransportSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailTransportSender.java?rev=398148&r1=398147&r2=398148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailTransportSender.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailTransportSender.java
Sat Apr 29 06:29:11 2006
@@ -17,6 +17,13 @@
 
 package org.apache.axis2.transport.mail;
 
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMOutputFormat;
+import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.context.MessageContext;
@@ -26,10 +33,6 @@
 import org.apache.axis2.transport.mail.server.MailSrvConstants;
 import org.apache.axis2.util.Utils;
 
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-
 public class MailTransportSender extends AbstractTransportSender {
 	
     private static final long serialVersionUID = -2858556361961169381L;
@@ -65,7 +68,8 @@
                     Utils.getParameterValue(transportOut.getParameter(MailSrvConstants.SMTP_PORT));
 
             if ((user != null) && (host != null) && (password != null) &&
(smtpPort != null)) {
-                EMailSender sender = new EMailSender(user, host, smtpPort, password);
+
+            	   EMailSender sender = new EMailSender(user, host, smtpPort, password);
 
                 // TODO this is just a temporary hack, fix this to use input streams
                 String eprAddress = msgContext.getTo().getAddress();
@@ -73,7 +77,6 @@
                 // In mail char set is what is being used. Charset encoding is not what is
expected here.
                 String charSet =
                         (String) msgContext.getProperty(MessageContext.CHARACTER_SET_ENCODING);
-
                 if (charSet == null) {
                     charSet = MailSrvConstants.DEFAULT_CHAR_SET;
                 }
@@ -88,7 +91,11 @@
                 } else {
                     email = eprAddress;
                 }
-
+                int emailColon = email.indexOf(":");
+                if (emailColon >= 0) {
+                		email = email.substring(emailColon + 1);
+                }
+                
                 sender.send(subject, email, new String(byteArrayOutputStream.toByteArray()),
                         charSet);
             } else {
@@ -124,6 +131,29 @@
     public OutputStream startSendWithToAddress(MessageContext msgContext, OutputStream out)
             throws AxisFault {
         return out;
+    }
+    public void writeMessage(MessageContext msgContext, OutputStream out) throws AxisFault
{
+        SOAPEnvelope envelope = msgContext.getEnvelope();
+        OMElement outputMessage = envelope;
+
+        if ((envelope != null) && msgContext.isDoingREST()) {
+            outputMessage = envelope.getBody().getFirstElement();
+        }
+
+        if (outputMessage != null) {
+            try {
+                OMOutputFormat format = new OMOutputFormat();
+
+                format.setDoOptimize(msgContext.isDoingMTOM());
+                format.setCharSetEncoding(null); //Set to null so that the code will not
fail on 7bit.
+                outputMessage.serializeAndConsume(out, format);
+                out.flush();
+            } catch (Exception e) {
+                throw new AxisFault(e);
+            }
+        } else {
+            throw new AxisFault(Messages.getMessage("outMessageNull"));
+        }
     }
 
     public void stop() {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java?rev=398148&r1=398147&r2=398148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/MailWorker.java
Sat Apr 29 06:29:11 2006
@@ -65,16 +65,13 @@
     public void run() {
         AxisEngine engine = new AxisEngine(configContext);
         MessageContext msgContext = null;
-
         // create and initialize a message context
         try {
             TransportInDescription transportIn =
                     configContext.getAxisConfiguration().getTransportIn(new QName(Constants.TRANSPORT_MAIL));
             TransportOutDescription transportOut =
                     configContext.getAxisConfiguration().getTransportOut(new QName(Constants.TRANSPORT_MAIL));
-
             if ((transportIn != null) && (transportOut != null)) {
-
                 // create Message Context
                 msgContext = new MessageContext();
                 msgContext.setConfigurationContext(configContext);
@@ -84,10 +81,12 @@
                 msgContext.setProperty(MailSrvConstants.CONTENT_TYPE, mimeMessage.getContentType());
                 msgContext.setProperty(MessageContext.CHARACTER_SET_ENCODING,
                         mimeMessage.getEncoding());
-
                 String soapAction = getMailHeader(MailSrvConstants.HEADER_SOAP_ACTION);
+                if (soapAction == null){
+                	soapAction = mimeMessage.getSubject();
+                }
 
-                msgContext.setWSAAction(soapAction);
+                //msgContext.setWSAAction(soapAction);
                 msgContext.setSoapAction(soapAction);
                 msgContext.setIncomingTransportName(Constants.TRANSPORT_MAIL);
 
@@ -120,7 +119,6 @@
                 XMLStreamReader reader =
                         XMLInputFactory.newInstance().createXMLStreamReader(bais);
                 String soapNamespaceURI = "";
-
                 if (mimeMessage.getContentType().indexOf(SOAP12Constants.SOAP_12_CONTENT_TYPE)
                         > -1) {
                     soapNamespaceURI = SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI;
@@ -131,9 +129,7 @@
 
                 StAXBuilder builder = new StAXSOAPModelBuilder(reader, soapNamespaceURI);
                 SOAPEnvelope envelope = (SOAPEnvelope) builder.getDocumentElement();
-
                 msgContext.setEnvelope(envelope);
-
                 if (envelope.getBody().hasFault()) {
                     engine.receiveFault(msgContext);
                 } else {
@@ -147,7 +143,6 @@
             try {
                 if (msgContext != null) {
                     MessageContext faultContext = engine.createFaultMessageContext(msgContext,
e);
-
                     engine.sendFault(faultContext);
                 } else {
                     log.error(e);
@@ -156,7 +151,6 @@
                 log.error(e);
             }
         }
-
         /*
          *
          * This part is ignored for the time being. CT 07-Feb-2005.

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java?rev=398148&r1=398147&r2=398148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/SimpleMailListener.java
Sat Apr 29 06:29:11 2006
@@ -186,7 +186,6 @@
         while (!stopped) {
             try {
                 EmailReceiver receiver = new EmailReceiver(user, host, port, password);
-
                 receiver.connect();
 
                 Message[] msgs = receiver.receive();
@@ -196,7 +195,6 @@
 
                     for (int i = 0; i < msgs.length; i++) {
                         MimeMessage msg = (MimeMessage) msgs[i];
-
                         if (msg != null) {
                             MailWorker worker = new MailWorker(msg, configurationContext);
 

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/SMTPWorker.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/SMTPWorker.java?rev=398148&r1=398147&r2=398148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/SMTPWorker.java
(original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/transport/mail/server/SMTPWorker.java
Sat Apr 29 06:29:11 2006
@@ -194,7 +194,7 @@
             try {
                 if (bodyData) {
                     temp += input;
-                    mail.setContent(temp, "text/plain");
+                    mail.setContent(temp, "text/xml"); //Since this is for axis2 :-)
                 } else {
                     mail.addHeaderLine(input);
                 }

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java?rev=398148&r1=398147&r2=398148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailOneWayRawXMLTest.java
Sat Apr 29 06:29:11 2006
@@ -18,6 +18,8 @@
 
 //todo
 
+import java.util.Iterator;
+
 import junit.framework.TestCase;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
@@ -33,6 +35,9 @@
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.description.AxisService;
 import org.apache.axis2.description.OutInAxisOperation;
+import org.apache.axis2.description.OutOnlyAxisOperation;
+import org.apache.axis2.description.TransportInDescription;
+import org.apache.axis2.description.TransportOutDescription;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.transport.mail.SimpleMailListener;
 
@@ -40,13 +45,14 @@
 
 public class MailOneWayRawXMLTest extends TestCase {
     private EndpointReference targetEPR =
-            new EndpointReference("mailto:foo@127.0.0.1" +
+            new EndpointReference("mail:foo@127.0.0.1" +
                     "/axis2/services/EchoXMLService/echoOMElement");
     private QName serviceName = new QName("EchoXMLService");
     private QName operationName = new QName("echoOMElement");
 
 
     private ConfigurationContext configContext;
+    private ConfigurationContext clientConfigContext;
 
     private SOAPEnvelope envelope;
 
@@ -62,6 +68,7 @@
     protected void setUp() throws Exception {
         //start the mail server      
         configContext = UtilsMailServer.start();
+        clientConfigContext = UtilsMailServer.createClientConfigurationContext();
 
         SimpleMailListener ml = new SimpleMailListener();
         ml.init(configContext,
@@ -100,7 +107,7 @@
 
     public void testOneWay() throws Exception {
         AxisService service = new AxisService(serviceName.getLocalPart());
-        AxisOperation axisOperation = new OutInAxisOperation(
+        AxisOperation axisOperation = new OutOnlyAxisOperation(
         );
         axisOperation.setName(operationName);
         axisOperation.setMessageReceiver(new MessageReceiver() {
@@ -109,20 +116,17 @@
             }
         });
         service.addOperation(axisOperation);
-        configContext.getAxisConfiguration().addService(service);
+        //configContext.getAxisConfiguration().addService(service);
 
         OMElement payload = createEnvelope();
 
-        ServiceClient servicClient = new ServiceClient(configContext, service);
+        ServiceClient servicClient = new ServiceClient(clientConfigContext, service);
 
         Options options = new Options();
         options.setTo(targetEPR);
 
         servicClient.setOptions(options);
 
-        servicClient.sendRobust(operationName, payload);
-        while (envelope == null) {
-            Thread.sleep(4000);
-        }
+        servicClient.fireAndForget(operationName, payload);
     }
 }

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java?rev=398148&r1=398147&r2=398148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/MailRequestResponseRawXMLTest.java
Sat Apr 29 06:29:11 2006
@@ -42,6 +42,7 @@
 import org.apache.axis2.engine.Echo;
 import org.apache.axis2.engine.MessageReceiver;
 import org.apache.axis2.transport.mail.SimpleMailListener;
+import org.apache.axis2.transport.mail.server.MailSrvConstants;
 import org.apache.axis2.util.Utils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -51,7 +52,7 @@
 import javax.xml.stream.XMLStreamException;
 
 public class MailRequestResponseRawXMLTest extends TestCase {
-    private EndpointReference targetEPR = new EndpointReference("foo@127.0.0.1"
+    private EndpointReference targetEPR = new EndpointReference("mail:foo@127.0.0.1"
             + "/axis2/services/EchoXMLService/echoOMElement");
 
     private Log log = LogFactory.getLog(getClass());
@@ -64,6 +65,8 @@
 
     private SOAPEnvelope envelope;
 
+    private ConfigurationContext serverConfigContext;
+    
     public MailRequestResponseRawXMLTest() {
         super(MailRequestResponseRawXMLTest.class.getName());
     }
@@ -73,18 +76,17 @@
     }
 
     protected void setUp() throws Exception {
-        ConfigurationContext configContext = UtilsMailServer.start();
+        serverConfigContext = UtilsMailServer.start();
 
         SimpleMailListener ml = new SimpleMailListener();
-
-        ml.init(configContext, configContext.getAxisConfiguration()
+        ml.init(serverConfigContext, serverConfigContext.getAxisConfiguration()
                 .getTransportIn(new QName(Constants.TRANSPORT_MAIL)));
         ml.start();
         // configContext.getAxisConfiguration().engageModule(
         // new QName(Constants.MODULE_ADDRESSING));
         AxisService service = Utils.createSimpleService(serviceName, Echo.class
                 .getName(), operationName);
-        configContext.getAxisConfiguration().addService(service);
+        serverConfigContext.getAxisConfiguration().addService(service);
     }
 
     protected void tearDown() throws Exception {
@@ -122,6 +124,7 @@
 
         Options options = new Options();
         options.setTo(targetEPR);
+        options.setAction(operationName.getLocalPart());
         options.setTransportInProtocol(Constants.TRANSPORT_MAIL);
         options.setUseSeparateListener(true);
 
@@ -146,7 +149,7 @@
 
         ServiceClient sender = new ServiceClient(configContext, service);
         sender.setOptions(options);
-        options.setTo(targetEPR);
+        //options.setTo(targetEPR);
         sender.sendReceiveNonBlocking(operationName, createEnvelope(), callback);
 
         int index = 0;
@@ -155,7 +158,7 @@
             index++;
             if (index > 10) {
                 throw new AxisFault(
-                        "Server was shutdown as the async response take too long to complete");
+                        "Server was shutdown as the async response is taking too long to
complete.");
             }
         }
 

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/UtilsMailServer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/UtilsMailServer.java?rev=398148&r1=398147&r2=398148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/UtilsMailServer.java
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/UtilsMailServer.java
Sat Apr 29 06:29:11 2006
@@ -58,7 +58,7 @@
                     "Mail repository directory " + file.getAbsolutePath() + " does not exsist",
                     file.exists());
             SERVER_CONFIG_CONTEXT =
-                    ConfigurationContextFactory.createConfigurationContextFromFileSystem(file.getAbsolutePath(),null);
+                    ConfigurationContextFactory.createConfigurationContextFromFileSystem(file.getAbsolutePath(),
file.getAbsolutePath() + "/conf/axis2.xml");
         }
         return SERVER_CONFIG_CONTEXT;
     }
@@ -71,7 +71,7 @@
                 "Mail repository directory " + file.getAbsolutePath() + " does not exsist",
                 file.exists());
         CLIENT_CONFIG_CONTEXT =
-                ConfigurationContextFactory.createConfigurationContextFromFileSystem(file.getAbsolutePath(),null);
+                ConfigurationContextFactory.createConfigurationContextFromFileSystem(file.getAbsolutePath(),
file.getAbsolutePath() + "/conf/axis2.xml");
         }
         return CLIENT_CONFIG_CONTEXT;
     }

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-client-axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-client-axis2.xml?rev=398148&r1=398147&r2=398148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-client-axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-client-axis2.xml
Sat Apr 29 06:29:11 2006
@@ -4,24 +4,48 @@
     <!-- ================================================= -->
     <parameter name="hotdeployment" locked="false">true</parameter>
     <parameter name="hotupdate" locked="false">false</parameter>
+    <parameter name="enableMTOM" locked="false">false</parameter>
+    <parameter name="sendStacktraceDetailsWithFaults" locked="false">true</parameter>
+
+    <!-- Uncomment this to enable REST support -->
+    <!--    <parameter name="enableREST" locked="false">true</parameter>-->
 
 
     <parameter name="userName" locked="false">admin</parameter>
     <parameter name="password" locked="false">axis2</parameter>
 
+    <!-- If you have a frontend host which exposes this webservice using a different public
URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl" locked="false">https://someotherhost/context</parameter>-->
+
 
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
 
     <!-- ================================================= -->
     <!-- Message Receivers -->
     <!-- ================================================= -->
-    <!-- This is the Deafult Message Receiver for the Request Response style Operations
-->
-    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
-
+    <!--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers
for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you
can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovride this for particular service by adding the same element with
your requirement-->
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
     <!-- ================================================= -->
     <!-- Transport Ins -->
     <!-- ================================================= -->
-    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
         <parameter name="port" locked="false">6060</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">http://myApp.com/ws</parameter>-->
     </transportReceiver>
 
     <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
@@ -32,19 +56,42 @@
         <parameter name="transport.mail.replyToAddress" locked="false">bar@127.0.0.1</parameter>
     </transportReceiver>
 
-    <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
+    <transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
         <parameter name="port" locked="false">6060</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">tcp://myApp.com/ws</parameter>-->
     </transportReceiver>
 
+    <!--Uncomment this if you want JMS transport support-->
+    <!--<transportReceiver name="jms" class="org.apache.axis2.transport.jms.SimpleJMSListener">-->
+    <!--<parameter name="transport.jms.Destination" locked="false">dynamicQueues/FOO</parameter>-->
+    <!--<parameter name="java.naming.factory.initial" locked="false">-->
+    <!--org.activemq.jndi.ActiveMQInitialContextFactory</parameter>-->
+    <!--<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>-->
+    <!--</transportReceiver>-->
+
     <!-- ================================================= -->
     <!-- Transport Outs -->
     <!-- ================================================= -->
 
-
-    <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
-    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>
-    <transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
-
+    <transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/>
+    <transportSender name="jms"
+                     class="org.apache.axis2.transport.jms.JMSSender"/>
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
 
     <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">
         <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>
@@ -56,31 +103,36 @@
     <!-- ================================================= -->
     <!-- Global Modules  -->
     <!-- ================================================= -->
-    <!-- Uncomment this to enable Addressing -->
+    <!-- Comment this to disable Addressing -->
     <module ref="addressing"/>
 
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
     <!-- ================================================= -->
     <!-- Phases  -->
     <!-- ================================================= -->
     <phaseOrder type="inflow">
         <!--  System pre defined phases       -->
-        <phase name="TransportIn"/>
-        <phase name="PreDispatch"/>
-        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
-            <handler name="AddressingBasedDispatcher"
-                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-
+         <phase name="Transport">
             <handler name="RequestURIBasedDispatcher"
                      class="org.apache.axis2.engine.RequestURIBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
-
             <handler name="SOAPActionBasedDispatcher"
                      class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
 
             <handler name="SOAPMessageBodyBasedDispatcher"
                      class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
@@ -93,24 +145,50 @@
         </phase>
         <!--  System pre defined phases       -->
         <!--   After Postdispatch phase module author or or service author can add any
phase he want      -->
-        <phase name="userphase1"/>
+        <phase name="OperationInPhase"/>
     </phaseOrder>
     <phaseOrder type="outflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutPhase"/>
         <!--system predefined phase-->
         <!--these phase will run irrespective of the service-->
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
     </phaseOrder>
     <phaseOrder type="INfaultflow">
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationInFaultPhase"/>
     </phaseOrder>
     <phaseOrder type="Outfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutFaultPhase"/>
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
     </phaseOrder>
-</axisconfig>
+</axisconfig>
\ No newline at end of file

Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-server-axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-server-axis2.xml?rev=398148&r1=398147&r2=398148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-server-axis2.xml
(original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/axis2/mail/mail-enabled-server-axis2.xml
Sat Apr 29 06:29:11 2006
@@ -4,24 +4,48 @@
     <!-- ================================================= -->
     <parameter name="hotdeployment" locked="false">true</parameter>
     <parameter name="hotupdate" locked="false">false</parameter>
+    <parameter name="enableMTOM" locked="false">false</parameter>
+    <parameter name="sendStacktraceDetailsWithFaults" locked="false">true</parameter>
+
+    <!-- Uncomment this to enable REST support -->
+    <!--    <parameter name="enableREST" locked="false">true</parameter>-->
 
 
     <parameter name="userName" locked="false">admin</parameter>
     <parameter name="password" locked="false">axis2</parameter>
 
+    <!-- If you have a frontend host which exposes this webservice using a different public
URL  -->
+    <!-- use this parameter to override autodetected url -->
+    <!--<parameter name="httpFrontendHostUrl" locked="false">https://someotherhost/context</parameter>-->
+
 
+    <!--    The way of adding listener to the system-->
+    <!--    <listener class="org.apache.axis2.ObserverIMPL">-->
+    <!--        <parameter name="RSS_URL" locked="false">http://127.0.0.1/rss</parameter>-->
+    <!--    </listener>-->
 
     <!-- ================================================= -->
     <!-- Message Receivers -->
     <!-- ================================================= -->
-    <!-- This is the Deafult Message Receiver for the Request Response style Operations
-->
-    <messageReceiver mep="INOUT" class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
-
+    <!--This is the Deafult Message Receiver for the system , if you want to have MessageReceivers
for -->
+    <!--all the other MEP implement it and add the correct entry to here , so that you
can refer from-->
+    <!--any operation -->
+    <!--Note : You can ovride this for particular service by adding the same element with
your requirement-->
+    <messageReceivers>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
+                         class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
+                         class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+    </messageReceivers>
     <!-- ================================================= -->
     <!-- Transport Ins -->
     <!-- ================================================= -->
-    <transportReceiver name="http" class="org.apache.axis2.transport.http.SimpleHTTPServer">
+    <transportReceiver name="http"
+                       class="org.apache.axis2.transport.http.SimpleHTTPServer">
         <parameter name="port" locked="false">6060</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">http://myApp.com/ws</parameter>-->
     </transportReceiver>
 
     <transportReceiver name="mail" class="org.apache.axis2.transport.mail.SimpleMailListener">
@@ -32,19 +56,42 @@
         <parameter name="transport.mail.replyToAddress" locked="false">foo@127.0.0.1</parameter>
     </transportReceiver>
 
-    <transportReceiver name="tcp" class="org.apache.axis2.transport.tcp.TCPServer">
+    <transportReceiver name="tcp"
+                       class="org.apache.axis2.transport.tcp.TCPServer">
         <parameter name="port" locked="false">6060</parameter>
+        <!--If you want to give your own host address for EPR generation-->
+        <!--uncommet following paramter , and set as you required.-->
+        <!--<parameter name="hostname" locked="false">tcp://myApp.com/ws</parameter>-->
     </transportReceiver>
 
+    <!--Uncomment this if you want JMS transport support-->
+    <!--<transportReceiver name="jms" class="org.apache.axis2.transport.jms.SimpleJMSListener">-->
+    <!--<parameter name="transport.jms.Destination" locked="false">dynamicQueues/FOO</parameter>-->
+    <!--<parameter name="java.naming.factory.initial" locked="false">-->
+    <!--org.activemq.jndi.ActiveMQInitialContextFactory</parameter>-->
+    <!--<parameter name="java.naming.provider.url" locked="false">tcp://localhost:61616</parameter>-->
+    <!--</transportReceiver>-->
+
     <!-- ================================================= -->
     <!-- Transport Outs -->
     <!-- ================================================= -->
 
-
-    <transportSender name="tcp" class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
-    <transportSender name="local" class="org.apache.axis2.transport.local.LocalTransportSender"/>
-    <transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"/>
-
+    <transportSender name="tcp"
+                     class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+    <transportSender name="local"
+                     class="org.apache.axis2.transport.local.LocalTransportSender"/>
+    <transportSender name="jms"
+                     class="org.apache.axis2.transport.jms.JMSSender"/>
+    <transportSender name="http"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
+    <transportSender name="https"
+                     class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+        <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+        <parameter name="Transfer-Encoding" locked="false">chunked</parameter>
+    </transportSender>
 
     <transportSender name="mail" class="org.apache.axis2.transport.mail.MailTransportSender">
         <parameter name="transport.mail.smtp.host" locked="false">127.0.0.1</parameter>
@@ -56,31 +103,36 @@
     <!-- ================================================= -->
     <!-- Global Modules  -->
     <!-- ================================================= -->
-    <!-- Uncomment this to enable Addressing -->
+    <!-- Comment this to disable Addressing -->
     <module ref="addressing"/>
 
+    <!--Configuring module , providing parameters for modules whether they refer or not-->
+    <!--<moduleConfig name="addressing">-->
+    <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
+    <!--</moduleConfig>-->
+
     <!-- ================================================= -->
     <!-- Phases  -->
     <!-- ================================================= -->
-   <phaseOrder type="inflow">
+    <phaseOrder type="inflow">
         <!--  System pre defined phases       -->
-        <phase name="TransportIn"/>
-        <phase name="PreDispatch"/>
-        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
-            <handler name="AddressingBasedDispatcher"
-                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
-                <order phase="Dispatch"/>
-            </handler>
-
+         <phase name="Transport">
             <handler name="RequestURIBasedDispatcher"
                      class="org.apache.axis2.engine.RequestURIBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
-
             <handler name="SOAPActionBasedDispatcher"
                      class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
                 <order phase="Dispatch"/>
             </handler>
+        </phase>
+        <phase name="Security"/>
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
 
             <handler name="SOAPMessageBodyBasedDispatcher"
                      class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
@@ -93,24 +145,50 @@
         </phase>
         <!--  System pre defined phases       -->
         <!--   After Postdispatch phase module author or or service author can add any
phase he want      -->
-        <phase name="userphase1"/>
+        <phase name="OperationInPhase"/>
     </phaseOrder>
     <phaseOrder type="outflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutPhase"/>
         <!--system predefined phase-->
         <!--these phase will run irrespective of the service-->
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
     </phaseOrder>
     <phaseOrder type="INfaultflow">
+        <phase name="PreDispatch"/>
+        <phase name="Dispatch" class="org.apache.axis2.engine.DispatchPhase">
+            <handler name="RequestURIBasedDispatcher"
+                     class="org.apache.axis2.engine.RequestURIBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPActionBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPActionBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="AddressingBasedDispatcher"
+                     class="org.apache.axis2.engine.AddressingBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+
+            <handler name="SOAPMessageBodyBasedDispatcher"
+                     class="org.apache.axis2.engine.SOAPMessageBodyBasedDispatcher">
+                <order phase="Dispatch"/>
+            </handler>
+            <handler name="InstanceDispatcher"
+                     class="org.apache.axis2.engine.InstanceDispatcher">
+                <order phase="PostDispatch"/>
+            </handler>
+        </phase>
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationInFaultPhase"/>
     </phaseOrder>
     <phaseOrder type="Outfaultflow">
         <!--      user can add his own phases to this area  -->
-        <phase name="userphase1"/>
+        <phase name="OperationOutFaultPhase"/>
         <phase name="PolicyDetermination"/>
         <phase name="MessageOut"/>
     </phaseOrder>
-</axisconfig>
+</axisconfig>
\ No newline at end of file



Mime
View raw message