Author: gnodet
Date: Sun Aug 20 12:33:49 2006
New Revision: 433019

URL: http://svn.apache.org/viewvc?rev=433019&view=rev
Log:
Remove ugly stdout log from wsdl4j when importing documents

Modified:
    
incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
    
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java
    
incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
    
incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java
    
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java
    
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java
    
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
    
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
    
incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java

Modified: 
incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java?rev=433019&r1=433018&r2=433019&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-bpe/src/main/java/org/apache/servicemix/bpe/BPEDeployer.java
 Sun Aug 20 12:33:49 2006
@@ -63,6 +63,8 @@
 import org.apache.servicemix.common.tools.wsdl.WSDLFlattener;
 import org.w3c.dom.Document;
 
+import com.ibm.wsdl.Constants;
+
 public class BPEDeployer extends AbstractDeployer {
 
     protected FilenameFilter filter;
@@ -164,12 +166,8 @@
         String bpel = bpels[0].getAbsoluteFile().toURI().toString();
         String wsdl = bpel.substring(0, bpel.length() - 4) + "wsdl";
                WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
-       
-               reader.setFeature("javax.wsdl.verbose",true);
-               reader.setFeature("javax.wsdl.importDocuments",true);
-                                       
+               reader.setFeature(Constants.FEATURE_VERBOSE, false);
                reader.setExtensionRegistry(getExtentionRegistry());
-       
                // Parse the document and include any imported WSDL documents
                Definition ret = reader.readWSDL(null, wsdl);
                return ret;

Modified: 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java?rev=433019&r1=433018&r2=433019&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/wsdl1/AbstractWsdl1Deployer.java
 Sun Aug 20 12:33:49 2006
@@ -22,6 +22,8 @@
 import org.apache.servicemix.common.ServiceUnit;
 import org.w3c.dom.Document;
 
+import com.ibm.wsdl.Constants;
+
 import javax.jbi.management.DeploymentException;
 import javax.wsdl.Binding;
 import javax.wsdl.Definition;
@@ -148,6 +150,7 @@
         ExtensionRegistry registry = factory.newPopulatedExtensionRegistry();
         registerExtensions(registry);
         WSDLReader reader = factory.newWSDLReader();
+        reader.setFeature(Constants.FEATURE_VERBOSE, false);
         reader.setExtensionRegistry(registry);
         return reader;
     }

Modified: 
incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java?rev=433019&r1=433018&r2=433019&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-core/src/main/java/org/apache/servicemix/jbi/framework/EndpointRegistry.java
 Sun Aug 20 12:33:49 2006
@@ -33,6 +33,7 @@
 import javax.wsdl.PortType;
 import javax.wsdl.Service;
 import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
 
 import org.apache.commons.logging.Log;
@@ -47,6 +48,8 @@
 import org.apache.servicemix.jbi.servicedesc.LinkedEndpoint;
 import org.w3c.dom.Document;
 
