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 de...@apache.org on 2005/08/03 05:26:38 UTC

svn commit: r227152 [1/2] - in /webservices/axis/trunk/java/modules: common/src/org/apache/axis2/i18n/ core/src/org/apache/axis2/deployment/ core/src/org/apache/axis2/deployment/repository/util/ core/src/org/apache/axis2/deployment/util/ core/src/org/a...

Author: deepal
Date: Tue Aug  2 20:25:51 2005
New Revision: 227152

URL: http://svn.apache.org/viewcvs?rev=227152&view=rev
Log:
making deployment i18n

Modified:
    webservices/axis/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentParser.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/WSInfoList.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseHolder.java
    webservices/axis/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseResolver.java

Modified: webservices/axis/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties?rev=227152&r1=227151&r2=227152&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties (original)
+++ webservices/axis/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties Tue Aug  2 20:25:51 2005
@@ -50,3 +50,49 @@
 rawXmlProivdeIsLimited=Raw Xml provider supports only the methods bearing the signature public OMElement <method-name>(OMElement) where the method name is anything
 methodNotImplemented=Implementation class does not define a method called
 blockInvocationExpectsRes=Blocking invocation always expect a response
+
+#     Deployment Errors
+wsdlfilenotfound=WSDL file not found for the service :   {0}
+servicexmlnotfound=service.xml not found
+modulexmlnotfound=module.xml not found  for the module :   {0}
+classnotfound=Class Not found :  {0}
+repocannotbebull=Axis2 repositary can not be null
+confignotfound=can not found org/apache/axis2/deployment/axis2.xml
+pathtoconfigcanotnull=path to axis2.xml can not be NUll
+modulevalfailed=Module validation failed  {0}
+invalidphase=Invalid System predefined inphases , phase order dose not support\n recheck axis2.xml
+invalidmoduleref=Service   {0} Refer to invalide module  {1}
+invalidmodulerefbyop=Operation {0}     Refer to invalide module  {1}
+addingnewmodule=adding new module
+settingcl=Setting Class Loader  {0}
+deployingws=Deployement WS Name  {0}
+invalidservice=Invalid service  {0}
+deployeingmodule=Deploying module : {0}
+invalidmodule=Invalid module : {0} caused {1}
+serviceremoved=UnDeployement WS Name  {0}
+typemappingnotallowed=Type Mappings are not allowed in axis2.xml
+errorinloadingmr={0} Error in loading messageReceivers {1}
+invalidconfigattribute=invalid attributes in axis2.xml {0} {1}
+undifeineflowtype=un defined flow type {0}
+flowtypeisrequird=Flow type is a required attribute in  {0}
+elementisnotallow={0} element is not allowed in the axis2.xml
+outflownotallowedintrin=OUTFlow dose not support in AxisTransportIN  {0}
+unknownelement=Unknown element {0}
+inflownotallowedintrout=InFlow dose not support in TransportOutDescription  {0}
+badarguforservice={0} Bad arguments for the service {1}
+typemappingnotimpl=Type mapping dose not implemented yet
+beanmappingnotimpl=Bean mapping dose not implemented yet
+modulenotfound={0} module is invalid or dose not have bean deployed
+badparaagu=bad parameter arguments
+badlistagu=bad listener arguments
+invalidhandlerdif=Hanlder canot have both name and ref {0}
+thisshouldbeimplment=This should be implmented {0}
+opnotfoundinwsdl={0} Operation Name not found in WSDL
+badopattribute=bad attribute in operation  {0}
+unknownelementinop=Unknown element in opeartion {0}
+modulecannothavrbothnameandref=Module canot have both name and ref   {0}
+invalideleinmodule={0} elment is not allowed in module.xml
+invalidphase=Invalid Phase : {0} for the handler {1} dose not exit in axis2.xml or refering to phase in diffrent flow
+invalidmodulerefbyconfig=referance to invalid module  {0}    by axis2.xml
+phasedosenotspecified=Phase dose not specified for the handler {0}
+servicemodulecannothaveglobal=Service specific module can not refer system pre defined phases :  {0}
\ No newline at end of file

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java?rev=227152&r1=227151&r2=227152&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java Tue Aug  2 20:25:51 2005
@@ -1,10 +1,8 @@
 package org.apache.axis2.deployment;
 
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
+import org.apache.axis2.i18n.Messages;
+
+import java.io.*;
 import java.net.URL;
 import java.net.URLClassLoader;
 import java.util.ArrayList;
@@ -126,7 +124,8 @@
                 return cla;
             }
             if (!foundClass) {
-                throw new ClassNotFoundException("Class Not found : " + name);
+//                throw new ClassNotFoundException("Class Not found : " + name);
+                throw new ClassNotFoundException(Messages.getMessage(DeploymentErrorMsgs.CLASS_NOT_FOUND, name));
             }
 
         } catch (Exception e) {
@@ -181,7 +180,7 @@
             }
 
         }
-        throw new ClassNotFoundException("Class Not found : " + filename);
+        throw new ClassNotFoundException(Messages.getMessage(DeploymentErrorMsgs.CLASS_NOT_FOUND, filename));
     }
 }
 

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=227152&r1=227151&r2=227152&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java Tue Aug  2 20:25:51 2005
@@ -16,23 +16,7 @@
 
 package org.apache.axis2.deployment;
 
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.deployment.listener.RepositoryListenerImpl;
 import org.apache.axis2.deployment.repository.util.ArchiveFileData;
 import org.apache.axis2.deployment.repository.util.ArchiveReader;
@@ -41,22 +25,22 @@
 import org.apache.axis2.deployment.scheduler.Scheduler;
 import org.apache.axis2.deployment.scheduler.SchedulerTask;
 import org.apache.axis2.deployment.util.PhasesInfo;
-import org.apache.axis2.description.Flow;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.ModuleDescription;
-import org.apache.axis2.description.OperationDescription;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.AxisConfigurationImpl;
 import org.apache.axis2.engine.Handler;
+import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.modules.Module;
 import org.apache.axis2.phaseresolver.PhaseException;
 import org.apache.axis2.phaseresolver.PhaseMetadata;
-import org.apache.axis2.AxisFault;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import java.io.*;
+import java.util.*;
+
 
 public class DeploymentEngine implements DeploymentConstants {
 
@@ -129,9 +113,10 @@
         this(RepositaryName, "axis2.xml");
     }
 
-    public DeploymentEngine(String RepositaryName, String serverXMLFile) throws DeploymentException {
+    public DeploymentEngine(String RepositaryName, String serverXMLFile)
+            throws DeploymentException {
         if (RepositaryName == null || RepositaryName.trim().equals("")) {
-            throw new DeploymentException("Axis2 repositary can not be null");
+            throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.REPO_CAN_NOT_BE_NULL));
         }
         this.folderName = RepositaryName;
         axis2repository = RepositaryName;
