You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by gd...@apache.org on 2005/11/27 19:44:19 UTC

svn commit: r349275 - in /webservices/axis2/trunk/java/modules: codegen/test/org/apache/axis2/rpc/ 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/d...

Author: gdaniels
Date: Sun Nov 27 10:44:09 2005
New Revision: 349275

URL: http://svn.apache.org/viewcvs?rev=349275&view=rev
Log:
Some cleanup.

* Fix spelling problems
* Clean up code
* Alphabetize deployment errors
* Make a few errors more meaningful
* Add a little more debug logging to Phase

Modified:
    webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java
    webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseHolder.java

Modified: webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/test/org/apache/axis2/rpc/SimpleTest.java Sun Nov 27 10:44:09 2005
@@ -165,6 +165,7 @@
 
     public void testRPC() throws Exception {
         Call call = new Call("test-resources/xmls");
+//        Call call = new Call(".");
 
         // Make the SOAP envelope
         SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();

Modified: webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties (original)
+++ webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties Sun Nov 27 10:44:09 2005
@@ -64,7 +64,7 @@
 
 #     Deployment Errors
 wsdlfilenotfound=WSDL file not found for the service :   {0}
-servicexmlnotfound=services.xml not found
+servicexmlnotfound=services.xml not found for service ''{0}''
 modulexmlnotfound=module.xml not found  for the module :   {0}
 classnotfound=Class Not found :  {0}
 repocannotbebull=Axis2 repository can not be null
@@ -84,7 +84,7 @@
 typemappingnotallowed=Type Mappings are not allowed in axis2.xml
 errorinloadingmr={0} Error in loading message receivers {1}
 invalidconfigattribute=invalid attributes in axis2.xml {0} {1}
-undifeineflowtype=un-defined flow type {0}
+undefinedFlowType=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 does not support in AxisTransportIN  {0}

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java Sun Nov 27 10:44:09 2005
@@ -350,7 +350,7 @@
                 inPhases.get(1).equals(PhaseMetadata.PHASE_PRE_DISPATCH) &&
                 inPhases.get(2).equals(PhaseMetadata.PHASE_DISPATCH) &&
                 inPhases.get(3).equals(PhaseMetadata.PHASE_POST_DISPATCH))) {
-            throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_PHASE));
+            throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.INVALID_PHASE));
         }
         //  ArrayList outPhaes = tempdata.getOutphases();
         //TODO do the validation code here
@@ -376,39 +376,43 @@
     }
 
 
-    private void addServiceGroup(AxisServiceGroup serviceGroup, ArrayList service) throws AxisFault {
+    private void addServiceGroup(AxisServiceGroup serviceGroup,
+                                 ArrayList service) throws AxisFault {
 //        Iterator services = currentArchiveFile.getService().values().iterator();
         Iterator services = service.iterator();//              currentArchiveFile.getDeploybleServices().iterator();
         while (services.hasNext()) {
             AxisService axisService = (AxisService) services.next();
 //            loadServiceProperties(axisService);
             Utils.loadServiceProperties(axisService);
-            axisService.setFileName(currentArchiveFile.getFile().getAbsolutePath());
+            axisService.setFileName(
+                    currentArchiveFile.getFile().getAbsolutePath());
 
             //module form serviceGroup
             ArrayList groupModules = serviceGroup.getModules();
             for (int i = 0; i < groupModules.size(); i++) {
-                ModuleDescription module = axisConfig.getModule((QName) groupModules.get(i));
-                if (module != null) {
-                    axisService.engageModule(module, axisConfig);
-                } else {
+                ModuleDescription module =
+                        axisConfig.getModule((QName) groupModules.get(i));
+                if (module == null) {
                     throw new DeploymentException(Messages.getMessage(
-                            DeploymentErrorMsgs.IN_VALID_MODUELE_REF, axisService.getName().
-                            getLocalPart(), ((QName) groupModules.get(i)).getLocalPart()));
+                            DeploymentErrorMsgs.BAD_MODULE_FROM_SERVICE,
+                            axisService.getName().getLocalPart(),
+                            ((QName) groupModules.get(i)).getLocalPart()));
                 }
+                axisService.engageModule(module, axisConfig);
             }
 
             //modules from <service>
             ArrayList list = axisService.getModules();
             for (int i = 0; i < list.size(); i++) {
-                ModuleDescription module = axisConfig.getModule((QName) list.get(i));
-                if (module != null) {
-                    axisService.engageModule(module, axisConfig);
-                } else {
+                ModuleDescription module =
+                        axisConfig.getModule((QName) list.get(i));
+                if (module == null) {
                     throw new DeploymentException(Messages.getMessage(
-                            DeploymentErrorMsgs.IN_VALID_MODUELE_REF, axisService.getName().
-                            getLocalPart(), ((QName) list.get(i)).getLocalPart()));
+                            DeploymentErrorMsgs.BAD_MODULE_FROM_SERVICE,
+                            axisService.getName().getLocalPart(),
+                            ((QName) list.get(i)).getLocalPart()));
                 }
+                axisService.engageModule(module, axisConfig);
             }
 
             HashMap opeartions = axisService.getOperations();
@@ -423,8 +427,9 @@
                         opDesc.engageModule(module,axisConfig);
                     } else {
                         throw new DeploymentException(Messages.getMessage(
-                                DeploymentErrorMsgs.IN_VALID_MODUELE_REF_BY_OP, opDesc.getName()
-                                .getLocalPart(), moduleName.getLocalPart()));
+                                DeploymentErrorMsgs.BAD_MODULE_FROM_OPERATION,
+                                opDesc.getName().getLocalPart(),
+                                moduleName.getLocalPart()));
                     }
                 }
 
