[jbossws-commits] JBossWS SVN: r3132 - in branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws: integration/tools/jaxws/ant and 5 other directories.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Fri May 18 05:42:47 EDT 2007


Author: heiko.braun at jboss.com
Date: 2007-05-18 05:42:47 -0400 (Fri, 18 May 2007)
New Revision: 3132

Removed:
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/tools/jaxws/JAXBWSDLGenerator.java
Modified:
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefMetaData.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/ant/wsconsume.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/ant/wsprovide.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/api/WSContractConsumer.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/api/WSContractProvider.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/command/wsconsume.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/command/wsprovide.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/BytecodeWrapperGenerator.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/ChainedWritableWrapperGenerator.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/JBossWSProviderImpl.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/SourceWrapperGenerator.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/SunRIConsumerImpl.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/WritableWrapperGenerator.java
   branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java
Log:
cleanup imports

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefHandler.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -23,12 +23,12 @@
 
 // $Id$
 
+import org.jboss.xb.binding.UnmarshallingContext;
+import org.xml.sax.Attributes;
+
 import javax.naming.Context;
 import javax.naming.NamingException;
 
-import org.jboss.xb.binding.UnmarshallingContext;
-import org.xml.sax.Attributes;
-
 /**
  * An implementation of this interface handles all service-ref binding concerns 
  * 

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefMetaData.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefMetaData.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/ServiceRefMetaData.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -23,10 +23,10 @@
 
 // $Id$
 
+import org.w3c.dom.Element;
+
 import java.io.Serializable;
 
-import org.w3c.dom.Element;
-
 /**
  * An abstract service-ref meta data object.
  * 

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/ant/wsconsume.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/ant/wsconsume.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/ant/wsconsume.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,17 +21,7 @@
 */
 package org.jboss.ws.integration.tools.jaxws.ant;
 
-import java.io.File;
-import java.io.PrintStream;
-import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.tools.ant.AntClassLoader;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.DirectoryScanner;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.Task;
+import org.apache.tools.ant.*;
 import org.apache.tools.ant.taskdefs.ExecuteJava;
 import org.apache.tools.ant.taskdefs.LogOutputStream;
 import org.apache.tools.ant.types.Commandline;
@@ -40,6 +30,12 @@
 import org.apache.tools.ant.types.Path;
 import org.jboss.ws.integration.tools.jaxws.api.WSContractConsumer;
 
+import java.io.File;
+import java.io.PrintStream;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * Ant task which consumes a Web Service contract.
  * 

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/ant/wsprovide.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/ant/wsprovide.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/ant/wsprovide.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,9 +21,6 @@
 */
 package org.jboss.ws.integration.tools.jaxws.ant;
 
-import java.io.File;
-import java.io.PrintStream;
-
 import org.apache.tools.ant.AntClassLoader;
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Project;
@@ -36,6 +33,9 @@
 import org.apache.tools.ant.types.Reference;
 import org.jboss.ws.integration.tools.jaxws.api.WSContractProvider;
 
+import java.io.File;
+import java.io.PrintStream;
+
 /**
  * Ant task which invokes provides a Web Service contract and portable JAX-WS wrapper classes.
  * 

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/api/WSContractConsumer.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/api/WSContractConsumer.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/api/WSContractConsumer.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,14 +21,14 @@
 */
 package org.jboss.ws.integration.tools.jaxws.api;
 
+import org.jboss.ws.integration.tools.jaxws.spi.WSContractConsumerFactory;
+
 import java.io.File;
 import java.io.PrintStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.List;
 
