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 2007/06/29 20:43:28 UTC

svn commit: r551993 - in /webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri: DocLitBareJaxbSchemaGenerator.java JaxbSchemaGenerator.java

Author: deepal
Date: Fri Jun 29 11:43:27 2007
New Revision: 551993

URL: http://svn.apache.org/viewvc?view=rev&rev=551993
Log:
adding support for doc/lit/bare support
- Dims , I introduce a very bad method name called "generateScheamWithoutCallingParent" please rename that as you wish.

Added:
    webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/DocLitBareJaxbSchemaGenerator.java
Modified:
    webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java

Added: webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/DocLitBareJaxbSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/DocLitBareJaxbSchemaGenerator.java?view=auto&rev=551993
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/DocLitBareJaxbSchemaGenerator.java (added)
+++ webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/DocLitBareJaxbSchemaGenerator.java Fri Jun 29 11:43:27 2007
@@ -0,0 +1,41 @@
+package org.apache.axis2.jaxbri;
+
+import org.apache.axis2.description.java2wsdl.DocLitBareSchemaGenerator;
+
+import java.util.Collection;
+
+/*
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+*      http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*
+*
+*/
+public class DocLitBareJaxbSchemaGenerator extends DocLitBareSchemaGenerator {
+
+    private JaxbSchemaGenerator jaxbSchemaGenerator;
+
+    public DocLitBareJaxbSchemaGenerator(ClassLoader loader, String className,
+                               String schematargetNamespace,
+                               String schematargetNamespacePrefix)
+            throws Exception {
+        super(loader, className, schematargetNamespace, schematargetNamespacePrefix,null);
+        jaxbSchemaGenerator = new JaxbSchemaGenerator(loader,className,schematargetNamespace,schematargetNamespacePrefix);
+    }
+
+
+    public Collection generateSchema() throws Exception {
+       jaxbSchemaGenerator.generateScheamWithoutCallingParent();
+        return super.generateSchema();
+    }
+}

Modified: webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java?view=diff&rev=551993&r1=551992&r2=551993
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java (original)
+++ webservices/axis2/trunk/java/modules/jaxbri/src/org/apache/axis2/jaxbri/JaxbSchemaGenerator.java Fri Jun 29 11:43:27 2007
@@ -55,6 +55,11 @@
     }
 
     public Collection generateSchema() throws Exception {
+        generateScheamWithoutCallingParent();
+        return super.generateSchema();
+    }
+
+    public void generateScheamWithoutCallingParent() throws Exception {
         Set<Class<?>> classes = new HashSet<Class<?>>();
         classes.addAll(processMethods(serviceClass.getMethods()));
 
@@ -104,8 +109,6 @@
             }
             schemaMap.put(targetNamespace, xmlSchema);
         }
-
-        return super.generateSchema();
     }
 
     private QName getTypeName(JaxBeanInfo<?> beanInfo) {



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