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/10/19 08:35:15 UTC
svn commit: r326412 - in /webservices/axis2/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/
Author: deepal
Date: Tue Oct 18 23:34:38 2005
New Revision: 326412
URL: http://svn.apache.org/viewcvs?rev=326412&view=rev
Log:
making i18n in deployment side , and some refactoring
Modified:
webservices/axis2/trunk/java/modules/common/src/org/apache/axis2/i18n/resource.properties
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java
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/ModuleBuilder.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/repository/util/WSInfoList.java
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/util/PhasesInfo.java
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=326412&r1=326411&r2=326412&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 Tue Oct 18 23:34:38 2005
@@ -97,4 +97,21 @@
invalidmodulerefbyconfig=reference to invalid module {0} by axis2.xml
phasedosenotspecified=Phase does not specified for the handler {0}
servicemodulecannothaveglobal=Service specific module can not refer system pre defined phases : {0}
-cannotCorrelateMsg=Cannot correlate MessageID {1} to {0}
\ No newline at end of file
+fnf=The specified file Not found
+fnf_e=File Not Found {0}
+StreamException=XMLStreamException : {0}
+mnf={0} : module does not found
+invalid_storage=Invalid Storage Class defintion , class name missing
+no_dispatcher_found=No dispatcher found , can not continue ....
+ivs=In valid service META-INF file not found
+InstantiationException=InstantiationException in Axis Storage processing {0}
+IllegalAccessException=IllegalAccessException in Axis Storage processing {0}
+transportSenderError=TransportSEnder Implementation class is required for the transport {0}
+obsererror=Observer Implementation Class is requird
+invalidmoduleconfig=Invalid module configuration
+invalidhandler=Invalid Handler {0}
+parameterlockederror=The paramter {0} has locked at top levle can not overide
+op_error=Porcessing Operations Modules {0}
+servicenameeror=Service Name required
+invalid_op=Invalide Operations {0}
+cannotCorrelateMsg=Cannot correlate MessageID {1} to {0}\
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=326412&r1=326411&r2=326412&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/AxisConfigBuilder.java Tue Oct 18 23:34:38 2005
@@ -80,7 +80,7 @@
processDispatchingOrder(dispatch_order);
log.info("found the custom disptaching order and continue with that order");
} else {
- ((AxisConfigurationImpl)axisConfiguration).setDefaultDispatchers();
+ ((AxisConfigurationImpl)axisConfiguration).setDefaultDispatchers();
log.info("no custom diaptching order found continue with default dispatcing order");
}
@@ -149,7 +149,7 @@
}
if(!foundDiaptcher){
- throw new DeploymentException("No dispatcher found , can not continue ....");
+ throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.NO_DISPATCHER_FOUND));
} else {
((AxisConfigurationImpl)axisConfiguration).setDispatchPhase(dispatchPhae);
}
@@ -161,7 +161,8 @@
if(storageElement !=null){
OMAttribute className = storageElement.getAttribute(new QName(CLASSNAME));
if(className== null){
- throw new DeploymentException("Invalid Storage Class defintion , class name missing");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_STORGE_CLASS));
} else {
String classNameStr =className.getAttributeValue();
Class stoarge ;
@@ -180,16 +181,20 @@
} catch (ClassNotFoundException e) {
throw new DeploymentException
- ("ClassNotFoundException in Axis Storage processing " + e);
+ (Messages.getMessage(DeploymentErrorMsgs.CLASS_NOT_FOUND,
+ e.getMessage()));
} catch (InstantiationException e) {
throw new DeploymentException
- ("InstantiationException in Axis Storage processing " + e);
+ (Messages.getMessage(DeploymentErrorMsgs.INSTANTITAIONEXP,
+ e.getMessage()));
} catch (IllegalAccessException e) {
throw new DeploymentException
- ("IllegalAccessException in Axis Storage processing " + e);
+ (Messages.getMessage(DeploymentErrorMsgs.ILEGAL_ACESS,
+ e.getMessage()));
}
} else {
- throw new DeploymentException("Invalid Storage Class defintion , class name missing");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_STORGE_CLASS));
}
}
@@ -203,13 +208,16 @@
axisConfiguration.setAxisStorage(axisStorage);
}catch (ClassNotFoundException e) {
throw new DeploymentException
- ("ClassNotFoundException in Axis Storage processing " + e);
+ (Messages.getMessage(DeploymentErrorMsgs.CLASS_NOT_FOUND,
+ e.getMessage()));
} catch (InstantiationException e) {
throw new DeploymentException
- ("InstantiationException in Axis Storage processing " + e);
+ (Messages.getMessage(DeploymentErrorMsgs.INSTANTITAIONEXP,
+ e.getMessage()));
} catch (IllegalAccessException e) {
throw new DeploymentException
- ("IllegalAccessException in Axis Storage processing " + e);
+ (Messages.getMessage(DeploymentErrorMsgs.ILEGAL_ACESS,
+ e.getMessage()));
}
}
@@ -265,8 +273,8 @@
OMAttribute trsClas = transport.getAttribute(
new QName(CLASSNAME));
if(trsClas == null){
- throw new DeploymentException("TransportSEnder Implementation class is required " +
- "for the transport" + name);
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.TRANSPORT_SENDER_ERROR,name));
}
String clasName = trsClas.getAttributeValue();
Class sender;
@@ -424,7 +432,8 @@
if (trsClas !=null) {
clasName = trsClas.getAttributeValue();
} else {
- throw new DeploymentException("Observer Implementation Class is requird");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.OBSERVER_ERROR));
}
try {
Class observerclass = Class.forName(clasName, true, Thread.currentThread().
@@ -473,7 +482,7 @@
OMAttribute moduleName_att = moduleConfig.getAttribute(
new QName(ATTNAME));
if(moduleName_att == null){
- throw new DeploymentException("Invalid module configuration");
+ throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
} else {
String module = moduleName_att.getAttributeValue();
ModuleConfiguration moduleConfiguration =
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java?rev=326412&r1=326411&r2=326412&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentClassLoader.java Tue Oct 18 23:34:38 2005
@@ -192,7 +192,8 @@
}
}
- throw new ClassNotFoundException(Messages.getMessage(DeploymentErrorMsgs.CLASS_NOT_FOUND, filename));
+ throw new ClassNotFoundException(Messages.getMessage(
+ DeploymentErrorMsgs.CLASS_NOT_FOUND, filename));
}
}
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=326412&r1=326411&r2=326412&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 Tue Oct 18 23:34:38 2005
@@ -61,14 +61,12 @@
public class DeploymentEngine implements DeploymentConstants {
private Log log = LogFactory.getLog(getClass());
- private Scheduler scheduler;
public String axis2repository = null;
private boolean hotDeployment = true; //to do hot deployment or not
private boolean hotUpdate = true; // to do hot update or not
- private boolean explodedDir = false;// need to exatract service archive file
/**
@@ -206,7 +204,6 @@
String value;
Parameter parahotdeployment = axisConfig.getParameter(HOTDEPLOYMENT);
Parameter parahotupdate = axisConfig.getParameter(HOTUPDATE);
- Parameter paraextractServiceArchive = axisConfig.getParameter(EXTRACTSERVICEARCHIVE);
if (parahotdeployment != null) {
value = (String) parahotdeployment.getValue();
if ("false".equalsIgnoreCase(value))
@@ -217,11 +214,6 @@
if ("false".equalsIgnoreCase(value))
hotUpdate = false;
}
- if(paraextractServiceArchive != null){
- value = (String) paraextractServiceArchive.getValue();
- if ("true".equalsIgnoreCase(value))
- explodedDir = true;
- }
}
public AxisConfiguration load() throws DeploymentException {
@@ -375,7 +367,7 @@
* inorder to perform Hot deployment and so on..
*/
private void startSearch(DeploymentEngine engine) {
- scheduler = new Scheduler();
+ Scheduler scheduler = new Scheduler();
scheduler.schedule(new SchedulerTask(engine, folderName),
new DeploymentIterator());
}
@@ -568,7 +560,7 @@
if (wsToDeploy.size() > 0) {
for (int i = 0; i < wsToDeploy.size(); i++) {
currentArchiveFile = (ArchiveFileData) wsToDeploy.get(i);
- explodedDir = currentArchiveFile.getFile().isDirectory();
+ boolean explodedDir = currentArchiveFile.getFile().isDirectory();
int type = currentArchiveFile.getType();
try {
ArchiveReader archiveReader;
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=326412&r1=326411&r2=326412&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 Tue Oct 18 23:34:38 2005
@@ -61,5 +61,25 @@
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 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 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 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";
}
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=326412&r1=326411&r2=326412&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 Tue Oct 18 23:34:38 2005
@@ -109,7 +109,8 @@
OMAttribute name_attribute = handler_element.getAttribute(
new QName(ATTNAME));
if(name_attribute == null){
- throw new DeploymentException("Invalid Handler");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_HANDLER,"Name missing"));
} else {
handler.setName(new QName(name_attribute.getAttributeValue()));
}
@@ -118,7 +119,8 @@
OMAttribute class_attribute = handler_element.getAttribute(
new QName(CLASSNAME));
if(class_attribute == null){
- throw new DeploymentException("Invalid Handler");
+ throw new DeploymentException((Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_HANDLER,"class name missing")));
} else {
handler.setClassName(class_attribute.getAttributeValue());
}
@@ -127,7 +129,8 @@
OMElement order_element = handler_element.getFirstChildWithName(
new QName(ORDER));
if(order_element == null){
- throw new DeploymentException("Invaid Handler , phase rule does not specify");
+ throw new DeploymentException((Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_HANDLER,"phase rule does not specify")));
} else {
Iterator order_itr = order_element.getAllAttributes();
while (order_itr.hasNext()) {
@@ -214,8 +217,8 @@
if("true".equals(lockedValue)){
//if the parameter is locked at some levle paramer value replace by that
if(parent!=null && parent.isParamterLocked(paramter.getName())){
- throw new DeploymentException("The paramter " + paramter.getName() + " has" +
- " locked at top levle can not overide");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.CONFIG_NOT_FOUND,paramter.getName()));
} else{
paramter.setLocked(true);
}
@@ -257,7 +260,8 @@
}
}
}catch (AxisFault axisFault) {
- throw new DeploymentException("Porcessing Operations Modules" + axisFault);
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.MODEULE_NOT_FOUND, axisFault.getMessage()));
}
}
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java?rev=326412&r1=326411&r2=326412&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/ModuleBuilder.java Tue Oct 18 23:34:38 2005
@@ -138,7 +138,9 @@
OMAttribute op_name_att = operation.getAttribute(
new QName(ATTNAME));
if(op_name_att == null){
- throw new DeploymentException(Messages.getMessage("Invalide Operations"));
+ throw new DeploymentException(Messages.getMessage(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_OP
+ ,"operation name missing")));
}
OMAttribute op_mep_att = operation.getAttribute(
new QName(MEP));
@@ -155,7 +157,8 @@
try {
op_descrip = OperationDescriptionFactory.getOperetionDescription(mepURL);
} catch (AxisFault axisFault) {
- throw new DeploymentException("Error in processing operation " + axisFault);
+ throw new DeploymentException(Messages.getMessage(Messages.getMessage(
+ DeploymentErrorMsgs.OPERATION_PROCESS_ERROR,axisFault.getMessage())));
}
}
String opname = op_name_att.getAttributeValue();
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=326412&r1=326411&r2=326412&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 Tue Oct 18 23:34:38 2005
@@ -26,7 +26,6 @@
import org.apache.axis2.om.OMElement;
import org.apache.axis2.om.impl.OMOutputImpl;
import org.apache.wsdl.WSDLOperation;
-import org.apache.wsdl.WSDLConstants;
import org.apache.wsdl.impl.WSDLOperationImpl;
import javax.xml.namespace.QName;
@@ -142,7 +141,8 @@
} catch (XMLStreamException e) {
throw new DeploymentException(e);
} catch (AxisFault axisFault) {
- throw new DeploymentException("Error in preocessing operation +" + axisFault);
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.OPERATION_PROCESS_ERROR,axisFault.getMessage()));
}
}
@@ -155,7 +155,9 @@
OMAttribute op_name_att = operation.getAttribute(
new QName(ATTNAME));
if(op_name_att == null){
- throw new DeploymentException(Messages.getMessage("Invalide Operations"));
+ throw new DeploymentException(Messages.getMessage(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_OP
+ ,"operation name missing")));
}
//setting the mep of the operation
@@ -201,7 +203,7 @@
new QName(PARAMETERST));
processParameters(paramters,op_descrip,service);
- // loading the message recivers
+ // loading the message receivers
OMElement receiverElement = operation.getFirstChildWithName(
new QName(MESSAGERECEIVER));
if(receiverElement !=null){
@@ -243,7 +245,8 @@
OMAttribute moduleName_att = moduleConfig.getAttribute(
new QName(ATTNAME));
if(moduleName_att == null){
- throw new DeploymentException("Invalid module configuration");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
} else {
String module = moduleName_att.getAttributeValue();
ModuleConfiguration moduleConfiguration =
@@ -263,7 +266,8 @@
OMAttribute moduleName_att = moduleConfig.getAttribute(
new QName(ATTNAME));
if(moduleName_att == null){
- throw new DeploymentException("Invalid module configuration");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
} else {
String module = moduleName_att.getAttributeValue();
ModuleConfiguration moduleConfiguration =
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=326412&r1=326411&r2=326412&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 Tue Oct 18 23:34:38 2005
@@ -59,7 +59,8 @@
new QName(ATTNAME));
String serviceName = serviceNameatt.getAttributeValue();
if(serviceName == null){
- throw new DeploymentException("Service Name required");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.SEERVICE_NAME_ERROR));
} else {
ServiceDescription serviceDecs = engine.getCurrentFileItem().getService(
serviceName);
@@ -91,7 +92,8 @@
OMAttribute moduleName_att = moduleConfig.getAttribute(
new QName(ATTNAME));
if(moduleName_att == null){
- throw new DeploymentException("Invalid module configuration");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_MODULE_CONFIG));
} else {
String module = moduleName_att.getAttributeValue();
ModuleConfiguration moduleConfiguration =
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=326412&r1=326411&r2=326412&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 Tue Oct 18 23:34:38 2005
@@ -17,7 +17,9 @@
package org.apache.axis2.deployment.repository.util;
import org.apache.axis2.AxisFault;
+import org.apache.axis2.i18n.Messages;
import org.apache.axis2.deployment.DeploymentClassLoader;
+import org.apache.axis2.deployment.DeploymentErrorMsgs;
import org.apache.axis2.description.ServiceDescription;
import java.io.File;
@@ -113,7 +115,7 @@
URL[] urlsToLoadFrom;
try {
if (!file.exists()) {
- throw new RuntimeException("file not found !!!!!!!!!!!!!!!");
+ throw new AxisFault(Messages.getMessage(DeploymentErrorMsgs.FNF));
}
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=326412&r1=326411&r2=326412&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 Tue Oct 18 23:34:38 2005
@@ -44,6 +44,7 @@
import javax.xml.stream.XMLStreamException;
import java.io.*;
import java.util.Iterator;
+import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
@@ -107,13 +108,13 @@
WSDLDescription womDescription = wsdlVersionWrapper.getDescription();
//removing binding
-// Map bindings = wsdlVersionWrapper.getDefinition().getBindings();
-// Iterator binfingIterator = bindings.keySet().iterator();
-// while (binfingIterator.hasNext()) {
-// Object o = binfingIterator.next();
-// bindings.remove(o) ;
-//
-// }
+ Map bindings = wsdlVersionWrapper.getDefinition().getBindings();
+ Iterator binfingIterator = bindings.keySet().iterator();
+ while (binfingIterator.hasNext()) {
+ Object o = binfingIterator.next();
+ bindings.remove(o) ;
+
+ }
Iterator iterator = womDescription.getServices().keySet()
.iterator();
@@ -160,7 +161,8 @@
}
}
} else {
- throw new DeploymentException("In valid service META-INF file not found");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.INVALID_SERVICE));
}
} catch (FileNotFoundException e) {
throw new DeploymentException(e);
@@ -178,7 +180,9 @@
ByteArrayOutputStream out ;
while ((entry = zin.getNextEntry()) != null) {
String entryName = entry.getName();
- if ((entryName.startsWith(META_INF) || entryName.startsWith(META_INF.toLowerCase())) && (entryName.endsWith(".wsdl")
+ if ((entryName.startsWith(META_INF) ||
+ entryName.startsWith(META_INF.toLowerCase()))
+ && (entryName.endsWith(".wsdl")
|| entryName.endsWith(".WSDL"))) {
out = new ByteArrayOutputStream();
while ((read = zin.read(buf)) > 0) {
@@ -246,9 +250,11 @@
buildServiceGroup(in,engine,serviceGroupDesc);
serviceGroupDesc.setServiceGroupName(engine.getCurrentFileItem().getName());
} catch (FileNotFoundException e) {
- throw new DeploymentException("FileNotFound : " + e);
+ throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.FNF_WITH_E
+ ,e.getMessage()));
} catch (XMLStreamException e) {
- throw new DeploymentException("XMLStreamException : " + e);
+ throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.XTZX_EXCEPTION
+ ,e.getMessage()));
}
} else {
throw new DeploymentException(
@@ -288,7 +294,8 @@
public void readModuleArchive(String filename,
DeploymentEngine engine,
- ModuleDescription module , boolean explodedDir) throws DeploymentException {
+ ModuleDescription module , boolean explodedDir)
+ throws DeploymentException {
// get attribute values
boolean foundmoduleXML = false;
if (!explodedDir) {
@@ -321,7 +328,8 @@
ModuleBuilder builder = new ModuleBuilder(in, engine, module);
builder.populateModule();
} catch (FileNotFoundException e) {
- throw new DeploymentException("FileNotFound : " + e);
+ throw new DeploymentException(Messages.getMessage(DeploymentErrorMsgs.FNF_WITH_E
+ ,e.getMessage()));
}
} else {
throw new DeploymentException(Messages.getMessage(
@@ -366,7 +374,8 @@
in = cl.getResourceAsStream("modules/" + moduleName + ".jar");
}
if (in == null) {
- throw new DeploymentException(moduleName + " module is not found");
+ throw new DeploymentException(Messages.getMessage(
+ DeploymentErrorMsgs.MODULEXML_NOT_FOUND_FOR_THE_MODULE, moduleName));
} else {
if(!modules.exists()) {
modules.mkdirs();
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/WSInfoList.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/WSInfoList.java?rev=326412&r1=326411&r2=326412&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/WSInfoList.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/deployment/repository/util/WSInfoList.java Tue Oct 18 23:34:38 2005
@@ -130,7 +130,6 @@
* it will return related wsinfo object to the file else return null;
*
* @param filename
- * @return
*/
public WSInfo getFileItem(String filename) {
int sise = jarlist.size();
@@ -149,7 +148,6 @@
*
* @param file
* @param wsInfo
- * @return
*/
public boolean isModified(File file, WSInfo wsInfo) {
return (wsInfo.getLastmodifieddate() != file.lastModified());
@@ -159,7 +157,6 @@
* to check whether the file is alredy in the list
*
* @param filename
- * @return
*/
public boolean isFileExist(String filename) {
return !(getFileItem(filename) == null);
@@ -177,8 +174,8 @@
int size = currentjars.size();
List tempvector = new ArrayList();
tempvector.clear();
- String filename = "";
- boolean exist = false;
+ String filename;
+ boolean exist ;
while (iter.hasNext()) {
WSInfo fileitem = (WSInfo) iter.next();
exist = false;
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=326412&r1=326411&r2=326412&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 Tue Oct 18 23:34:38 2005
@@ -29,11 +29,6 @@
private ArrayList IN_FaultPhases;
private ArrayList OUT_FaultPhases;
- private ArrayList oprationINPhases;
- private ArrayList oprationOUTPhases;
- private ArrayList oprationIN_FaultPhases;
- private ArrayList oprationOUT_FaultPhases;
-
public void setINPhases(ArrayList INPhases) {
this.INPhases = INPhases;
}
@@ -67,7 +62,7 @@
}
public ArrayList getOperationInPhases() {
- oprationINPhases = new ArrayList();
+ ArrayList oprationINPhases = new ArrayList();
oprationINPhases.add(new Phase(PhaseMetadata.PHASE_POLICY_DETERMINATION));
for (int i = 0; i < INPhases.size(); i++) {
String phaseName = (String) INPhases.get(i);
@@ -83,7 +78,7 @@
}
public ArrayList getOperationOutPhases() {
- oprationOUTPhases = new ArrayList();
+ ArrayList oprationOUTPhases = new ArrayList();
for (int i = 0; i < OUTPhases.size(); i++) {
String phaseName = (String) OUTPhases.get(i);
if (PhaseMetadata.PHASE_TRANSPORT_OUT.equals(phaseName)) {
@@ -97,7 +92,7 @@
}
public ArrayList getOperationInFaultPhases() {
- oprationIN_FaultPhases = new ArrayList();
+ ArrayList oprationIN_FaultPhases = new ArrayList();
for (int i = 0; i < IN_FaultPhases.size(); i++) {
String phaseName = (String) IN_FaultPhases.get(i);
oprationIN_FaultPhases.add(new Phase(phaseName));
@@ -106,7 +101,7 @@
}
public ArrayList getOperationOutFaultPhases() {
- oprationOUT_FaultPhases = new ArrayList();
+ ArrayList oprationOUT_FaultPhases = new ArrayList();
for (int i = 0; i < OUT_FaultPhases.size(); i++) {
String phaseName = (String) OUT_FaultPhases.get(i);
oprationOUT_FaultPhases.add(new Phase(phaseName));