-import org.jboss.ws.integration.tools.jaxws.spi.WSContractConsumerFactory;
-
 /**
  * WSContractConsumer is responsible for generating JAX-WS client and server
  * artifacts from the specified WSDL file. To implement a client, one would use

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/api/WSContractProvider.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/api/WSContractProvider.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/api/WSContractProvider.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -1,12 +1,12 @@
 package org.jboss.ws.integration.tools.jaxws.api;
 
+import org.jboss.ws.WSException;
+import org.jboss.ws.integration.tools.jaxws.spi.WSContractProviderFactory;
+
 import java.io.File;
 import java.io.PrintStream;
 
-import org.jboss.ws.WSException;
-import org.jboss.ws.integration.tools.jaxws.spi.WSContractProviderFactory;
 
-
 /**
  * WSContractProvider is responsible for generating the required portable
  * JAX-WS artifacts for a service endpoint implementation. This includes class

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/command/wsconsume.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/command/wsconsume.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/command/wsconsume.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -23,6 +23,7 @@
 
 import gnu.getopt.Getopt;
 import gnu.getopt.LongOpt;
+import org.jboss.ws.integration.tools.jaxws.api.WSContractConsumer;
 
 import java.io.File;
 import java.io.PrintStream;
@@ -31,8 +32,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.jboss.ws.integration.tools.jaxws.api.WSContractConsumer;
-
 /**
  * wsconsume is a command line tool that generates portable JAX-WS artifacts
  * from a WSDL file.

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/command/wsprovide.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/command/wsprovide.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/command/wsprovide.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -23,6 +23,8 @@
 
 import gnu.getopt.Getopt;
 import gnu.getopt.LongOpt;
+import org.jboss.ws.core.utils.JavaUtils;
+import org.jboss.ws.integration.tools.jaxws.api.WSContractProvider;
 
 import java.io.File;
 import java.io.PrintStream;
@@ -32,9 +34,6 @@
 import java.util.ArrayList;
 import java.util.List;
 
-import org.jboss.ws.core.utils.JavaUtils;
-import org.jboss.ws.integration.tools.jaxws.api.WSContractProvider;
-
 /**
  * wsprovide is a command line tool that generates portable JAX-WS artifacts
  * for a service endpoint implementation.

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/BytecodeWrapperGenerator.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/BytecodeWrapperGenerator.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/BytecodeWrapperGenerator.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,20 +21,19 @@
  */
 package org.jboss.ws.integration.tools.jaxws.impl;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.List;
-
 import javassist.CannotCompileException;
 import javassist.NotFoundException;
