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 2006/11/09 10:18:09 UTC

svn commit: r472824 - in /webservices/axis2/branches/java/1_1/modules: adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java kernel/src/org/apache/axis2/client/ServiceClient.java

Author: deepal
Date: Thu Nov  9 01:18:09 2006
New Revision: 472824

URL: http://svn.apache.org/viewvc?view=rev&rev=472824
Log:
fixing AXIS2-1624 , 1650

and thw valid exception in service client when someone tries to engage a module

Modified:
    webservices/axis2/branches/java/1_1/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java

Modified: webservices/axis2/branches/java/1_1/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java?view=diff&rev=472824&r1=472823&r2=472824
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java (original)
+++ webservices/axis2/branches/java/1_1/modules/adb/src/org/apache/axis2/databinding/typemapping/SimpleTypeMapper.java Thu Nov  9 01:18:09 2006
@@ -43,7 +43,7 @@
     private static final String W_CHAR = "java.lang.Character";
     private static final String W_FLOAT = "java.lang.Float";
     private static final String W_CALENDAR = "java.util.Calendar";
-    private static final String W_DATE = "java.util.Date"; 
+    private static final String W_DATE = "java.util.Date";
     private static final String ARRAY_LIST = "java.util.ArrayList";
     private static final String INT = "int";
     private static final String BOOLEAN = "boolean";
@@ -92,7 +92,7 @@
         } else if (parameter.getName().equals(W_CALENDAR)) {
             return makeCalendar(value.getText(), false);
         } else if (parameter.getName().equals(W_DATE)) {
-            return makeCalendar(value.getText(), true); 
+            return makeCalendar(value.getText(), true);
         } else {
             return null;
         }
@@ -122,6 +122,8 @@
         String objClassName = obj.getClass().getName();
         if (obj instanceof Calendar) {
             return true;
+        } else if (obj instanceof Date) {
+            return true;
         } else {
             return isSimpleType(objClassName);
         }
@@ -173,7 +175,7 @@
         } else if (objClassName.equals(W_CALENDAR)) {
             return true;
         } else if (objClassName.equals(W_DATE)) {
-            return true; 
+            return true;
         } else return objClassName.equals(W_CHAR);
     }
 
@@ -197,10 +199,11 @@
             }
         } else if (obj instanceof Calendar) {
             return zulu.format(((Calendar) obj).getTime());
+        } else if (obj instanceof Date) {
+            return zulu.format(obj);
         }
         return obj.toString();
     }
-
     public static Object makeCalendar(String source, boolean returnDate) {
         Calendar calendar = Calendar.getInstance();
         Date date;

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java?view=diff&rev=472824&r1=472823&r2=472824
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java (original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/client/ServiceClient.java Thu Nov  9 01:18:09 2006
@@ -291,7 +291,13 @@
      * @throws AxisFault if something goes wrong
      */
     public void engageModule(QName moduleName) throws AxisFault {
-        axisService.engageModule(axisConfig.getModule(moduleName), axisConfig);
+        AxisModule module = axisConfig.getModule(moduleName);
+        if (module != null) {
+            axisService.engageModule(module, axisConfig);
+        } else {
+            throw new AxisFault("Unable to engage module : " +
+                    moduleName.getLocalPart());
+        }
     }
 
     /**
@@ -635,7 +641,7 @@
      * stub code.
      *
      * @param operationQName qualified name of operation (local name is operation
-     *                  name, namespace URI is just the empty string)
+     *                       name, namespace URI is just the empty string)
      * @return client configured to talk to the given operation
      * @throws AxisFault if the operation is not found
      */
@@ -679,8 +685,8 @@
     /**
      * Prepare a SOAP envelope with the stuff to be sent.
      *
-     * @param messageContext   the message context to be filled
-     * @param xmlPayload the payload content
+     * @param messageContext the message context to be filled
+     * @param xmlPayload     the payload content
      * @throws AxisFault if something goes wrong
      */
     private void fillSOAPEnvelope(MessageContext messageContext, OMElement xmlPayload)



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