axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r437148 - in /webservices/axis2/trunk/java/modules: adb/src/org/apache/axis2/databinding/utils/ codegen/src/org/apache/axis2/rpc/receivers/ java2wsdl/src/org/apache/ws/java2wsdl/ kernel/src/org/apache/axis2/deployment/
Date Sat, 26 Aug 2006 11:49:25 GMT
Author: deepal
Date: Sat Aug 26 04:49:24 2006
New Revision: 437148

URL: http://svn.apache.org/viewvc?rev=437148&view=rev
Log:
fixing 1050, 1047 and 1035

Modified:
    webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
    webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
    webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java

Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=437148&r1=437147&r2=437148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
(original)
+++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
Sat Aug 26 04:49:24 2006
@@ -94,7 +94,7 @@
                     Object value = propDesc.getReadMethod().invoke(beanObject,
                             (Object[]) null);
                     object.add(new QName(beanName.getNamespaceURI(),propDesc.getName(),beanName.getPrefix()));
-                    object.add(value == null ? null : value.toString());
+                    object.add(value == null ? null : SimpleTypeMapper.getStringValue(value));
                 } else if (ptype.isArray()) {
                     Object value [] = (Object[]) propDesc.getReadMethod().invoke(beanObject,
                             (Object[]) null);
@@ -102,7 +102,7 @@
                         for (int j = 0; j < value.length; j++) {
                             Object o = value[j];
                             object.add(new QName(beanName.getNamespaceURI(),propDesc.getName(),beanName.getPrefix()));
-                            object.add(o == null ? null : o.toString());
+                            object.add(o == null ? null :  SimpleTypeMapper.getStringValue(o));
                         }
                     } else {
                         for (int j = 0; j < value.length; j++) {
@@ -476,7 +476,7 @@
                     Object o = array[j];
                     if (SimpleTypeMapper.isSimpleType(o)) {
                         objects.add("item" + argCount);
-                        objects.add(o == null ? null : o.toString());
+                        objects.add(o == null ? null :  SimpleTypeMapper.getStringValue(o));
                     } else {
                         objects.add(new QName("item" + argCount));
                         if (o instanceof OMElement) {
@@ -502,7 +502,7 @@
                     } else {
                         objects.add(partName);
                     }
-                    objects.add(arg.toString());
+                    objects.add(SimpleTypeMapper.getStringValue(arg));
                 } else {
                     if (partName == null) {
                         objects.add(new QName("arg" + argCount));

Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java?rev=437148&r1=437147&r2=437148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/rpc/receivers/RPCMessageReceiver.java
Sat Aug 26 04:49:24 2006
@@ -102,7 +102,12 @@
                     messageNameSpace = elementQName.getNamespaceURI();
                     OMNamespace namespace = methodElement.getNamespace();
                     if (messageNameSpace != null) {
-                        if (namespace == null || !messageNameSpace.equals(namespace.getNamespaceURI()))
{
+                        if (namespace == null) {
+                            throw new AxisFault("namespace mismatch require " +
+                                    messageNameSpace +
+                                    " found none");
+                        }
+                        if (!messageNameSpace.equals(namespace.getNamespaceURI())) {
                             throw new AxisFault("namespace mismatch require " +
                                     messageNameSpace +
                                     " found " + methodElement.getNamespace().getNamespaceURI());

Modified: webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java?rev=437148&r1=437147&r2=437148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
(original)
+++ webservices/axis2/trunk/java/modules/java2wsdl/src/org/apache/ws/java2wsdl/SchemaGenerator.java
Sat Aug 26 04:49:24 2006
@@ -127,7 +127,7 @@
             jam_service_parms.includeClass((String)getExtraClasses().get(count));
         }
         JamService service = factory.createService(jam_service_parms);
-        QName extraSchemaTypeName = null;
+        QName extraSchemaTypeName ;
         JamClassIterator jClassIter = service.getClasses();
         //all most all the time the ittr will have only one class in it
         while (jClassIter.hasNext()) {
@@ -210,7 +210,7 @@
                 extraSchemaTypeName = typeTable.getSimpleSchemaTypeName(jclass.getQualifiedName());
                 if (extraSchemaTypeName == null) 
                 {
-                    extraSchemaTypeName = generateSchema(jclass);
+                    generateSchema(jclass);
                 }
             }
         }

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java?rev=437148&r1=437147&r2=437148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/AxisConfigBuilder.java
Sat Aug 26 04:49:24 2006
@@ -17,26 +17,12 @@
 
 package org.apache.axis2.deployment;
 
-import java.io.InputStream;
-import java.util.ArrayList;
-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.axiom.om.OMAttribute;
 import org.apache.axiom.om.OMElement;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.deployment.util.PhasesInfo;
 import org.apache.axis2.deployment.util.Utils;
-import org.apache.axis2.description.HandlerDescription;
-import org.apache.axis2.description.ModuleConfiguration;
-import org.apache.axis2.description.ParameterInclude;
-import org.apache.axis2.description.PolicyInclude;
-import org.apache.axis2.description.TransportInDescription;
-import org.apache.axis2.description.TransportOutDescription;
+import org.apache.axis2.description.*;
 import org.apache.axis2.engine.AxisConfiguration;
 import org.apache.axis2.engine.AxisObserver;
 import org.apache.axis2.engine.MessageReceiver;
@@ -49,6 +35,14 @@
 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.InputStream;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+
 public class AxisConfigBuilder extends DescriptionBuilder {
 
     protected static final Log log = LogFactory.getLog(AxisConfigBuilder.class);
@@ -62,8 +56,8 @@
         try {
             OMElement config_element = buildOM();
 
-            if(!TAG_AXISCONFIG.equals(config_element.getLocalName())) {
-                throw new DeploymentException(Messages.getMessage("badelementfound",TAG_AXISCONFIG,config_element.getLocalName()));
+            if (!TAG_AXISCONFIG.equals(config_element.getLocalName())) {
+                throw new DeploymentException(Messages.getMessage("badelementfound", TAG_AXISCONFIG,
config_element.getLocalName()));
             }
             // processing Parameters
             // Processing service level parameters
@@ -103,7 +97,7 @@
             // Process TargetResolvers
             OMElement targetResolvers = config_element.getFirstChildWithName(new QName(TAG_TARGET_RESOLVERS));
             processTargetResolvers(axisConfig, targetResolvers);
-            
+
             processObservers(obs_ittr);
 
             // processing Phase orders
@@ -144,22 +138,22 @@
     }
 
     private void processTargetResolvers(AxisConfiguration axisConfig, OMElement targetResolvers)
{
-        if(targetResolvers != null){
-           Iterator iterator = targetResolvers.getChildrenWithName(new QName(TAG_TARGET_RESOLVER));
-           while(iterator.hasNext()){
-               OMElement targetResolver = (OMElement)iterator.next();
-               OMAttribute classNameAttribute = targetResolver.getAttribute(new QName(TAG_CLASS_NAME));
-               String className = classNameAttribute.getAttributeValue();
-               try {
-                   Class classInstance = Class.forName(className);
-                   TargetResolver tr = (TargetResolver)classInstance.newInstance();
-                   axisConfig.addTargetResolver(tr);
+        if (targetResolvers != null) {
+            Iterator iterator = targetResolvers.getChildrenWithName(new QName(TAG_TARGET_RESOLVER));
+            while (iterator.hasNext()) {
+                OMElement targetResolver = (OMElement) iterator.next();
+                OMAttribute classNameAttribute = targetResolver.getAttribute(new QName(TAG_CLASS_NAME));
+                String className = classNameAttribute.getAttributeValue();
+                try {
+                    Class classInstance = Class.forName(className);
+                    TargetResolver tr = (TargetResolver) classInstance.newInstance();
+                    axisConfig.addTargetResolver(tr);
                 } catch (Exception e) {
-                    if(log.isTraceEnabled()){
-                        log.trace("processTargetResolvers: Exception thrown initialising
TargetResolver: "+e.getMessage());
+                    if (log.isTraceEnabled()) {
+                        log.trace("processTargetResolvers: Exception thrown initialising
TargetResolver: " + e.getMessage());
                     }
                 }
-           }
+            }
         }
     }
 
@@ -336,8 +330,14 @@
                 if (trsClas != null) {
                     try {
                         String clasName = trsClas.getAttributeValue();
-                        Class receiverClass = Class.forName(clasName, true,
-                                Thread.currentThread().getContextClassLoader());
+                        Class receiverClass;
+                        try {
+                            receiverClass = Class.forName(clasName, true, Thread.currentThread().getContextClassLoader());
// Try the application class loader
+                        } catch (ClassNotFoundException e) {
+                            receiverClass = Class.forName(clasName); // Try the axis2 classloader
+                        }
+
+
                         TransportListener receiver =
                                 (TransportListener) receiverClass.newInstance();
                         transportIN.setReceiver(receiver);
@@ -388,8 +388,11 @@
                 Class sender;
 
                 try {
-                    sender = Class.forName(clasName, true,
-                            Thread.currentThread().getContextClassLoader());
+                    try {
+                        sender = Class.forName(clasName, true, Thread.currentThread().getContextClassLoader());
// Try the application class loader
+                    } catch (ClassNotFoundException e) {
+                        sender = Class.forName(clasName); // Try the axis2 classloader
+                    }
 
                     TransportSender transportSender = (TransportSender) sender.newInstance();
 

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=437148&r1=437147&r2=437148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/DeploymentEngine.java
Sat Aug 26 04:49:24 2006
@@ -524,6 +524,7 @@
                                 log.info(Messages.getMessage(DeploymentErrorMsgs.DEPLOYING_WS,
                                         currentArchiveFile.getName()));
                             } catch (DeploymentException de) {
+                                de.printStackTrace();
                                 log.error(Messages.getMessage(DeploymentErrorMsgs.INVALID_SERVICE,
                                         currentArchiveFile.getName(),
                                         de.getMessage()),
@@ -812,7 +813,7 @@
         String value;
         Parameter parahotdeployment = axisConfig.getParameter(TAG_HOT_DEPLOYMENT);
         Parameter parahotupdate = axisConfig.getParameter(TAG_HOT_UPDATE);
-        Parameter paraantiJARLocking = axisConfig.getParameter(TAG_ANTI_JAR_LOCKING);
+//        Parameter paraantiJARLocking = axisConfig.getParameter(TAG_ANTI_JAR_LOCKING);
 
         if (parahotdeployment != null) {
             value = (String) parahotdeployment.getValue();
@@ -830,8 +831,8 @@
             }
         }
 
-        if (paraantiJARLocking != null) {
-            value = (String) paraantiJARLocking.getValue();
+        if (parahotupdate != null) {
+            value = (String) parahotupdate.getValue();
 
             if ("true".equalsIgnoreCase(value)) {
                 antiJARLocking = true;

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java?rev=437148&r1=437147&r2=437148&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/deployment/RepositoryListener.java
Sat Aug 26 04:49:24 2006
@@ -189,9 +189,8 @@
                     }
                 }
             }
-        } else {
-            wsInfoList.addWSInfoItem(null, TYPE_DEFAULT);
         }
+        wsInfoList.addWSInfoItem(null, TYPE_DEFAULT);
     }
 
     /**



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


Mime
View raw message