-
 import org.jboss.ws.WSException;
 import org.jboss.ws.core.jaxws.DynamicWrapperGenerator;
 import org.jboss.ws.metadata.umdm.FaultMetaData;
 import org.jboss.ws.metadata.umdm.ParameterMetaData;
 
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.ArrayList;
+import java.util.List;
+
 public class BytecodeWrapperGenerator extends DynamicWrapperGenerator implements WritableWrapperGenerator
 {
    private List<String> typeNames = new ArrayList<String>();

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/ChainedWritableWrapperGenerator.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/ChainedWritableWrapperGenerator.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/ChainedWritableWrapperGenerator.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,15 +21,15 @@
  */
 package org.jboss.ws.integration.tools.jaxws.impl;
 
+import org.jboss.ws.core.jaxws.WrapperGenerator;
+import org.jboss.ws.metadata.umdm.FaultMetaData;
+import org.jboss.ws.metadata.umdm.ParameterMetaData;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.jboss.ws.core.jaxws.WrapperGenerator;
-import org.jboss.ws.metadata.umdm.FaultMetaData;
-import org.jboss.ws.metadata.umdm.ParameterMetaData;
-
 public class ChainedWritableWrapperGenerator implements WrapperGenerator
 {
    private List<Entry> chain = new ArrayList<Entry>();

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/JBossWSProviderImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/JBossWSProviderImpl.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/JBossWSProviderImpl.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,25 +21,23 @@
 */
 package org.jboss.ws.integration.tools.jaxws.impl;
 
+import org.jboss.ws.WSException;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo;
+import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
 import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_EJB3;
 import static org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType.JAXWS_JSE;
+import org.jboss.ws.integration.ResourceLoaderAdapter;
+import org.jboss.ws.integration.tools.jaxws.api.WSContractProvider;
+import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
+import org.jboss.ws.metadata.umdm.UnifiedMetaData;
 
+import javax.ejb.Stateless;
 import java.io.File;
 import java.io.IOException;
 import java.io.PrintStream;
 import java.net.URL;
 import java.net.URLClassLoader;
 
-import javax.ejb.Stateless;
-
-import org.jboss.ws.WSException;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo;
-import org.jboss.ws.core.server.UnifiedDeploymentInfo.DeploymentType;
-import org.jboss.ws.integration.ResourceLoaderAdapter;
-import org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder;
-import org.jboss.ws.metadata.umdm.UnifiedMetaData;
-import org.jboss.ws.integration.tools.jaxws.api.WSContractProvider;
-
 /**
  * The default WSContractProvider implementation.
  * 

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/SourceWrapperGenerator.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/SourceWrapperGenerator.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/SourceWrapperGenerator.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,19 +21,7 @@
  */
 package org.jboss.ws.integration.tools.jaxws.impl;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.List;
-import java.util.SortedMap;
-
-import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlAccessorType;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.namespace.QName;
-
+import com.sun.codemodel.*;
 import org.jboss.logging.Logger;
 import org.jboss.ws.WSException;
 import org.jboss.ws.core.jaxws.AbstractWrapperGenerator;
@@ -43,14 +31,13 @@
 import org.jboss.ws.metadata.umdm.ParameterMetaData;
 import org.jboss.ws.metadata.umdm.WrappedParameter;
 
-import com.sun.codemodel.JAnnotationArrayMember;
-import com.sun.codemodel.JAnnotationUse;
-import com.sun.codemodel.JCodeModel;
-import com.sun.codemodel.JDefinedClass;
-import com.sun.codemodel.JExpr;
-import com.sun.codemodel.JFieldVar;
-import com.sun.codemodel.JMethod;
-import com.sun.codemodel.JMod;
+import javax.xml.bind.annotation.*;
+import javax.xml.namespace.QName;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.List;
+import java.util.SortedMap;
 
 /**
  * Generates source for wrapper beans

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/SunRIConsumerImpl.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/SunRIConsumerImpl.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/SunRIConsumerImpl.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,15 +21,15 @@
 */
 package org.jboss.ws.integration.tools.jaxws.impl;
 
+import com.sun.tools.ws.wscompile.CompileTool;
+import org.jboss.ws.integration.tools.jaxws.api.WSContractConsumer;
+
 import java.io.File;
 import java.io.PrintStream;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
 
-import com.sun.tools.ws.wscompile.CompileTool;
-import org.jboss.ws.integration.tools.jaxws.api.WSContractConsumer;
-
 /**
  * WSContractConsumer that delegates to the Sun CompileTool.
  *

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/WritableWrapperGenerator.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/WritableWrapperGenerator.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/integration/tools/jaxws/impl/WritableWrapperGenerator.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,11 +21,11 @@
  */
 package org.jboss.ws.integration.tools.jaxws.impl;
 
+import org.jboss.ws.core.jaxws.WrapperGenerator;
+
 import java.io.File;
 import java.io.IOException;
 
-import org.jboss.ws.core.jaxws.WrapperGenerator;
-
 public interface WritableWrapperGenerator extends WrapperGenerator
 {
    public void write(File directory) throws IOException;

Deleted: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/tools/jaxws/JAXBWSDLGenerator.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/tools/jaxws/JAXBWSDLGenerator.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/tools/jaxws/JAXBWSDLGenerator.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -1,113 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.ws.tools.jaxws;
-
-import java.io.IOException;
-
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.Result;
-import javax.xml.transform.dom.DOMResult;
-
-import org.jboss.ws.Constants;
-import org.jboss.ws.WSException;
-import org.jboss.ws.extensions.security.Util;
-import org.jboss.ws.metadata.wsdl.DOMTypes;
-import org.jboss.ws.tools.wsdl.WSDLGenerator;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-
-import com.sun.xml.bind.api.JAXBRIContext;
-
-/**
- * JAXBWSDLGenerator provides a JAXB based WSDLGenerator.
- * 
- * @author <a href="mailto:jason.greene at jboss.com">Jason T. Greene</a>
- */
-public class JAXBWSDLGenerator extends WSDLGenerator
-{
-   private JAXBRIContext ctx;
-
-   public JAXBWSDLGenerator(JAXBRIContext ctx)
-   {
-      super();
-      this.ctx = ctx;
-   }
-
-   protected void processTypes()
-   {
-      // Register namespaces
-      for (String ns : ctx.getKnownNamespaceURIs())
-         if (ns.length() > 0)
-            wsdl.registerNamespaceURI(ns, null);
-
-      try
-      {
-         DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
-         Document doc = builder.newDocument();
-         DOMTypes types = new DOMTypes(doc);
-         final Element element = types.getElement();
-         final Element throwAway = doc.createElement("throw-away");
-
-         ctx.generateSchema(new SchemaOutputResolver()
-         {
-            @Override
-            public Result createOutput(String namespace, String file) throws IOException
-            {
-               // JBWS-1295, getKnownNamespaceURIs is not accurate
-               if (namespace.length() > 0 && wsdl.getPrefix(namespace) == null)
-                  wsdl.registerNamespaceURI(namespace, null);
-
-               // JAXB creates an empty namespace due to type references, ignore it
-               DOMResult result = new DOMResult((namespace == null || namespace.length() == 0) ? throwAway : element);
-               result.setSystemId("replace-me");
-               return result;
-            }
-         });
-
-         // Until we stop inlining schema, we will need to filter schemaLocations since JAXB requires them
-         removeSchemaLocations(element);
-
-         wsdl.setWsdlTypes(types);
-      }
-      catch (Exception exception)
-      {
-         throw new WSException("Could not generate schema: " + exception.getMessage(), exception);
-      }
-   }
-
-   private void removeSchemaLocations(Element element)
-   {
-      for (Element child = Util.getFirstChildElement(element); child != null; child = Util.getNextSiblingElement(child))
-      {
-         if ("import".equals(child.getLocalName()) && Constants.NS_SCHEMA_XSD.equals(child.getNamespaceURI()) && "replace-me".equals(child.getAttribute("schemaLocation")))
-         {
-            child.removeAttribute("schemaLocation");
-         }
-         else
-         {
-            removeSchemaLocations(child);
-         }
-      }
-   }
-}
\ No newline at end of file

Modified: branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java
===================================================================
--- branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java	2007-05-18 09:01:49 UTC (rev 3131)
+++ branches/jbossws-2.0/jbossws-core/src/java/org/jboss/ws/tools/wsdl/JAXBWSDLGenerator.java	2007-05-18 09:42:47 UTC (rev 3132)
@@ -21,23 +21,20 @@
 */
 package org.jboss.ws.tools.wsdl;
 
-import java.io.IOException;
-
-import javax.xml.bind.SchemaOutputResolver;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.transform.Result;
-import javax.xml.transform.dom.DOMResult;
-
+import com.sun.xml.bind.api.JAXBRIContext;
 import org.jboss.ws.Constants;
 import org.jboss.ws.WSException;
 import org.jboss.ws.extensions.security.Util;
 import org.jboss.ws.metadata.wsdl.DOMTypes;
-import org.jboss.ws.tools.wsdl.WSDLGenerator;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
-import com.sun.xml.bind.api.JAXBRIContext;
+import javax.xml.bind.SchemaOutputResolver;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Result;
+import javax.xml.transform.dom.DOMResult;
+import java.io.IOException;
 
 /**
  * JAXBWSDLGenerator provides a JAXB based WSDLGenerator.
@@ -54,6 +51,9 @@
       this.ctx = ctx;
    }
 
+   /**
+    * Delegate schema generation to JAXB RI
+    */
    protected void processTypes()
    {
       // Register namespaces




More information about the jbossws-commits mailing list