+import com.ibm.wsdl.Constants;
+
 import edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap;
 
 /**
@@ -241,7 +244,9 @@
                 }
                 return;
             }
-            Definition definition = 
WSDLFactory.newInstance().newWSDLReader().readWSDL(null, document);
+            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
+            reader.setFeature(Constants.FEATURE_VERBOSE, false);
+            Definition definition = reader.readWSDL(null, document);
             // Check if the wsdl is only a port type
             // In these cases, only the port type is used, as the service name 
and endpoint name
             // are provided on the jbi endpoint

Modified: 
incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java?rev=433019&r1=433018&r2=433019&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-eip/src/main/java/org/apache/servicemix/eip/EIPEndpoint.java
 Sun Aug 20 12:33:49 2006
@@ -48,6 +48,8 @@
 import org.springframework.core.io.Resource;
 import org.w3c.dom.Document;
 
+import com.ibm.wsdl.Constants;
+
 /**
  * @author gnodet
  * @version $Revision: 376451 $
@@ -279,7 +281,9 @@
     protected Definition getDefinitionFromDescription() {
         if( description!=null ) {
             try {
-                return 
WSDLFactory.newInstance().newWSDLReader().readWSDL(null, description);
+                WSDLReader reader = WSDLFactory.newInstance().newWSDLReader(); 
+                reader.setFeature(Constants.FEATURE_VERBOSE, false);
+                return reader.readWSDL(null, description);
             } catch (WSDLException ignore) {
             }
         }
@@ -291,6 +295,7 @@
             try {
                 URL resource = wsdlResource.getURL();
                 WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
+                reader.setFeature(Constants.FEATURE_VERBOSE, false);
                 return reader.readWSDL(null, resource.toString());
             } catch (Throwable ignore) {
             }
@@ -302,7 +307,9 @@
         if( wsdlExchangeTarget != null ) {
             try {
                 Document description = 
getDescriptionForExchangeTarget(wsdlExchangeTarget);
-                return 
WSDLFactory.newInstance().newWSDLReader().readWSDL(null, description);
+                WSDLReader reader = WSDLFactory.newInstance().newWSDLReader(); 
+                reader.setFeature(Constants.FEATURE_VERBOSE, false);
+                return reader.readWSDL(null, description);
             } catch (Throwable ignore) {
             }
         }

Modified: 
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java?rev=433019&r1=433018&r2=433019&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/Jsr181Endpoint.java
 Sun Aug 20 12:33:49 2006
@@ -53,6 +53,8 @@
 import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 
+import com.ibm.wsdl.Constants;
+
 /**
  * 
  * @author gnodet
@@ -251,7 +253,9 @@
             if (this.service != null && interfaceName != null &&
                 
!this.service.getNamespaceURI().equals(interfaceName.getNamespaceURI())) {
                 // Parse the WSDL
-                definition = 
WSDLFactory.newInstance().newWSDLReader().readWSDL(null, description);
+                WSDLReader reader = WSDLFactory.newInstance().newWSDLReader(); 
+                reader.setFeature(Constants.FEATURE_VERBOSE, false);
+                definition = reader.readWSDL(null, description);
                 // Get the service and port definition
                 javax.wsdl.Service svc = definition.getService(new 
QName(this.interfaceName.getNamespaceURI(), this.service.getLocalPart()));
                 Port port = svc != null && svc.getPorts().size() == 1 ? (Port) 
svc.getPorts().values().iterator().next() : null;
@@ -317,6 +321,7 @@
         if (wsdlResource != null) {
             URL resource = wsdlResource.getURL();
             WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
+            reader.setFeature(Constants.FEATURE_VERBOSE, false);
             return reader.readWSDL(null, resource.toString());
         }
         return null;

Modified: 
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java?rev=433019&r1=433018&r2=433019&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-jsr181/src/main/java/org/apache/servicemix/jsr181/xfire/JbiProxy.java
 Sun Aug 20 12:33:49 2006
@@ -21,6 +21,7 @@
 import javax.jbi.servicedesc.ServiceEndpoint;
 import javax.wsdl.Definition;
 import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
 import javax.xml.namespace.QName;
 
 import org.codehaus.xfire.XFire;
@@ -30,6 +31,8 @@
 import org.codehaus.xfire.service.ServiceFactory;
 import org.w3c.dom.Document;
 
+import com.ibm.wsdl.Constants;
+
 public class JbiProxy {
     
     protected XFire xfire;
@@ -110,7 +113,9 @@
                 this.endpoint = endpoint;
             }
             Document doc = context.getEndpointDescriptor(endpoint);
-            this.description = 
WSDLFactory.newInstance().newWSDLReader().readWSDL(null, doc);
+            WSDLReader reader = WSDLFactory.newInstance().newWSDLReader(); 
+            reader.setFeature(Constants.FEATURE_VERBOSE, false);
+            this.description = reader.readWSDL(null, doc);
         }
         return this.description;
     }

Modified: 
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java?rev=433019&r1=433018&r2=433019&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapEndpoint.java
 Sun Aug 20 12:33:49 2006
@@ -49,6 +49,8 @@
 import org.springframework.core.io.Resource;
 import org.w3c.dom.Document;
 
+import com.ibm.wsdl.Constants;
+
 public abstract class SoapEndpoint extends Endpoint {
 
     protected ServiceEndpoint activated;
@@ -225,7 +227,9 @@
                     XBeanServiceUnit su = (XBeanServiceUnit) serviceUnit;
                     
Thread.currentThread().setContextClassLoader(su.getKernel().getClassLoaderFor(su.getConfiguration()));
                 }
-                Definition def = 
WSDLFactory.newInstance().newWSDLReader().readWSDL(wsdlResource.getURL().toString());
+                WSDLReader reader = WSDLFactory.newInstance().newWSDLReader(); 
+                reader.setFeature(Constants.FEATURE_VERBOSE, false);
+                Definition def = 
reader.readWSDL(wsdlResource.getURL().toString());
                 overrideDefinition(def);
             } catch (Exception e) {
                 logger.warn("Could not load description from resource", e);
@@ -310,7 +314,8 @@
             if (ep != null) {
                 Document doc = ctx.getEndpointDescriptor(ep);
                 if (doc != null) {
-                    WSDLReader reader = 
WSDLFactory.newInstance().newWSDLReader();
+                    WSDLReader reader = 
WSDLFactory.newInstance().newWSDLReader(); 
+                    reader.setFeature(Constants.FEATURE_VERBOSE, false);
                     Definition def = reader.readWSDL(null, doc);
                     if (def != null) {
                         overrideDefinition(def);
@@ -387,6 +392,7 @@
         ExtensionRegistry registry = factory.newPopulatedExtensionRegistry();
         registerExtensions(registry);
         WSDLReader reader = factory.newWSDLReader();
+        reader.setFeature(Constants.FEATURE_VERBOSE, false);
         reader.setExtensionRegistry(registry);
         return reader;
     }

Modified: 
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java?rev=433019&r1=433018&r2=433019&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-soap/src/main/java/org/apache/servicemix/soap/SoapHelper.java
 Sun Aug 20 12:33:49 2006
@@ -52,6 +52,8 @@
 import org.apache.servicemix.soap.marshalers.SoapWriter;
 import org.w3c.dom.Document;
 
+import com.ibm.wsdl.Constants;
+
 /**
  * Helper class for working with soap endpoints
  * 
@@ -346,7 +348,8 @@
                     Document description = 
componentContext.getEndpointDescriptor(se);
                     if (description != null) {
                         // Parse WSDL
-                        WSDLReader reader = factory.newWSDLReader();
+                        WSDLReader reader = factory.newWSDLReader(); 
+                        reader.setFeature(Constants.FEATURE_VERBOSE, false);
                         try {
                             definition = reader.readWSDL(null, description);
                         } catch (WSDLException e) {

Modified: 
incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java
URL: 
http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java?rev=433019&r1=433018&r2=433019&view=diff
==============================================================================
--- 
incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java
 (original)
+++ 
incubator/servicemix/trunk/servicemix-wsn2005/src/main/java/org/apache/servicemix/wsn/component/WSNComponent.java
 Sun Aug 20 12:33:49 2006
@@ -36,6 +36,8 @@
 import org.apache.servicemix.common.tools.wsdl.WSDLFlattener;
 import org.w3c.dom.Document;
 
+import com.ibm.wsdl.Constants;
+
 public class WSNComponent extends BaseComponent {
 
     private WSDLFlattener flattener;
@@ -98,6 +100,7 @@
                 if (flattener == null) {
                     URL resource = 
getClass().getClassLoader().getResource("org/apache/servicemix/wsn/wsn.wsdl");
                     WSDLReader reader = 
WSDLFactory.newInstance().newWSDLReader();
+                    reader.setFeature(Constants.FEATURE_VERBOSE, false);
                     Definition definition = reader.readWSDL(null, 
resource.toString());
                     flattener = new WSDLFlattener(definition);
                 }


Reply via email to