ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sc...@apache.org
Subject svn commit: r682004 - /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wsdl/impl/SchemaReaderImpl.java
Date Sat, 02 Aug 2008 16:16:22 GMT
Author: scheu
Date: Sat Aug  2 09:16:21 2008
New Revision: 682004

URL: http://svn.apache.org/viewvc?rev=682004&view=rev
Log:
AXIS2-3960
Exclude certain namespaces from the namespace->package search

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wsdl/impl/SchemaReaderImpl.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wsdl/impl/SchemaReaderImpl.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wsdl/impl/SchemaReaderImpl.java?rev=682004&r1=682003&r2=682004&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wsdl/impl/SchemaReaderImpl.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/wsdl/impl/SchemaReaderImpl.java
Sat Aug  2 09:16:21 2008
@@ -52,6 +52,16 @@
     private static String SCHEMA_TARGETNAMESPACE = "targetNamespace";
     private Definition wsdlDefinition = null;
     private static Log log = LogFactory.getLog(SchemaReaderImpl.class);
+    
+    
+    // The following list of schema should be ignored by the schema->packages
+    // algorithm.
+    private static List<String> ignoreSchema = null;
+    static {
+        ignoreSchema = new ArrayList<String>();
+        ignoreSchema.add("http://schemas.xmlsoap.org/ws/2004/08/addressing");
+        ignoreSchema.add("http://www.w3.org/2005/08/addressing");
+    }
 
     /* (non-Javadoc)
       * @see org.apache.axis2.jaxws.wsdl.SchemaReader#readPackagesFromSchema(javax.wsdl.Definition)
@@ -108,6 +118,14 @@
             //no Schema Binding package name found, this means no jaxb customizations in
schema, lets read wsdl
             //targetnamespace. Thats what will be used by RI tooling to store java Beans
             String namespace = readSchemaTargetnamespace(schema);
+            if (ignoreSchema.contains(namespace)) {
+                // ignore this schema and its contents...continue
+                if (log.isDebugEnabled()) {
+                    log.debug("Ignoring targetnamespace " + namespace);
+                }
+                schemaList.add(schema);
+                return;
+            }
             if (namespace != null) {
                 packageString = JavaUtils.getPackageFromNamespace(namespace);
             }



Mime
View raw message