cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r886953 - in /cxf/branches/2.2.x-fixes: ./ rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
Date Thu, 03 Dec 2009 22:19:39 GMT
Author: dkulp
Date: Thu Dec  3 22:19:39 2009
New Revision: 886953

URL: http://svn.apache.org/viewvc?rev=886953&view=rev
Log:
Merged revisions 886934 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r886934 | dkulp | 2009-12-03 16:54:19 -0500 (Thu, 03 Dec 2009) | 2 lines
  
  Put in place a guard against problems of our resolvers not being able to
  resolve a wsdl, but wsd4j can.
........

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=886953&r1=886952&r2=886953&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
(original)
+++ cxf/branches/2.2.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java
Thu Dec  3 22:19:39 2009
@@ -212,21 +212,26 @@
                                                                                 catLocator,
                                                                                 bus);
         InputSource src = wsdlLocator.getBaseInputSource();
-        Document doc;
-        try {
-            doc = StaxUtils.read(StaxUtils.createXMLStreamReader(src), true);
-            if (src.getSystemId() != null) {
-                try {
-                    doc.setDocumentURI(new String(src.getSystemId()));
-                } catch (Exception e) {
-                    // ignore - probably not DOM level 3
+        Definition def = null;
+        if (src.getByteStream() != null || src.getCharacterStream() != null) {
+            Document doc;
+            try {
+                doc = StaxUtils.read(StaxUtils.createXMLStreamReader(src), true);
+                if (src.getSystemId() != null) {
+                    try {
+                        doc.setDocumentURI(new String(src.getSystemId()));
+                    } catch (Exception e) {
+                        //ignore - probably not DOM level 3
+                    }
                 }
+            } catch (Exception e) {
+                throw new WSDLException(WSDLException.PARSER_ERROR, e.getMessage(), e);
             }
-        } catch (Exception e) {
-            throw new WSDLException(WSDLException.PARSER_ERROR, e.getMessage(), e);
+            def = reader.readWSDL(wsdlLocator, doc.getDocumentElement());
+        } else {
+            def = reader.readWSDL(wsdlLocator);
         }
         
-        Definition def = reader.readWSDL(wsdlLocator, doc.getDocumentElement());
         synchronized (definitionsMap) {
             definitionsMap.put(url, def);
         }



Mime
View raw message