@@ -146,8 +131,7 @@
         File serverConf = new File(repository, serverXMLFile);
         if (!serverConf.exists()) {
             ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            InputStream in = cl.getResourceAsStream(
-                    "org/apache/axis2/deployment/axis2.xml");
+            InputStream in = cl.getResourceAsStream("org/apache/axis2/deployment/axis2.xml");
             if (in != null) {
                 try {
                     serverConf.createNewFile();
@@ -166,9 +150,7 @@
 
 
             } else {
-                throw new DeploymentException(
-                        "can not found org/apache/axis2/deployment/axis2.xml");
-
+                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.CONFIG_NOT_FOUND));
             }
         }
 //        factory = new ConfigurationContextFactory();
@@ -194,10 +176,8 @@
      */
     private void setDeploymentFeatures() {
         String value;
-        Parameter parahotdeployment = ((AxisConfigurationImpl) axisConfig).getParameter(
-                HOTDEPLOYMENT);
-        Parameter parahotupdate = ((AxisConfigurationImpl) axisConfig).getParameter(
-                HOTUPDATE);
+        Parameter parahotdeployment = ((AxisConfigurationImpl) axisConfig).getParameter(HOTDEPLOYMENT);
+        Parameter parahotupdate = ((AxisConfigurationImpl) axisConfig).getParameter(HOTUPDATE);
         if (parahotdeployment != null) {
             value = (String) parahotdeployment.getValue();
             if ("false".equals(value))
@@ -213,7 +193,7 @@
 
     public AxisConfiguration load() throws DeploymentException {
         if (engineConfigName == null) {
-            throw new DeploymentException("path to axis2.xml can not be NUll");
+            throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.PATH_TO_CONFIG_CAN_NOT_B_NULL));
         }
         File tempfile = new File(engineConfigName);
         try {
@@ -223,7 +203,7 @@
             parser.processGlobalConfig(((AxisConfigurationImpl) axisConfig),
                     AXIS2CONFIG);
         } catch (FileNotFoundException e) {
-            throw new DeploymentException("Exception at deployment", e);
+            throw new DeploymentException(e);
         } catch (XMLStreamException e) {
             throw new DeploymentException(e);
         }
@@ -239,7 +219,7 @@
             validateSystemPredefinedPhases();
             ((AxisConfigurationImpl) axisConfig).setPhasesinfo(phasesinfo);
         } catch (AxisFault axisFault) {
-            log.info("Module validation failed" + axisFault.getMessage());
+            log.info(Messages.getMessage(DeploymentErrorMsgs.MODULE_VAL_FAILED, axisFault.getMessage()));
             throw new DeploymentException(axisFault);
         }
         return axisConfig;
@@ -258,13 +238,12 @@
                 File tempfile = new File(engineConfigName);
                 in = new FileInputStream(tempfile);
             } catch (FileNotFoundException e) {
-                throw new DeploymentException("Exception at deployment", e);
+                throw new DeploymentException(e);
             }
         } else {
             ClassLoader cl = Thread.currentThread().getContextClassLoader();
             in =
-                    cl.getResourceAsStream(
-                            "org/apache/axis2/deployment/axis2.xml");
+                    cl.getResourceAsStream("org/apache/axis2/deployment/axis2.xml");
         }
         try {
             axisConfig = createEngineConfig();
@@ -279,12 +258,11 @@
             hotUpdate = false;
             new RepositoryListenerImpl(folderName, this);
             try {
-                ((AxisConfigurationImpl) axisConfig).setRepository(
-                        axis2repository);
+                ((AxisConfigurationImpl) axisConfig).setRepository(axis2repository);
                 engagdeModules();
                 ((AxisConfigurationImpl) axisConfig).setPhasesinfo(phasesinfo);
             } catch (AxisFault axisFault) {
-                log.info("Module validation failed" + axisFault.getMessage());
+                log.info(Messages.getMessage(DeploymentErrorMsgs.MODULE_VAL_FAILED, axisFault.getMessage()));
                 throw new DeploymentException(axisFault);
             }
         }
@@ -306,8 +284,7 @@
         File serverConf = new File(repository, clientXML);
         if (!serverConf.exists()) {
             ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            InputStream in = cl.getResourceAsStream(
-                    "org/apache/axis2/deployment/axis2.xml");
+            InputStream in = cl.getResourceAsStream("org/apache/axis2/deployment/axis2.xml");
             if (in != null) {
                 try {
                     serverConf.createNewFile();
@@ -326,9 +303,7 @@
 
 
             } else {
-                throw new DeploymentException(
-                        "can not found org/apache/axis2/deployment/axis2.xml");
-
+                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.CONFIG_NOT_FOUND));
             }
         }
 //        factory = new ConfigurationContextFactory();
@@ -357,15 +332,11 @@
     private void validateSystemPredefinedPhases() throws DeploymentException {
         ArrayList inPhases = phasesinfo.getINPhases();
         //TODO condition checking should be otherway since null value can occur
-        if (!(((String) inPhases.get(0)).equals(
-                PhaseMetadata.PHASE_TRANSPORTIN) &&
-                ((String) inPhases.get(1)).equals(
-                        PhaseMetadata.PHASE_PRE_DISPATCH) &&
+        if (!(((String) inPhases.get(0)).equals(PhaseMetadata.PHASE_TRANSPORTIN) &&
+                ((String) inPhases.get(1)).equals(PhaseMetadata.PHASE_PRE_DISPATCH) &&
                 ((String) inPhases.get(2)).equals(PhaseMetadata.PHASE_DISPATCH) &&
-                ((String) inPhases.get(3)).equals(
-                        PhaseMetadata.PHASE_POST_DISPATCH))) {
-            throw new DeploymentException("Invalid System predefined inphases , phase order dose not" +
-                    " support\n recheck axis2.xml");
+                ((String) inPhases.get(3)).equals(PhaseMetadata.PHASE_POST_DISPATCH))) {
+            throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_PHASE));
         }
         //  ArrayList outPhaes = tempdata.getOutphases();
         //TODO do the validation code here
@@ -400,16 +371,12 @@
             serviceMetaData.setFileName(currentArchiveFile.getFile().getAbsolutePath());
             ArrayList list = currentArchiveFile.getModules();
             for (int i = 0; i < list.size(); i++) {
-                ModuleDescription module = axisConfig.getModule(
-                        (QName) list.get(i));
+                ModuleDescription module = axisConfig.getModule((QName) list.get(i));
                 if (module != null) {
-                    serviceMetaData.engageModule(module,axisConfig);
+                    serviceMetaData.engageModule(module, axisConfig);
                 } else {
-                    throw new DeploymentException(
-                            "Service  " +
-                            serviceMetaData.getName().getLocalPart() +
-                            "  Refer to invalide module  " +
-                            ((QName) list.get(i)).getLocalPart());
+                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_MODUELE_REF, serviceMetaData.getName().
+                            getLocalPart(), ((QName) list.get(i)).getLocalPart()));
                 }
             }
 
@@ -424,10 +391,8 @@
                     if (module != null) {
                         opDesc.engageModule(module);
                     } else {
-                        throw new DeploymentException(
-                                "Operation " + opDesc.getName().getLocalPart() +
-                                "  Refer to invalide module  " +
-                                moduleName.getLocalPart());
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_MODUELE_REF_BY_OP, opDesc.getName()
+                                .getLocalPart(), moduleName.getLocalPart()));
                     }
                 }
 