@@ -505,7 +510,7 @@
                                 log.info(Messages.getMessage(
                                         DeploymentErrorMsgs.DEPLOYING_WS, currentArchiveFile.getName()));
                             } catch (DeploymentException de) {
-                                log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE,
+                                log.info(Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE,
                                         currentArchiveFile.getName(), de.getMessage()));
                                 PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
                                 de.printStackTrace(error_ptintWriter);
@@ -513,7 +518,7 @@
                                         errorWriter.toString();
                                 de.printStackTrace();
                             } catch (AxisFault axisFault) {
-                                log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE,
+                                log.info(Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE,
                                         currentArchiveFile.getName(), axisFault.getMessage()));
                                 PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
                                 axisFault.printStackTrace(error_ptintWriter);
@@ -521,7 +526,7 @@
                                         errorWriter.toString();
 
                             } catch (Exception e) {
-                                log.info(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_SERVICE,
+                                log.info(Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE,
                                         currentArchiveFile.getName(), e.getMessage()));
                                 PrintWriter error_ptintWriter = new PrintWriter(errorWriter);
                                 e.printStackTrace(error_ptintWriter);

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentErrorMsgs.java Sun Nov 27 10:44:09 2005
@@ -17,69 +17,62 @@
 package org.apache.axis2.deployment;
 
 public class DeploymentErrorMsgs {
-    public static final String WSDL_FILE_NOT_FOUND = "wsdlfilenotfound";
-    public static final String SERVICE_XML_NOT_FOUND = "servicexmlnotfound";
-    public static final String MODULEXML_NOT_FOUND_FOR_THE_MODULE = "modulexmlnotfound";
-    public static final String CLASS_NOT_FOUND = "classnotfound";
-    public static final String REPO_CAN_NOT_BE_NULL = "repocannotbebull";
-    public static final String CONFIG_NOT_FOUND = "confignotfound";
-    public static final String PATH_TO_CONFIG_CAN_NOT_B_NULL = "pathtoconfigcanotnull";
-    public static final String MODULE_VAL_FAILED = "modulevalfailed";
-    public static final String IN_VALID_PHASE = "invalidphase";
-    public static final String IN_VALID_MODUELE_REF = "invalidmoduleref";
-    public static final String IN_VALID_MODUELE_REF_BY_OP = "invalidmodulerefbyop";
     public static final String ADDING_NEW_MODULE = "addingnewmodule";
-    public static final String SETTING_CL = "settingcl";
-    public static final String DEPLOYING_WS = "deployingws";
-    public static final String IN_VALID_SERVICE = "invalidservice";
+    public static final String BAD_ARGU_4_SERVICE = "badarguforservice";
+    public static final String BAD_LIST_ARGU = "badlistagu";
+    public static final String BAD_MODULE_FROM_OPERATION = "badModuleFromOperation";
+    public static final String BAD_MODULE_FROM_SERVICE = "badModuleFromService";
+    public static final String BAD_OP_ATTRIBUTE = "badopattribute";
+    public static final String BAD_PARA_ARGU = "badparaagu";
+    public static final String BEAN_MAPPING_NOT_IMPLEMENTED = "beanmappingnotimpl";
+    public static final String CONFIG_NOT_FOUND = "confignotfound";
+    public static final String CLASS_NOT_FOUND = "classnotfound";
     public static final String DEPLOYING_MODULE = "deployeingmodule";
-    public static final String INVALID_MODULE = "invalidmodule";
-    public static final String SERVICE_REMOVED = "serviceremoved";
-    public static final String TYPE_MAPPING_NOT_ALLOWED = "typemappingnotallowed";
+    public static final String DEPLOYING_WS = "deployingws";
+    public static final String ELEMENT_IS_NOT_ALLOWED = "elementisnotallow";
     public static final String ERROR_IN_LOADING_MR = "errorinloadingmr";
-    public static final String INVALID_CONFIG_ATTTRIBUTE = "invalidconfigattribute";
-    public static final String UNDEFINE_FLOW_TYPE = "undifeineflowtype";
     public static final String FLOWTYPE_IS_REQD = "flowtypeisrequird";
-    public static final String ELEMENT_IS_NOT_ALLOWED = "elementisnotallow";
-    public static final String OUTFLOW_NOT_ALLOWED_IN_TRS_IN = "outflownotallowedintrin";
+    public static final String FILE_NOT_FOUND = "fileNotFound";
+    public static final String ILLEGAL_ACCESS = "IllegalAccessException";
     public static final String INFLOW_NOT_ALLOWED_IN_TRS_OUT = "inflownotallowedintrout";
-    public static final String UNKNOWN_ELEMENT = "unknownelement";
-    public static final String BAD_ARGU_4_SERVICE = "badarguforservice";
-    public static final String TYPE_MAPPING_NOT_IMPLEMENTED = "typemappingnotimpl";
-    public static final String BEAN_MAPPING_NOT_IMPLEMENTED = "beanmappingnotimpl";
-    public static final String MODEULE_NOT_FOUND = "modulenotfound";
-    public static final String BAD_PARA_ARGU = "badparaagu";
-    public static final String BAD_LIST_ARGU = "badlistagu";
+    public static final String INSTANTIATION_EXCEPTION = "InstantiationException";
+    public static final String INVALID_CONFIG_ATTTRIBUTE = "invalidconfigattribute";
+    public static final String INVALID_ELE_IN_MODULE = "badElementInModuleXML";
+    public static final String INVALID_HANDLER = "invalidhandler";
     public static final String INVALID_HANDLER_DIF = "invalidhandlerdif";
-    public static final String THIS_SHOULD_BE_IMPLEMENTED = "thisshouldbeimplment";
-    public static final String OP_NOT_FOUN_IN_WSDL = "opnotfoundinwsdl";
-    public static final String BAD_OP_ATTRIBUTE = "badopattribute";
-    public static final String UNKNOWN_IN_OPERATION = "unknownelementinop";
-    public static final String MODULE_CANNOTHAVE_BOTH_NAME_AND_REF = "modulecannothavrbothnameandref";
-    public static final String INVALID_ELE_IN_MODULE = "invalideleinmodule";
-    public static final String INVALID_PHASE = "invalidphase";
+    public static final String INVALID_MODULE = "invalidmodule";
+    public static final String INVALID_MODULE_CONFIG = "invalidmoduleconfig";
     public static final String INVALID_MODULE_REF = "invalidmodulerefbyconfig";
-    public static final String PHASE_DOES_NOT_SPECIFED = "phasedosenotspecified";
-    public static final String SERVICE_MODULE_CAN_NOT_REFER_GLOBAL_PHASE = "servicemodulecannothaveglobal";
-    public static final String FNF = "fnf";
-    public static final String FNF_WITH_E = "fnf_e";
-    public static final String XTZX_EXCEPTION = "StreamException";
-    public static final String MODEUL_NOT_FOUND = "mnf";
+    public static final String INVALID_OP = "invalid_op";
+    public static final String INVALID_PHASE = "invalidphase";
+    public static final String INVALID_SERVICE = "invalidservice";
+    public static final String INVALID_STORAGE_CLASS = "invalid_storage";
+    public static final String MODULE_CANNOTHAVE_BOTH_NAME_AND_REF = "modulecannothavrbothnameandref";
+    public static final String MODULE_NOT_FOUND = "modulenotfound";
+    public static final String MODULE_VAL_FAILED = "modulevalfailed";
+    public static final String MODULEXML_NOT_FOUND_FOR_THE_MODULE = "modulexmlnotfound";
     public static final String NO_DISPATCHER_FOUND = "no_dispatcher_found";
-    public static final String INVALID_STORGE_CLASS = "invalid_storage";
-    public static final String INSTANTITAIONEXP = "InstantiationException";
-    public static final String ILEGAL_ACESS = "IllegalAccessException";
-    public static final String TRANSPORT_SENDER_ERROR = "transportSenderError";
+    public static final String NO_META_INF = "noMetaInf";
     public static final String OBSERVER_ERROR = "obsererror";
-    public static final String INVALID_MODULE_CONFIG = "invalidmoduleconfig";
-    public static final String INVALID_HANDLER = "invalidhandler";
-    public static final String PARAMTER_LOCKED = "parameterlockederror";
+    public static final String OP_NOT_FOUN_IN_WSDL = "opnotfoundinwsdl";
     public static final String OPERATION_PROCESS_ERROR = "op_error";
-    public static final String INVALID_OP = "invalid_op";
-    public static final String SEERVICE_NAME_ERROR = "servicenameeror";
-
-
-
-    public static final String INVALID_SERVICE = "ivs";
-
+    public static final String OUTFLOW_NOT_ALLOWED_IN_TRS_IN = "outflownotallowedintrin";
+    public static final String PARAMETER_LOCKED = "parameterlockederror";
+    public static final String PATH_TO_CONFIG_CAN_NOT_B_NULL = "pathtoconfigcanotnull";
+    public static final String PHASE_DOES_NOT_SPECIFED = "phasedosenotspecified";
+    public static final String REPO_CAN_NOT_BE_NULL = "repocannotbebull";
+    public static final String SERVICE_MODULE_CAN_NOT_REFER_GLOBAL_PHASE = "servicemodulecannothaveglobal";
+    public static final String SERVICE_NAME_ERROR = "servicenameeror";
+    public static final String SERVICE_REMOVED = "serviceremoved";
+    public static final String SERVICE_XML_NOT_FOUND = "servicexmlnotfound";
+    public static final String SETTING_CL = "settingcl";
+    public static final String THIS_SHOULD_BE_IMPLEMENTED = "thisshouldbeimplment";
+    public static final String TRANSPORT_SENDER_ERROR = "transportSenderError";
+    public static final String TYPE_MAPPING_NOT_ALLOWED = "typemappingnotallowed";
+    public static final String TYPE_MAPPING_NOT_IMPLEMENTED = "typemappingnotimpl";
+    public static final String UNDEFINED_FLOW_TYPE = "undefinedFlowType";
+    public static final String UNKNOWN_ELEMENT = "unknownelement";
+    public static final String UNKNOWN_IN_OPERATION = "unknownelementinop";
+    public static final String WSDL_FILE_NOT_FOUND = "wsdlfilenotfound";
+    public static final String XTZX_EXCEPTION = "StreamException";
 }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DescriptionBuilder.java Sun Nov 27 10:44:09 2005
@@ -276,7 +276,7 @@
                     String refName = moduleRefAttribute.getAttributeValue();
                     if(axisConfig.getModule(new QName(refName)) == null) {
                         throw new DeploymentException(Messages.getMessage(
-                                DeploymentErrorMsgs.MODEULE_NOT_FOUND,
+                                DeploymentErrorMsgs.MODULE_NOT_FOUND,
                                 refName));
                     } else {
                         opeartion.addModule(new QName(refName));
@@ -285,7 +285,7 @@
             }
         }catch (AxisFault axisFault) {
             throw new DeploymentException(Messages.getMessage(
-                    DeploymentErrorMsgs.MODEULE_NOT_FOUND,
+                    DeploymentErrorMsgs.MODULE_NOT_FOUND,
                     axisFault.getMessage()));
         }
     }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceBuilder.java Sun Nov 27 10:44:09 2005
