axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dee...@apache.org
Subject svn commit: r465538 - in /webservices/axis2/branches/java/1_1/modules: integration/test/org/apache/axis2/engine/WSDLClientTest.java kernel/src/org/apache/axis2/description/AxisService.java
Date Thu, 19 Oct 2006 09:01:47 GMT
Author: deepal
Date: Thu Oct 19 02:01:47 2006
New Revision: 465538

URL: http://svn.apache.org/viewvc?view=rev&rev=465538
Log:
fixing build failure due to my previous change

Modified:
    webservices/axis2/branches/java/1_1/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
    webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/AxisService.java

Modified: webservices/axis2/branches/java/1_1/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java?view=diff&rev=465538&r1=465537&r2=465538
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/integration/test/org/apache/axis2/engine/WSDLClientTest.java
Thu Oct 19 02:01:47 2006
@@ -71,6 +71,7 @@
             String textValue = response.getFirstElement().getFirstElement().getText();
             assertEquals(textValue, "Isaac Asimov, The Foundation Trilogy");
         } catch (Exception e) {
+            e.printStackTrace();
             throw new AxisFault(e);
         }
     }

Modified: webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/AxisService.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/AxisService.java?view=diff&rev=465538&r1=465537&r2=465538
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/AxisService.java
(original)
+++ webservices/axis2/branches/java/1_1/modules/kernel/src/org/apache/axis2/description/AxisService.java
Thu Oct 19 02:01:47 2006
@@ -44,7 +44,6 @@
 import org.apache.ws.commons.schema.XmlSchemaObjectCollection;
 import org.apache.ws.commons.schema.utils.NamespaceMap;
 import org.apache.ws.commons.schema.utils.NamespacePrefixList;
-import org.apache.ws.commons.schema.utils.NodeNamespaceContext;
 import org.apache.ws.java2wsdl.Java2WSDLConstants;
 import org.apache.ws.java2wsdl.SchemaGenerator;
 import org.apache.ws.java2wsdl.utils.TypeTable;
@@ -963,7 +962,7 @@
         if (schema != null) {
             schemaList.add(schema);
             if (schema.getTargetNamespace() != null) {
-//                addSchemaNameSpace(schema.getTargetNamespace());
+                addSchemaNameSpace(schema);
             }
         }
     }
@@ -973,7 +972,7 @@
         while (iterator.hasNext()) {
             XmlSchema schema = (XmlSchema) iterator.next();
             schemaList.add(schema);
-//            addSchemaNameSpace(schema.getTargetNamespace());
+            addSchemaNameSpace(schema);
         }
     }
 
@@ -1234,9 +1233,9 @@
      * Ex:
      * Map mrMap = new HashMap();
      * mrMap.put("http://www.w3.org/2004/08/wsdl/in-only",
-     *           RPCInOnlyMessageReceiver.class.newInstance());
+     * RPCInOnlyMessageReceiver.class.newInstance());
      * mrMap.put("http://www.w3.org/2004/08/wsdl/in-out",
-     *           RPCMessageReceiver.class.newInstance());
+     * RPCMessageReceiver.class.newInstance());
      *
      * @param implClass
      * @param axisConfiguration
@@ -1251,7 +1250,7 @@
                                             AxisConfiguration axisConfiguration,
                                             Map messageReceiverClassMap,
                                             String targetNamespace,
-                                            String schemaNamespace) throws AxisFault{
+                                            String schemaNamespace) throws AxisFault {
         Parameter parameter = new Parameter(Constants.SERVICE_CLASS, implClass);
         OMElement paraElement = Utils.getParameter(Constants.SERVICE_CLASS, implClass, false);
         parameter.setParameterElement(paraElement);
@@ -1328,14 +1327,14 @@
                 if (messageReceiverClassMap.get(mep) != null) {
                     Object obj = messageReceiverClassMap.get(mep);
                     if (obj instanceof MessageReceiver) {
-                        mr = (MessageReceiver)obj;
+                        mr = (MessageReceiver) obj;
                         operation.setMessageReceiver(mr);
-                    }else {
+                    } else {
                         log.error("Object is not an instance of MessageReceiver, thus, default
MessageReceiver has been set");
                         mr = axisConfiguration.getMessageReceiver(operation.getMessageExchangePattern());
                         operation.setMessageReceiver(mr);
                     }
-                }else {
+                } else {
                     log.error("Required MessageReceiver couldn't be found, thus, default
MessageReceiver has been used");
                     mr = axisConfiguration.getMessageReceiver(operation.getMessageExchangePattern());
                     operation.setMessageReceiver(mr);
@@ -1495,13 +1494,17 @@
         this.nameSpacesMap = nameSpacesMap;
     }
 
-    private void addSchemaNameSpace(String targetNameSpace) {
+    private void addSchemaNameSpace(XmlSchema schema) {
+        String targetNameSpace = schema.getTargetNamespace();
+        String prefix = schema.getNamespaceContext().getPrefix(targetNameSpace);
+
         boolean found = false;
         if (nameSpacesMap != null && nameSpacesMap.size() > 0) {
             Iterator itr = nameSpacesMap.values().iterator();
+            Set keys = nameSpacesMap.keySet();
             while (itr.hasNext()) {
                 String value = (String) itr.next();
-                if (value.equals(targetNameSpace)) {
+                if (value.equals(targetNameSpace)&&keys.contains(prefix)) {
                     found = true;
                 }
             }



---------------------------------------------------------------------
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