@@ -544,7 +509,7 @@
         }
         loadModuleClass(moduelmetada);
         axisConfig.addMdoule(moduelmetada);
-        log.info("adding new module");
+        log.info(Messages.getMessage(DeploymentErrorMsgs.ADDING_NEW_MODULE));
     }
 
 
@@ -570,7 +535,7 @@
                 try {
                     currentArchiveFile.setClassLoader();
                 } catch (AxisFault axisFault) {
-                    log.info("Setting Class Loader  " + axisFault);
+                    log.info(Messages.getMessage(DeploymentErrorMsgs.SETTING_CL, axisFault.getMessage()));
                     continue;
                 }
                 ArchiveReader archiveReader = new ArchiveReader();
@@ -580,51 +545,39 @@
                     case SERVICE:
                         try {
                             // ServiceDescription service = archiveReader.createService(currentArchiveFile.getAbsolutePath());
-                            ServiceDescription service = archiveReader.createService(
-                                    currentArchiveFile);
-                            archiveReader.readServiceArchive(
-                                    currentArchiveFile.getAbsolutePath(),
+                            ServiceDescription service = archiveReader.createService(currentArchiveFile);
+                            archiveReader.readServiceArchive(currentArchiveFile.getAbsolutePath(),
                                     this,
                                     service);
                             addnewService(service);
-                            log.info(
-                                    "Deployement WS Name  " +
-                                    currentArchiveFile.getName());
+                            log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_WS, currentArchiveFile.getName()));
                         } catch (DeploymentException de) {
-                            log.info(
-                                    "Invalid service" +
-                                    currentArchiveFile.getName());
-                            log.info("DeploymentException  " + de);
-                            PrintWriter error_ptintWriter = new PrintWriter(
-                                    errorWriter);
+                            log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE,
+                                    currentArchiveFile.getName()));
+//                            log.info("DeploymentException  " + de);
+                            PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
                             de.printStackTrace(error_ptintWriter);
                             serviceStatus = "Error:\n" +
                                     errorWriter.toString();
                         } catch (AxisFault axisFault) {
-                            log.info(
-                                    "Invalid service" +
-                                    currentArchiveFile.getName());
-                            log.info("AxisFault  " + axisFault);
-                            PrintWriter error_ptintWriter = new PrintWriter(
-                                    errorWriter);
+                            log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE,
+                                    currentArchiveFile.getName()));
+//                            log.info("AxisFault  " + axisFault);
+                            PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
                             axisFault.printStackTrace(error_ptintWriter);
                             serviceStatus = "Error:\n" +
                                     errorWriter.toString();
                         } catch (Exception e) {
-                            log.info(
-                                    "Invalid service" +
-                                    currentArchiveFile.getName());
-                            log.info("Exception  " + e);
-                            PrintWriter error_ptintWriter = new PrintWriter(
-                                    errorWriter);
-                           e.printStackTrace(error_ptintWriter);
+                            log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE,
+                                    currentArchiveFile.getName()));
+//                            log.info("Exception  " + e);
+                            PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
+                            e.printStackTrace(error_ptintWriter);
                             serviceStatus = "Error:\n" +
                                     errorWriter.toString();
                         } finally {
                             if (serviceStatus.startsWith("Error:")) {
-                                axisConfig.getFaulytServices().put(
-                                        getAxisServiceName(
-                                                currentArchiveFile.getName()),
+                                axisConfig.getFaulytServices().put(getAxisServiceName(currentArchiveFile.getName()),
                                         serviceStatus);
                             }
                             currentArchiveFile = null;
@@ -634,39 +587,34 @@
                         String moduleStatus = "";
                         try {
                             ModuleDescription metaData = new ModuleDescription();
-                            archiveReader.readModuleArchive(
-                                    currentArchiveFile.getAbsolutePath(),
+                            archiveReader.readModuleArchive(currentArchiveFile.getAbsolutePath(),
                                     this,
                                     metaData);
                             addNewModule(metaData);
-                            log.info(
-                                    "Moduel WS Name  " +
-                                    currentArchiveFile.getName() +
-                                    " modulename :" +
-                                    metaData.getName());
+                            log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_MODULE,
+                                    metaData.getName().getLocalPart()));
+//                                    "Moduel WS Name  " +
+//                                    currentArchiveFile.getName() +
+//                                    " modulename :" +
+//                                    metaData.getName());
                         } catch (DeploymentException e) {
-                            log.info(
-                                    "Invalid module" +
-                                    currentArchiveFile.getName());
-                            log.info("DeploymentException  " + e);
-                            PrintWriter error_ptintWriter = new PrintWriter(
-                                    errorWriter);
+                            log.info(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE, currentArchiveFile.getName(),
+                                    e.getMessage()));
+//                                    "Invalid module" +
+//                                    currentArchiveFile.getName());
+//                            log.info("DeploymentException  " + e);
+                            PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
                             e.printStackTrace(error_ptintWriter);
                             moduleStatus = "Error:\n" + errorWriter.toString();
                         } catch (AxisFault axisFault) {
-                            log.info(
-                                    "Invalid module" +
-                                    currentArchiveFile.getName());
-                            log.info("AxisFault  " + axisFault);
-                            PrintWriter error_ptintWriter = new PrintWriter(
-                                    errorWriter);
+                            log.info(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE, currentArchiveFile.getName(),
+                                    axisFault.getMessage()));
+                            PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
                             axisFault.printStackTrace(error_ptintWriter);
                             moduleStatus = "Error:\n" + errorWriter.toString();
                         } finally {
                             if (moduleStatus.startsWith("Error:")) {
-                                axisConfig.getFaulytModules().put(
-                                        getAxisServiceName(
-                                                currentArchiveFile.getName()),
+                                axisConfig.getFaulytModules().put(getAxisServiceName(currentArchiveFile.getName()),
                                         moduleStatus);
                             }
                             currentArchiveFile = null;
@@ -688,16 +636,15 @@
                     if (wsInfo.getType() == SERVICE) {
                         serviceName = getAxisServiceName(wsInfo.getFilename());
                         axisConfig.removeService(new QName(serviceName));
-                        log.info(
-                                "UnDeployement WS Name  " +
-                                wsInfo.getFilename());
+                        log.info(Messages.getMessage(DeploymentErrorMsgs.SERVICE_REMOVED,
+                                wsInfo.getFilename()));
                     }
                     axisConfig.getFaulytServices().remove(serviceName);
                 }
 
             }
         } catch (AxisFault e) {
-            log.info("AxisFault " + e);
+            log.info(e);
         }
         wsToUnDeploy.clear();
     }
@@ -807,8 +754,7 @@
             currentArchiveFile = new ArchiveFileData(modulearchive, MODULE);
             axismodule = new ModuleDescription();
             ArchiveReader archiveReader = new ArchiveReader();
