axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r538876 - in /webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2: deployment/DeploymentEngine.java transport/mail/SimpleMailListener.java
Date Thu, 17 May 2007 11:41:45 GMT
Author: deepal
Date: Thu May 17 04:41:44 2007
New Revision: 538876

URL: http://svn.apache.org/viewvc?view=rev&rev=538876
Log:
- when the operation complete it is required to called cleanup
- setting up axismessage at the smtp listener level

Modified:
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?view=diff&rev=538876&r1=538875&r2=538876
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
(original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
Thu May 17 04:41:44 2007
@@ -1010,6 +1010,35 @@
         }
     }
 
+     public static AxisServiceGroup loadServiceGroup(File serviceFile ,
+                                                     ConfigurationContext configCtx) throws
AxisFault {
+         try {
+             DeploymentFileData currentDeploymentFile = new DeploymentFileData(
+                     DeploymentConstants.TYPE_SERVICE, "");
+             DeploymentClassLoader classLoader = new DeploymentClassLoader(new URL[]{serviceFile.toURL()},
+                     new ArrayList(),
+                     Thread.currentThread().getContextClassLoader());
+             currentDeploymentFile.setClassLoader(classLoader);
+             AxisServiceGroup serviceGroup = new AxisServiceGroup();
+             serviceGroup.setServiceGroupClassLoader(classLoader);
+             serviceGroup.setServiceGroupName(serviceFile.getName());
+             AxisConfiguration axisConfig = configCtx.getAxisConfiguration();
+
+             HashMap wsdlServices = new HashMap();
+             ArchiveReader archiveReader = new ArchiveReader();
+             archiveReader.processFilesInFolder(serviceFile, wsdlServices);
+             InputStream serviceXml = classLoader.getResourceAsStream("META-INF/services.xml");
+             ArrayList serviceList = archiveReader.buildServiceGroup(serviceXml,
+                     currentDeploymentFile,
+                     serviceGroup,
+                     wsdlServices, configCtx);
+             fillServiceGroup(serviceGroup, serviceList, null, axisConfig);
+             return serviceGroup;
+         } catch (Exception e) {
+             throw new AxisFault(e);
+         }
+    }
+
     public File getServicesDir() {
         return servicesDir;
     }

Modified: webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java?view=diff&rev=538876&r1=538875&r2=538876
==============================================================================
--- webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java
(original)
+++ webservices/axis2/branches/java/1_2/modules/kernel/src/org/apache/axis2/transport/mail/SimpleMailListener.java
Thu May 17 04:41:44 2007
@@ -25,13 +25,12 @@
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.Constants;
+import org.apache.axis2.wsdl.WSDLConstants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.builder.BuilderUtil;
 import org.apache.axis2.context.*;
 import org.apache.axis2.context.MessageContext;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.transport.TransportUtils;
@@ -321,7 +320,10 @@
     }
 
     private MessageContext createMessageContextToMailWorker(MimeMessage msg) throws Exception
{
-
+        Object content = msg.getContent();
+        if(!(content instanceof Multipart)){
+            return null;
+        }
         MessageContext msgContext = null;
         TransportInDescription transportIn =
                 configurationContext.getAxisConfiguration()
@@ -375,8 +377,12 @@
             if(messageConetextId!=null){
                 OperationContext opContext = configurationContext.getOperationContext(messageConetextId);
                 if(opContext!=null && !opContext.isComplete()){
-                    //FixME
+                    AxisOperation axisOp = opContext.getAxisOperation();
+                    //TODO need to handle fault case as well ,
+                    //TODO  need to check whether the message contains fault , if so we need
to get the fault message
+                    AxisMessage inMessage = axisOp.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                     msgContext.setOperationContext(opContext);
+                    msgContext.setAxisMessage(inMessage);
                     opContext.addMessageContext(msgContext);
                     msgContext.setServiceContext(opContext.getServiceContext());
                 }



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message