cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r897224 - in /cxf/branches/2.1.x-fixes: ./ api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
Date Fri, 08 Jan 2010 14:59:30 GMT
Author: dkulp
Date: Fri Jan  8 14:59:29 2010
New Revision: 897224

URL: http://svn.apache.org/viewvc?rev=897224&view=rev
Log:
Merged revisions 897223 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes

................
  r897223 | dkulp | 2010-01-08 09:55:11 -0500 (Fri, 08 Jan 2010) | 9 lines
  
  Merged revisions 897217 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r897217 | eglynn | 2010-01-08 09:40:19 -0500 (Fri, 08 Jan 2010) | 2 lines
    
    Fix for [CXF-2609] Schema validation failure when null system ID passed to LSResourceResolver.resolveResource()
  ........
................

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java

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

Modified: cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java?rev=897224&r1=897223&r2=897224&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
(original)
+++ cxf/branches/2.1.x-fixes/api/src/main/java/org/apache/cxf/wsdl/EndpointReferenceUtils.java
Fri Jan  8 14:59:29 2010
@@ -21,6 +21,7 @@
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.io.Reader;
 import java.net.MalformedURLException;
 import java.net.URI;
@@ -155,6 +156,23 @@
                 done.add(newId + ":" + namespaceURI);
                 return impl;                
             }
+
+            // handle case where given systemId is null (so that
+            // direct key lookup fails) by scanning through map
+            // searching for a namespace match
+            //
+            for (Map.Entry<String, byte[]> ent : schemas.entrySet()) {
+                if (ent.getKey().endsWith(namespaceURI)) {
+                    schemas.remove(ent.getKey());
+                    LSInputImpl impl = new LSInputImpl();
+                    impl.setSystemId(newId);
+                    impl.setBaseURI(newId);
+                    impl.setCharacterStream(
+                        new InputStreamReader(
+                            new ByteArrayInputStream(ent.getValue())));
+                    return impl;
+                }
+            }
                 
             //REVIST - we need to get catalogs in here somehow  :-(
             if (systemId == null) {



Mime
View raw message