@@ -298,7 +298,7 @@
                     String refName = moduleRefAttribute.getAttributeValue();
                     if (axisConfig.getModule(new QName(refName)) == null) {
                         throw new DeploymentException(Messages.getMessage(
-                                DeploymentErrorMsgs.MODEULE_NOT_FOUND, refName));
+                                DeploymentErrorMsgs.MODULE_NOT_FOUND, refName));
                     } else {
                         service.addModuleref(new QName(refName));
                     }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ServiceGroupBuilder.java Sun Nov 27 10:44:09 2005
@@ -70,7 +70,7 @@
                 String serviceName = serviceNameatt.getAttributeValue();
                 if (serviceName == null) {
                     throw new DeploymentException(Messages.getMessage(
-                            DeploymentErrorMsgs.SEERVICE_NAME_ERROR));
+                            DeploymentErrorMsgs.SERVICE_NAME_ERROR));
                 } else {
                     AxisService axisService = (AxisService) wsdlServices.get(serviceName);
                     if (axisService == null) {
@@ -129,7 +129,7 @@
                     String refName = moduleRefAttribute.getAttributeValue();
                     if (axisConfig.getModule(new QName(refName)) == null) {
                         throw new DeploymentException(Messages.getMessage(
-                                DeploymentErrorMsgs.MODEULE_NOT_FOUND, refName));
+                                DeploymentErrorMsgs.MODULE_NOT_FOUND, refName));
                     } else {
                         axisServiceGroup.addModuleref(new QName(refName));
                     }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveFileData.java Sun Nov 27 10:44:09 2005
