Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 46273 invoked from network); 3 Dec 2009 21:54:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Dec 2009 21:54:45 -0000 Received: (qmail 17365 invoked by uid 500); 3 Dec 2009 21:54:44 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 17173 invoked by uid 500); 3 Dec 2009 21:54:42 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 17153 invoked by uid 99); 3 Dec 2009 21:54:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 21:54:42 +0000 X-ASF-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Dec 2009 21:54:40 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 69F3223888E9; Thu, 3 Dec 2009 21:54:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r886934 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Date: Thu, 03 Dec 2009 21:54:20 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091203215420.69F3223888E9@eris.apache.org> Author: dkulp Date: Thu Dec 3 21:54:19 2009 New Revision: 886934 URL: http://svn.apache.org/viewvc?rev=886934&view=rev Log: Put in place a guard against problems of our resolvers not being able to resolve a wsdl, but wsd4j can. Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java?rev=886934&r1=886933&r2=886934&view=diff ============================================================================== --- cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java (original) +++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLManagerImpl.java Thu Dec 3 21:54:19 2009 @@ -219,21 +219,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); }