-            archiveReader.readModuleArchive(
-                    currentArchiveFile.getAbsolutePath(), this, axismodule);
+            archiveReader.readModuleArchive(currentArchiveFile.getAbsolutePath(), this, axismodule);
             currentArchiveFile.setClassLoader();
             Flow inflow = axismodule.getInFlow();
             if (inflow != null) {

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentParser.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentParser.java?rev=227152&r1=227151&r2=227152&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentParser.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentParser.java Tue Aug  2 20:25:51 2005
@@ -16,35 +16,26 @@
 
 package org.apache.axis2.deployment;
 
-import java.io.InputStream;
-import java.util.ArrayList;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
+import org.apache.axis2.AxisFault;
 import org.apache.axis2.deployment.util.PhasesInfo;
-import org.apache.axis2.description.Flow;
-import org.apache.axis2.description.FlowImpl;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.ModuleDescription;
-import org.apache.axis2.description.OperationDescription;
-import org.apache.axis2.description.Parameter;
-import org.apache.axis2.description.ParameterImpl;
-import org.apache.axis2.description.ServiceDescription;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfigurationImpl;
 import org.apache.axis2.engine.AxisObserver;
 import org.apache.axis2.engine.MessageReceiver;
+import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.transport.TransportListener;
 import org.apache.axis2.transport.TransportSender;
-import org.apache.axis2.AxisFault;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import java.io.InputStream;
+import java.util.ArrayList;
+
 /**
  * This class is used to parse the following xml douments
  * 1 axis2.xml
@@ -79,8 +70,7 @@
             throws XMLStreamException {
         this.dpengine = engine;
         pullparser =
-                XMLInputFactory.newInstance().createXMLStreamReader(
-                        inputStream);
+                XMLInputFactory.newInstance().createXMLStreamReader(inputStream);
     }
 
     public void parseServiceXML(ServiceDescription axisService) throws DeploymentException {
@@ -101,7 +91,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         }
     }
 
@@ -134,13 +124,11 @@
                         TransportInDescription transportin = proccessTrasnsportIN();
                         dpengine.getAxisConfig().addTransportIn(transportin);
                     } else if (TYPEMAPPINGST.equals(ST)) {
-                        throw new UnsupportedOperationException(
-                                "Type Mappings are not allowed in axis2.xml");
+                        throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.TYPE_MAPPING_NOT_ALLOWED));
                     } else if (MESSAGERECEIVER.equals(ST)) {
                         int attribCount = pullparser.getAttributeCount();
                         if (attribCount == 2) {
-                            String attname = pullparser.getAttributeLocalName(
-                                    0);
+                            String attname = pullparser.getAttributeLocalName(0);
                             String attvalue = pullparser.getAttributeValue(0);
                             if (MEP.equals(attname)) {
                                 String name = attvalue;
@@ -162,38 +150,37 @@
                                                     (MessageReceiver) messageReceiver.newInstance());
                                         }
                                     } catch (ClassNotFoundException e) {
-                                        throw new DeploymentException(
-                                                "Error in loading messageReceivers ",
-                                                e);
+                                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                                "ClassNotFoundException", attvalue));
+//                                                "Error in loading messageReceivers " + attvalue);
                                     } catch (IllegalAccessException e) {
-                                        throw new DeploymentException(
-                                                "Error in loading messageReceivers ",
-                                                e);
+                                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                                "IllegalAccessException", attvalue));
                                     } catch (InstantiationException e) {
-                                        throw new DeploymentException(
-                                                "Error in loading messageReceivers ",
-                                                e);
+                                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                                "InstantiationException", attvalue));
                                     }
                                 } else
-                                    throw new UnsupportedOperationException(
-                                            "invalid attributes in axis2.xml (messageReceiver elemet) "
-                                            + attname);
+                                    throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.
+                                            INVALID_CONFIG_ATTTRIBUTE, "(messageReceiver elemet)",
+                                            attname));
+//                                            "invalid attributes in axis2.xml (messageReceiver elemet) "
+//                                            + attname);
                             } else
-                                throw new UnsupportedOperationException(
-                                        "invalid attributes in axis2.xml (messageReceiver elemet) "
-                                        + attname);
+                                throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.
+                                        INVALID_CONFIG_ATTTRIBUTE, "(messageReceiver elemet)",
+                                        attname));
                         } else
-                            throw new UnsupportedOperationException(
-                                    "invalid attributes in axis2.xml (messageReceiver elemet)");
+                            throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.
+                                    INVALID_CONFIG_ATTTRIBUTE, "",
+                                    ""));
 
                     } else if (MODULEST.equals(ST)) {
                         int attribCount = pullparser.getAttributeCount();
                         if (attribCount > 0) {
                             for (int i = 0; i < attribCount; i++) {
-                                String attname = pullparser.getAttributeLocalName(
-                                        i);
-                                String attvalue = pullparser.getAttributeValue(
-                                        i);
+                                String attname = pullparser.getAttributeLocalName(i);
+                                String attvalue = pullparser.getAttributeValue(i);
                                 if (REF.equals(attname)) {
                                     dpengine.addModule(new QName(attvalue));
                                     //   DeploymentData.getInstance().addModule(new QName(attvalue));
@@ -205,38 +192,34 @@
                         PhasesInfo info = dpengine.getPhasesinfo();
                         if (attribCount > 0) {
                             for (int i = 0; i < attribCount; i++) {
-                                String attname = pullparser.getAttributeLocalName(
-                                        i);
-                                String attvalue = pullparser.getAttributeValue(
-                                        i);
+                                String attname = pullparser.getAttributeLocalName(i);
+                                String attvalue = pullparser.getAttributeValue(i);
                                 if (TYPE.equals(attname)) {
                                     if (INFLOWST.equals(attvalue)) {
                                         info.setINPhases(processPhaseOrder());
                                     } else if (OUTFLOWST.equals(attvalue)) {
                                         info.setOUTPhases(processPhaseOrder());
                                     } else if (IN_FAILTFLOW.equals(attvalue)) {
-                                        info.setIN_FaultPhases(
-                                                processPhaseOrder());
+                                        info.setIN_FaultPhases(processPhaseOrder());
                                     } else if (OUT_FAILTFLOW.equals(attvalue)) {
-                                        info.setOUT_FaultPhases(
-                                                processPhaseOrder());
+                                        info.setOUT_FaultPhases(processPhaseOrder());
                                     } else {
-                                        throw new DeploymentException(
-                                                "un defined flow type  " + ST);
+                                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNDEFINE_FLOW_TYPE, ST));
+//                                                "un defined flow type  " + ST);
                                     }
                                 }
                             }
                         } else {
-                            throw new DeploymentException(
-                                    "Flow type is a required attribute in " +
-                                    ST);
+                            throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.FLOWTYPE_IS_REQD, ST));
+//                                    "Flow type is a required attribute in " +
+//                                    ST);
                         }
-                    } else if (LISTENERST.equals(ST)){
+                    } else if (LISTENERST.equals(ST)) {
                         processListener(axisGlobal);
                     } else {
-                        throw new UnsupportedOperationException(
-                                ST +
-                                " element is not allowed in the axis2.xml");
+                        throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.ELEMENT_IS_NOT_ALLOWED, ST));
+//                                ST +
+//                                " element is not allowed in the axis2.xml");
                     }
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
@@ -247,7 +230,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (AxisFault e) {
             throw new DeploymentException(e);
         }
@@ -298,16 +281,13 @@
                         Flow inFlow = processInFlow();
                         transportin.setInFlow(inFlow);
                     } else if (transportin != null && OUTFLOWST.equals(tagnae)) {
-                        throw new DeploymentException(
-                                "OUTFlow dose not support in AxisTransportIN " +
-                                tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.OUTFLOW_NOT_ALLOWED_IN_TRS_IN, tagnae));
                     } else if (transportin != null &&
                             IN_FAILTFLOW.equals(tagnae)) {
                         Flow faultFlow = processInFaultFlow();
                         transportin.setFaultFlow(faultFlow);
                     } else {
-                        throw new DeploymentException(
-                                "Unknown element " + tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
                     }
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
@@ -318,7 +298,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -367,9 +347,7 @@
                         Parameter parameter = processParameter();
                         transportout.addParameter(parameter);
                     } else if (transportout != null && INFLOWST.equals(tagnae)) {
-                        throw new DeploymentException(
-                                "InFlow dose not support in TransportOutDescription  " +
-                                tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.INFLOW_NOT_ALLOWED_IN_TRS_OUT, tagnae));
                     } else if (transportout != null &&
                             OUTFLOWST.equals(tagnae)) {
                         Flow outFlow = processOutFlow();
@@ -379,8 +357,7 @@
                         Flow faultFlow = processOutFaultFlow();
                         transportout.setFaultFlow(faultFlow);
                     } else {
-                        throw new DeploymentException(
-                                "Unknown element " + tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
                     }
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
@@ -391,7 +368,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -409,30 +386,19 @@
                 String attvalue = pullparser.getAttributeValue(i);
                 if (ATQNAME.equals(attname)) {
                     if (attvalue == null || attvalue.trim().equals("")) {
-                        axisService.setName(
-                                new QName(
-                                        getAxisServiceName(
-                                                dpengine.getCurrentFileItem()
+                        axisService.setName(new QName(getAxisServiceName(dpengine.getCurrentFileItem()
                                 .getServiceName())));
                     } else {
                         axisService.setName(new QName(attvalue));
                     }
                 } else {
-                    throw new DeploymentException(
-                            attname
-                            + " Bad arguments for the service"
-                            +
-                            getAxisServiceName(
-                                    dpengine.getCurrentFileItem()
-                            .getServiceName()));
+                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.BAD_ARGU_4_SERVICE, attname, getAxisServiceName(dpengine.getCurrentFileItem()
+                            .getServiceName())));
                 }
             }
         } else {
             //if user dose not specify the service name then the default name will be the archive name
-            axisService.setName(
-                    new QName(
-                            getAxisServiceName(
-                                    dpengine.getCurrentFileItem()
+            axisService.setName(new QName(getAxisServiceName(dpengine.getCurrentFileItem()
                     .getServiceName())));
         }
         boolean END_DOCUMENT = false;
@@ -453,16 +419,13 @@
                         String desc = processDescription();
                         axisService.setServiceDescription(desc);
                     } else if (TYPEMAPPINGST.equals(ST)) {
-                        throw new UnsupportedOperationException(
-                                "Type mapping dose not implemented yet ");
+                        throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.TYPE_MAPPING_NOT_IMPLEMENTED));
                         //  processTypeMapping();
                     } else if (BEANMAPPINGST.equals(ST)) {
-                        throw new UnsupportedOperationException(
-                                "Bean mapping dose not implemented yet ");
+                        throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.BEAN_MAPPING_NOT_IMPLEMENTED));
                         // processBeanMapping();
                     } else if (OPRATIONST.equals(ST)) {
-                        OperationDescription operation = processOperation(
-                                axisService);
+                        OperationDescription operation = processOperation(axisService);
                         PhasesInfo info = dpengine.getPhasesinfo();
                         info.setOperationPhases(operation);
 //                        DeploymentData.getInstance().setOperationPhases(operation);
@@ -475,24 +438,22 @@
                                         Thread.currentThread()
                                         .getContextClassLoader();
                                 Class messageReceiver =
-                                        Class.forName(
-                                                "org.apache.axis2.receivers.RawXMLINOutMessageReceiver",
+                                        Class.forName("org.apache.axis2.receivers.RawXMLINOutMessageReceiver",
                                                 true,
                                                 loader1);
-                                operation.setMessageReciever(
-                                        (MessageReceiver) messageReceiver.newInstance());
+                                operation.setMessageReciever((MessageReceiver) messageReceiver.newInstance());
                             } catch (ClassNotFoundException e) {
-                                throw new DeploymentException(
-                                        "Error in loading messageReceivers " +
-                                        e.getMessage());
+                                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                        "ClassNotFoundException",
+                                        "org.apache.axis2.receivers.RawXMLINOutMessageReceiver"));
                             } catch (IllegalAccessException e) {
-                                throw new DeploymentException(
-                                        "Error in loading messageReceivers " +
-                                        e.getMessage());
+                                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                        "IllegalAccessException",
+                                        "org.apache.axis2.receivers.RawXMLINOutMessageReceiver"));
                             } catch (InstantiationException e) {
-                                throw new DeploymentException(
-                                        "Error in loading messageReceivers " +
-                                        e.getMessage());
+                                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                        "InstantiationException",
+                                        "org.apache.axis2.receivers.RawXMLINOutMessageReceiver"));
                             }
                         }
                         axisService.addOperation(operation);
@@ -512,17 +473,12 @@
                         attribCount = pullparser.getAttributeCount();
                         if (attribCount > 0) {
                             for (int i = 0; i < attribCount; i++) {
-                                String attname = pullparser.getAttributeLocalName(
-                                        i);
-                                String attvalue = pullparser.getAttributeValue(
-                                        i);
+                                String attname = pullparser.getAttributeLocalName(i);
+                                String attvalue = pullparser.getAttributeValue(i);
                                 if (REF.equals(attname)) {
                                     if (dpengine.getModule(new QName(attvalue)) ==
                                             null) {
-                                        throw new DeploymentException(
-                                                ST
-                                                +
-                                                " module is invalid or dose not have bean deployed");
+                                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.MODEULE_NOT_FOUND, ST));
                                     } else {
                                         dpengine.getCurrentFileItem()
                                                 .addModule(new QName(attvalue));
@@ -532,13 +488,12 @@
                         }
 
                     } else {
-                        throw new DeploymentException(
-                                "parser Exception : un supported element" + ST);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, ST));
                     }
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (AxisFault axisFault) {
             throw new DeploymentException(axisFault);
         }
@@ -564,7 +519,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -591,7 +546,7 @@
 
             }
         } else {
-            throw new DeploymentException("bad parameter arguments");
+            throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.BAD_PARA_ARGU));
         }
 
         boolean END_PARAMETER = false;
@@ -614,7 +569,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -626,14 +581,14 @@
     private void processListener(AxisConfigurationImpl axisGlobal) throws DeploymentException {
         AxisObserver observer = null;
         int attribCount = pullparser.getAttributeCount();
-        if (attribCount ==1) {
+        if (attribCount == 1) {
             String attname = pullparser.getAttributeLocalName(0);
             String attvalue = pullparser.getAttributeValue(0);
             if (CLASSNAME.equals(attname)) {
                 try {
-                    Class observerclass =  Class.forName(attvalue,true,Thread.currentThread().
+                    Class observerclass = Class.forName(attvalue, true, Thread.currentThread().
                             getContextClassLoader());
-                    observer =  (AxisObserver) observerclass.newInstance();
+                    observer = (AxisObserver) observerclass.newInstance();
                 } catch (ClassNotFoundException e) {
                     throw new DeploymentException(e);
                 } catch (IllegalAccessException e) {
@@ -644,7 +599,7 @@
             }
 
         } else {
-            throw new DeploymentException("bad listener arguments");
+            throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.BAD_LIST_ARGU));
         }
 
         boolean END_LISTENER = false;
@@ -653,18 +608,16 @@
                 int eventType = pullparser.next();
                 if (eventType == XMLStreamConstants.END_DOCUMENT) {
                     END_LISTENER = true;
-                }else if (eventType == XMLStreamConstants.START_ELEMENT) {
+                } else if (eventType == XMLStreamConstants.START_ELEMENT) {
                     String tagnae = pullparser.getLocalName();
                     if (tagnae.equals(PARAMETERST)) {
                         Parameter parameter = processParameter();
                         observer.addParameter(parameter);
                     } else {
-                        throw new DeploymentException(
-                                "parser Exception : un supported element" +
-                                tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
                     }
 
-                }else if (eventType == XMLStreamConstants.END_ELEMENT) {
+                } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
                     if (LISTENERST.equals(endtagname)) {
                         END_LISTENER = true;
@@ -674,7 +627,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -704,22 +657,17 @@
                 handler.setClassName(attvalue);
             } else if (ATTNAME.equals(attname)) {
                 if (ref_name) {
-                    throw new DeploymentException(
-                            "Hanlder canot have both name and ref  " +
-                            attvalue);
+                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.INVALID_HANDLER_DIF, attvalue));
                 } else {
                     handler.setName(new QName(attvalue));
                     ref_name = true;
                 }
             } else if (REF.equals(attname)) {
                 if (ref_name) {
-                    throw new DeploymentException(
-                            "Hanlder canot have both name and ref  " +
-                            attvalue);
+                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.INVALID_HANDLER_DIF, attvalue));
                 } else {
                     ref_name = true;
-                    throw new UnsupportedOperationException(
-                            "This should be implmented");
+                    throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.THIS_SHOULD_BE_IMPLEMENTED, attvalue));
                 }
             }
         }
@@ -737,8 +685,7 @@
                     if (ORDER.equals(tagnae)) {
                         attribCount = pullparser.getAttributeCount();
                         for (int i = 0; i < attribCount; i++) {
-                            String attname = pullparser.getAttributeLocalName(
-                                    i);
+                            String attname = pullparser.getAttributeLocalName(i);
                             String attvalue = pullparser.getAttributeValue(i);
 
                             if (AFTER.equals(attname)) {
@@ -768,9 +715,7 @@
                         Parameter parameter = processParameter();
                         handler.addParameter(parameter);
                     } else {
-                        throw new DeploymentException(
-                                "parser Exception : un supported element" +
-                                tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
                     }
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
@@ -781,7 +726,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -814,14 +759,13 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
     }
 
-    private OperationDescription processOperation(
-            ServiceDescription axisService) throws DeploymentException {
+    private OperationDescription processOperation(ServiceDescription axisService) throws DeploymentException {
         //  String name = pullparser.getLocalName();
         OperationDescription operation = null; //= new OperationDescription();
         int attribCount = pullparser.getAttributeCount();
@@ -836,16 +780,13 @@
                     if (operation == null) {
                         operation = new OperationDescription();
                         operation.setName(new QName(attvalue));
-                        log.info(
-                                attvalue +
-                                "  Operation Name not found in WSDL");
+                        log.info(Messages.getMessage(DeploymentErrorMsgs.OP_NOT_FOUN_IN_WSDL, attvalue));
                     }
 
                 } else if (MEP.equals(attname)) {
                     operation.setMessageExchangePattern(attvalue);
                 } else
-                    throw new DeploymentException(
-                            "bad attribute in operation " + attname);
+                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.BAD_OP_ATTRIBUTE, attname));
             }
         }
         boolean END_OPERATION = false;
@@ -860,20 +801,14 @@
                         attribCount = pullparser.getAttributeCount();
                         if (attribCount > 0) {
                             for (int i = 0; i < attribCount; i++) {
-                                String attname = pullparser.getAttributeLocalName(
-                                        i);
-                                String attvalue = pullparser.getAttributeValue(
-                                        i);
+                                String attname = pullparser.getAttributeLocalName(i);
+                                String attvalue = pullparser.getAttributeValue(i);
                                 if (REF.equals(attname)) {
                                     if (dpengine.getModule(new QName(attvalue)) ==
                                             null) {
-                                        throw new DeploymentException(
-                                                ST
-                                                +
-                                                " module is invalid or dose not have bean deployed");
+                                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.MODEULE_NOT_FOUND, ST));
                                     } else {
-                                        operation.addModule(
-                                                new QName(attvalue));
+                                        operation.addModule(new QName(attvalue));
                                     }
                                 }
                             }
@@ -882,19 +817,15 @@
                         Parameter parameter = processParameter();
                         operation.addParameter(parameter);
                     } else if (IN_FAILTFLOW.equals(ST)) {
-                        throw new UnsupportedOperationException(
-                                "nexted elements are not allowed for M1");
+                        throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_IN_OPERATION, ST));
                     } else if (INFLOWST.equals(ST)) {
-                        throw new UnsupportedOperationException(
-                                "nexted elements are not allowed for M1");
+                        throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_IN_OPERATION, ST));
                     } else if (OUTFLOWST.equals(ST)) {
-                        throw new UnsupportedOperationException(
-                                "nexted elements are not allowed for M1");
+                        throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_IN_OPERATION, ST));
                     } else if (MESSAGERECEIVER.equals(ST)) {
                         attribCount = pullparser.getAttributeCount();
                         if (attribCount > 0) {
-                            String attname = pullparser.getAttributeLocalName(
-                                    0);
+                            String attname = pullparser.getAttributeLocalName(0);
                             String attvalue = pullparser.getAttributeValue(0);
                             if (CLASSNAME.equals(attname)) {
                                 try {
@@ -909,26 +840,22 @@
                                                 Class.forName(attvalue,
                                                         true,
                                                         loader1);
-                                        operation.setMessageReciever(
-                                                (MessageReceiver) messageReceiver.newInstance());
+                                        operation.setMessageReciever((MessageReceiver) messageReceiver.newInstance());
                                     }
                                 } catch (ClassNotFoundException e) {
-                                    throw new DeploymentException(
-                                            "Error in loading messageReceivers ",
-                                            e);
+                                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                            "ClassNotFoundException", attvalue));
                                 } catch (IllegalAccessException e) {
-                                    throw new DeploymentException(
-                                            "Error in loading messageReceivers ",
-                                            e);
+                                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                            "IllegalAccessException", attvalue));
                                 } catch (InstantiationException e) {
-                                    throw new DeploymentException(
-                                            "Error in loading messageReceivers ",
-                                            e);
+                                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                            "InstantiationException", attvalue));
                                 }
                             } else {
-                                throw new UnsupportedOperationException(
-                                        attname +
-                                        " is not allowed in messageRecievr element");
+                                throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.
+                                        INVALID_CONFIG_ATTTRIBUTE, "(messageReceiver elemet)",
+                                        attname));
                             }
                         }
                     }
@@ -942,9 +869,9 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (AxisFault e) {
-            throw new DeploymentException("Axis fault", e);
+            throw new DeploymentException(e);
         }
         return operation;
     }
@@ -974,7 +901,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         }
     }
 
@@ -989,9 +916,8 @@
 
                 if (ATTNAME.equals(attname)) {
                     if (ref_name) {
-                        throw new DeploymentException(
-                                "Module canot have both name and ref  " +
-                                attvalue);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.MODULE_CANNOTHAVE_BOTH_NAME_AND_REF
+                                , attvalue));
                     } else {
                         module.setName(new QName(attvalue));
                         ref_name = true;
@@ -1001,14 +927,12 @@
                     dpengine.getCurrentFileItem().setModuleClass(attvalue);
                 } else if (REF.equals(attname)) {
                     if (ref_name) {
-                        throw new DeploymentException(
-                                "Module canot have both name and ref  " +
-                                attvalue);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.MODULE_CANNOTHAVE_BOTH_NAME_AND_REF
+                                , attvalue));
                     } else {
                         //  module.setRef(attvalue);
                         ref_name = true;
-                        throw new UnsupportedOperationException(
-                                "This should be implemented");
+                        throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.THIS_SHOULD_BE_IMPLEMENTED, attname));
                     }
                 }
             }
@@ -1055,30 +979,27 @@
                                         Thread.currentThread()
                                         .getContextClassLoader();
                                 Class messageReceiver =
-                                        Class.forName(
-                                                "org.apache.axis2.receivers.RawXMLINOutMessageReceiver",
+                                        Class.forName("org.apache.axis2.receivers.RawXMLINOutMessageReceiver",
                                                 true,
                                                 loader1);
-                                operation.setMessageReciever(
-                                        (MessageReceiver) messageReceiver.newInstance());
+                                operation.setMessageReciever((MessageReceiver) messageReceiver.newInstance());
                             } catch (ClassNotFoundException e) {
-                                throw new DeploymentException(
-                                        "Error in loading messageReceivers ",
-                                        e);
+                                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                        "ClassNotFoundException",
+                                        "org.apache.axis2.receivers.RawXMLINOutMessageReceiver"));
                             } catch (IllegalAccessException e) {
-                                throw new DeploymentException(
-                                        "Error in loading messageReceivers ",
-                                        e);
+                                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                        "IllegalAccessException",
+                                        "org.apache.axis2.receivers.RawXMLINOutMessageReceiver"));
                             } catch (InstantiationException e) {
-                                throw new DeploymentException(
-                                        "Error in loading messageReceivers ",
-                                        e);
+                                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.ERROR_IN_LOADING_MR,
+                                        "InstantiationException",
+                                        "org.apache.axis2.receivers.RawXMLINOutMessageReceiver"));
                             }
                         }
                         module.addOperation(operation);
                     } else {
-                        throw new UnsupportedOperationException(
-                                ST + "elment is not allowed in module.xml");
+                        throw new UnsupportedOperationException(Messages.getMessage(DeploymentErrorMsgs.INVALID_ELE_IN_MODULE, ST));
                     }
                     // complete implenatation
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
@@ -1090,7 +1011,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -1114,9 +1035,7 @@
                         HandlerDescription handler = processHandler();
                         inFlow.addHandler(handler);
                     } else {
-                        throw new DeploymentException(
-                                "parser Exception : un supported element" +
-                                tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
                     }
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
@@ -1127,7 +1046,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -1150,9 +1069,7 @@
                         HandlerDescription handler = processHandler();
                         outFlow.addHandler(handler);
                     } else {
-                        throw new DeploymentException(
-                                "parser Exception : un supported element" +
-                                tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
                     }
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
@@ -1163,7 +1080,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -1187,9 +1104,7 @@
                         HandlerDescription handler = processHandler();
                         faultFlow.addHandler(handler);
                     } else {
-                        throw new DeploymentException(
-                                "parser Exception : un supported element" +
-                                tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
                     }
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
@@ -1200,7 +1115,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -1223,9 +1138,7 @@
                         HandlerDescription handler = processHandler();
                         faultFlow.addHandler(handler);
                     } else {
-                        throw new DeploymentException(
-                                "parser Exception : un supported element" +
-                                tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
                     }
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
@@ -1236,7 +1149,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -1260,9 +1173,7 @@
                             pahseList.add(attvalue);
                         }
                     } else {
-                        throw new DeploymentException(
-                                "parser Exception : un supported element" +
-                                tagnae);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, tagnae));
                     }
                 } else if (eventType == XMLStreamConstants.END_ELEMENT) {
                     String endtagname = pullparser.getLocalName();
@@ -1273,7 +1184,7 @@
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         } catch (Exception e) {
             throw new DeploymentException(e);
         }
@@ -1333,15 +1244,14 @@
                         // module.setArchiveName(archiveName);
                         // module.setName(archiveName);
                     } else {
-                        throw new DeploymentException(
-                                "parser Exception : un supported element" + ST);
+                        throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.UNKNOWN_ELEMENT, ST));
                     }
                     //processStartElement();
                     break;
                 }
             }
         } catch (XMLStreamException e) {
-            throw new DeploymentException("parser Exception", e);
+            throw new DeploymentException(e);
         }
     }
 }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java?rev=227152&r1=227151&r2=227152&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java Tue Aug  2 20:25:51 2005
@@ -16,8 +16,8 @@
 
 package org.apache.axis2.deployment.repository.util;
 
-import org.apache.axis2.deployment.DeploymentClassLoader;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.deployment.DeploymentClassLoader;
 
 import javax.xml.namespace.QName;
 import java.io.File;
@@ -106,8 +106,7 @@
             URL[] urlsToLoadFrom = new URL[0];
             try {
                 if (!file.exists()) {
-                    throw new RuntimeException(
-                            "file not found !!!!!!!!!!!!!!!");
+                    throw new RuntimeException("file not found !!!!!!!!!!!!!!!");
                 }
                 URLs.add(file.toURL());
                 urlsToLoadFrom = new URL[]{file.toURL()};

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?rev=227152&r1=227151&r2=227152&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java Tue Aug  2 20:25:51 2005
@@ -16,13 +16,11 @@
 
 package org.apache.axis2.deployment.repository.util;
 
-import org.apache.axis2.deployment.DeploymentConstants;
-import org.apache.axis2.deployment.DeploymentEngine;
-import org.apache.axis2.deployment.DeploymentException;
-import org.apache.axis2.deployment.DeploymentParser;
+import org.apache.axis2.deployment.*;
 import org.apache.axis2.description.AxisDescWSDLComponentFactory;
 import org.apache.axis2.description.ModuleDescription;
 import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.i18n.Messages;
 import org.apache.axis2.wsdl.WSDLVersionWrapper;
 import org.apache.axis2.wsdl.builder.WOMBuilder;
 import org.apache.axis2.wsdl.builder.WOMBuilderFactory;
@@ -30,11 +28,7 @@
 import org.apache.commons.logging.LogFactory;
 import org.apache.wsdl.WSDLDescription;
 
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.InputStream;
+import java.io.*;
 import java.util.Iterator;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
@@ -85,8 +79,7 @@
         boolean foundservice = false;
         try {
             if (in != null) {
-                WOMBuilder builder = WOMBuilderFactory.getBuilder(
-                        WOMBuilderFactory.WSDL11);
+                WOMBuilder builder = WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11);
                 WSDLVersionWrapper wsdlVersionWrapper = builder.build(in,
                         new AxisDescWSDLComponentFactory());
                 WSDLDescription womDescription = wsdlVersionWrapper.getDescription();
@@ -105,9 +98,10 @@
                 in.close();
             } else {
                 service = new ServiceDescription();
-                log.info(
-                        "WSDL file not found for the service :  " +
-                        file.getName());
+                log.info(Messages.getMessage(DeploymentErrorMsgs.WSDL_FILE_NOT_FOUND,
+                        file.getName()));
+//                        "WSDL file not found for the service :  " +
+//                        file.getName());
             }
         } catch (Exception e) {
             throw new DeploymentException(e);
@@ -144,7 +138,8 @@
             }
             zin.close();
             if (!foundServiceXML) {
-                throw new DeploymentException("service.xml not found");
+                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.SERVICE_XML_NOT_FOUND));
+//                "service.xml not found");
             }
         } catch (Exception e) {
             throw new DeploymentException(e);
@@ -172,12 +167,12 @@
             //  zin.closeEntry();
             zin.close();
             if (!foundmoduleXML) {
-                throw new DeploymentException(
-                        "module.xml not found  for the module :  " +
-                        strArchive);
+                throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.MODULEXML_NOT_FOUND_FOR_THE_MODULE, strArchive));
+//                        "module.xml not found  for the module :  " +
+//                        strArchive);
             }
         } catch (Exception e) {
-            throw new DeploymentException(e.getMessage());
+            throw new DeploymentException(e);
         }
     }
 
@@ -226,14 +221,12 @@
             byte data[] = new byte[BUFFER];
 
             ClassLoader cl = Thread.currentThread().getContextClassLoader();
-            InputStream in = cl.getResourceAsStream(
-                    "modules/" + moduleName + ".mar");
+            InputStream in = cl.getResourceAsStream("modules/" + moduleName + ".mar");
             if (in == null) {
                 in = cl.getResourceAsStream("modules/" + moduleName + ".jar");
             }
             if (in == null) {
-                throw new DeploymentException(
-                        moduleName + " module is not found");
+                throw new DeploymentException(moduleName + " module is not found");
             }
             ZipInputStream zin = null;
             zin = new ZipInputStream(in);
@@ -249,7 +242,7 @@
             out.close();
             zin.close();
         } catch (Exception e) {
-            throw new DeploymentException(e.getMessage());
+            throw new DeploymentException(e);
         }
         return modulearchiveFile;
     }

Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/WSInfoList.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/WSInfoList.java?rev=227152&r1=227151&r2=227152&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/WSInfoList.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/WSInfoList.java Tue Aug  2 20:25:51 2005
@@ -75,22 +75,18 @@
                                 file.lastModified(),
                                 SERVICE);
                         jarlist.add(wsInfo);
-                        ArchiveFileData archiveFileData = new ArchiveFileData(
-                                file, SERVICE);
+                        ArchiveFileData archiveFileData = new ArchiveFileData(file, SERVICE);
                         deplorer.addtowsToDeploy(archiveFileData);//to inform that new web service is deployed
                     } else {
                         if (deplorer.isHotUpdate()) {
                             WSInfo tempWSInfo = getFileItem(file.getName());
                             if (isModified(file, tempWSInfo)) {  // caheck whether file is updated
-                                tempWSInfo.setLastmodifieddate(
-                                        file.lastModified());
-                                WSInfo wsInfo = new WSInfo(
-                                        tempWSInfo.getFilename(),
+                                tempWSInfo.setLastmodifieddate(file.lastModified());
+                                WSInfo wsInfo = new WSInfo(tempWSInfo.getFilename(),
                                         tempWSInfo.getLastmodifieddate(),
                                         SERVICE);
                                 deplorer.addtowstoUnDeploy(wsInfo);  // add entry to undeploy list
-                                ArchiveFileData archiveFileData = new ArchiveFileData(
-                                        file, SERVICE);
+                                ArchiveFileData archiveFileData = new ArchiveFileData(file, SERVICE);
                                 deplorer.addtowsToDeploy(archiveFileData);   // add entry to deploylist
 
                             }
@@ -105,22 +101,18 @@
                                 file.lastModified(),
                                 MODULE);
                         jarlist.add(wsInfo);
-                        ArchiveFileData archiveFileData = new ArchiveFileData(
-                                file, MODULE);
+                        ArchiveFileData archiveFileData = new ArchiveFileData(file, MODULE);
                         deplorer.addtowsToDeploy(archiveFileData);//to inform that new web service is deployed
                     } else {
                         if (deplorer.isHotUpdate()) {
                             WSInfo tempWSInfo = getFileItem(file.getName());
                             if (isModified(file, tempWSInfo)) {
-                                tempWSInfo.setLastmodifieddate(
-                                        file.lastModified());
-                                WSInfo wsInfo = new WSInfo(
-                                        tempWSInfo.getFilename(),
+                                tempWSInfo.setLastmodifieddate(file.lastModified());
+                                WSInfo wsInfo = new WSInfo(tempWSInfo.getFilename(),
                                         tempWSInfo.getLastmodifieddate(),
                                         MODULE);
                                 deplorer.addtowstoUnDeploy(wsInfo);   // add entry to undeploy list
-                                ArchiveFileData archiveFileData = new ArchiveFileData(
-                                        file, MODULE);
+                                ArchiveFileData archiveFileData = new ArchiveFileData(file, MODULE);
                                 deplorer.addtowsToDeploy(archiveFileData); // add entry to deploylist
 
                             }