@@ -98,14 +98,16 @@
         this.classLoader = classLoader;
     }
 
-    public void setClassLoader(boolean extarctArichive, ClassLoader parent) throws AxisFault {
-        if (! extarctArichive) {
+    public void setClassLoader(boolean extractArichive, ClassLoader parent) throws AxisFault {
+        if (! extractArichive) {
             // has to be craeted taking that file to the account
             if (file != null) {
                 URL[] urlsToLoadFrom;
                 try {
                     if (!file.exists()) {
-                        throw new AxisFault(Messages.getMessage(DeploymentErrorMsgs.FNF));
+                        throw new AxisFault(Messages.getMessage(
+                                DeploymentErrorMsgs.FILE_NOT_FOUND,
+                                file.getAbsolutePath()));
                     }
                     urlsToLoadFrom = new URL[]{file.toURL()};
                     classLoader =

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/ArchiveReader.java Sun Nov 27 10:44:09 2005
@@ -112,26 +112,26 @@
         if (isDirectory) {
             try {
                 File meta_inf = new File(serviceFile, META_INF);
-                if (meta_inf.exists()) {
-                    File files [] = meta_inf.listFiles();
-                    for (int i = 0; i < files.length; i++) {
-                        File file1 = files[i];
-                        String fileName = file1.getName();
-                        if (fileName.endsWith(".wsdl") || fileName.endsWith(".WSDL")) {
-                            InputStream in = new FileInputStream(file1);
-                            AxisService service = processWSDLFile(in);
-                            servicesMap.put(service.getName().getLocalPart(), service);
-                            try {
-                                in.close();
-                            } catch (IOException e) {
-                                log.info(e);
-                            }
+                if (!meta_inf.exists()) {
+                    throw new DeploymentException(Messages.getMessage(
+                            DeploymentErrorMsgs.NO_META_INF,
+                            serviceFile.getName()));
+                }
+                File files [] = meta_inf.listFiles();
+                for (int i = 0; i < files.length; i++) {
+                    File file1 = files[i];
+                    String fileName = file1.getName();
+                    if (fileName.endsWith(".wsdl") || fileName.endsWith(".WSDL")) {
+                        InputStream in = new FileInputStream(file1);
+                        AxisService service = processWSDLFile(in);
+                        servicesMap.put(service.getName().getLocalPart(), service);
+                        try {
+                            in.close();
+                        } catch (IOException e) {
+                            log.info(e);
                         }
-
                     }
-                } else {
-                    throw new DeploymentException(Messages.getMessage(
-                            DeploymentErrorMsgs.INVALID_SERVICE));
+
                 }
             } catch (FileNotFoundException e) {
                 throw new DeploymentException(e);
@@ -185,12 +185,14 @@
      */
     public ArrayList processServiceGroup(String filename,
                                          DeploymentEngine engine,
-                                         AxisServiceGroup axisServiceGroup, boolean extarctService,
-                                         HashMap wsdls, AxisConfiguration axisConfig)
+                                         AxisServiceGroup axisServiceGroup,
+                                         boolean extractService,
+                                         HashMap wsdls,
+                                         AxisConfiguration axisConfig)
             throws DeploymentException {
         // get attribute values
         boolean foundServiceXML = false;
-        if (! extarctService) {
+        if (!extractService) {
             ZipInputStream zin;
             try {
                 zin = new ZipInputStream(new FileInputStream(filename));
@@ -206,7 +208,9 @@
                 //    zin.close();
                 if (!foundServiceXML) {
                     throw new DeploymentException(
-                            Messages.getMessage(DeploymentErrorMsgs.SERVICE_XML_NOT_FOUND));
+                            Messages.getMessage(
+                                    DeploymentErrorMsgs.SERVICE_XML_NOT_FOUND,
+                                    filename));
                 }
             } catch (Exception e) {
                 throw new DeploymentException(e);
@@ -220,7 +224,7 @@
                     axisServiceGroup.setServiceGroupName(engine.getCurrentFileItem().getName());
                     return buildServiceGroup(in, engine, axisServiceGroup, wsdls, axisConfig);
                 } catch (FileNotFoundException e) {
-                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.FNF_WITH_E
+                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.FILE_NOT_FOUND
                             , e.getMessage()));
                 } catch (XMLStreamException e) {
                     throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.XTZX_EXCEPTION
@@ -310,7 +314,7 @@
                             engine.getCurrentFileItem().getServiceName())));
                     builder.populateModule();
                 } catch (FileNotFoundException e) {
-                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.FNF_WITH_E
+                    throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.FILE_NOT_FOUND
                             , e.getMessage()));
                 }
             } else {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java Sun Nov 27 10:44:09 2005
@@ -19,7 +19,9 @@
 import org.apache.axis2.description.AxisOperation;
 import org.apache.axis2.engine.Phase;
 import org.apache.axis2.phaseresolver.PhaseMetadata;
+import org.apache.axis2.om.OMElement;
 
+import javax.xml.namespace.QName;
 import java.util.ArrayList;
 
 public class PhasesInfo {
@@ -75,6 +77,12 @@
             }
         }
         return oprationINPhases;
+    }
+
+    public Phase makePhase(OMElement phaseElement) {
+        String phaseName = phaseElement.getAttribute(new QName("foo")).getAttributeValue();
+        Phase phase = new Phase(phaseName);
+        return phase;
     }
 
     public ArrayList getOperationOutPhases() {

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/engine/Phase.java Sun Nov 27 10:44:09 2005
@@ -137,16 +137,19 @@
      * @throws org.apache.axis2.AxisFault
      */
     public void invoke(MessageContext msgctx) throws AxisFault {
+        if (log.isDebugEnabled()) {
+            log.debug("Invoking phase \"" + phaseName + "\"");
+        }
         msgctx.setPausedPhaseName(this.getPhaseName());
         //If phase first Hnadler is there then it should run first
         if (phaseFirst != null) {
             if (msgctx.isPaused()) {
                 return;
             } else {
-                log.info("Invoke the Phase first handler "
+                log.info("Invoke PhaseFirst handler '"
                         + phaseFirst.getName()
-                        + "with in the Phase "
-                        + phaseName);
+                        + "' in Phase '"
+                        + phaseName + "'");
                 phaseFirst.invoke(msgctx);
             }
         }
@@ -159,10 +162,10 @@
                 Handler handler = (Handler) handlers.get(
                         indexOfHandlerToExecute);
                 if (handler != null) {
-                    log.info("Invoke the Handler "
+                    log.info("Invoking Handler '"
                             + handler.getName()
-                            + "with in the Phase "
-                            + phaseName);
+                            + "' in Phase '"
+                            + phaseName + "'");
                     handler.invoke(msgctx);
                     //This line should be after the invoke as if the invocation failed this handlers is takn care of and
                     //no need to revoke agien
@@ -173,10 +176,10 @@
         //If phase last handler is there will invoke that here
         if (phaseLast != null) {
             if (!msgctx.isPaused()) {
-                log.info("Invoke the Phase first handler "
+                log.info("Invoke PhaseLast handler '"
                         + phaseLast.getName()
-                        + "with in the Phase "
-                        + phaseName);
+                        + "' in Phase '"
+                        + phaseName + "'");
                 phaseLast.invoke(msgctx);
             }
         }

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseHolder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseHolder.java?rev=349275&r1=349274&r2=349275&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseHolder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/phaseresolver/PhaseHolder.java Sun Nov 27 10:44:09 2005
@@ -59,16 +59,17 @@
     /**
      * Method addHandler
      *
-     * @param handler
+     * @param handlerDesc
      * @throws PhaseException
      */
-    public void addHandler(HandlerDescription handler) throws PhaseException {
-        String phaseName = handler.getRules().getPhaseName();
+    public void addHandler(HandlerDescription handlerDesc) throws PhaseException {
+        String phaseName = handlerDesc.getRules().getPhaseName();
         if (isPhaseExist(phaseName)) {
-            getPhase(phaseName).addHandler(handler);
+            getPhase(phaseName).addHandler(handlerDesc);
         } else {
-            throw new PhaseException(Messages.getMessage(DeploymentErrorMsgs.IN_VALID_PHASE,
-                    phaseName, handler.getName().getLocalPart()));
+            throw new PhaseException(Messages.getMessage(
+                    DeploymentErrorMsgs.INVALID_PHASE,
+                    phaseName, handlerDesc.getName().getLocalPart()));
         }
     }
 



Re: svn commit: r349275 - in /webservices/axis2/trunk/java/modules: codegen/test/org/apache/axis2/rpc/ 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/d...

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sun, 2005-11-27 at 18:44 +0000, gdaniels@apache.org wrote:
> Author: gdaniels
> Date: Sun Nov 27 10:44:09 2005
> New Revision: 349275
> 
> URL: http://svn.apache.org/viewcvs?rev=349275&view=rev
> Log:
> Some cleanup.
> 
> * Fix spelling problems
> * Clean up code
> * Alphabetize deployment errors
> * Make a few errors more meaningful
> * Add a little more debug logging to Phase

Cool :).

I noticed looking thru the diff that we still have ModuleDescription and
HandlerDescription.

Shouldn't those be change to AxisModule and AxisHandler per our latest
(and final!) name change of the *Description classes to Axis*??

Sanjiva.



Re: svn commit: r349275 - in /webservices/axis2/trunk/java/modules: codegen/test/org/apache/axis2/rpc/ 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/d...

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sun, 2005-11-27 at 18:44 +0000, gdaniels@apache.org wrote:
> Author: gdaniels
> Date: Sun Nov 27 10:44:09 2005
> New Revision: 349275
> 
> URL: http://svn.apache.org/viewcvs?rev=349275&view=rev
> Log:
> Some cleanup.
> 
> * Fix spelling problems
> * Clean up code
> * Alphabetize deployment errors
> * Make a few errors more meaningful
> * Add a little more debug logging to Phase

Cool :).

I noticed looking thru the diff that we still have ModuleDescription and
HandlerDescription.

Shouldn't those be change to AxisModule and AxisHandler per our latest
(and final!) name change of the *Description classes to Axis*??

Sanjiva.