Author: alessio.soldano(a)jboss.com
Date: 2010-09-10 03:41:23 -0400 (Fri, 10 Sep 2010)
New Revision: 400
Modified:
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/wsdlResolver/WiseEntityResolver.java
Log:
[WISE-169] Fix WiseEntityResolver for avoiding dependency on the jbossws resolver, fixing
failures with CXF stack
Modified:
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/wsdlResolver/WiseEntityResolver.java
===================================================================
---
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/wsdlResolver/WiseEntityResolver.java 2010-09-10
07:04:16 UTC (rev 399)
+++
core/trunk/core/src/main/java/org/jboss/wise/core/client/impl/wsdlResolver/WiseEntityResolver.java 2010-09-10
07:41:23 UTC (rev 400)
@@ -27,14 +27,15 @@
import java.net.URL;
import org.jboss.logging.Logger;
-import org.jboss.ws.core.utils.JBossWSEntityResolver;
+import org.jboss.util.xml.JBossEntityResolver;
import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
/**
*
* @author alessio.soldano(a)jboss.com
*/
-public class WiseEntityResolver extends JBossWSEntityResolver {
+public class WiseEntityResolver extends JBossEntityResolver {
// provide logging
private static final Logger log = Logger.getLogger(WiseEntityResolver.class);
@@ -44,7 +45,25 @@
super();
this.connection = connection;
}
+
+ @Override
+ public InputSource resolveEntity(String publicId, String systemId) throws
SAXException, IOException
+ {
+ if(log.isTraceEnabled()) log.trace("resolveEntity: [pub=" + publicId +
",sysid=" + systemId + "]");
+ InputSource inputSource = super.resolveEntity(publicId, systemId);
+ if (inputSource == null)
+ inputSource = resolveSystemIDAsURL(systemId, log.isTraceEnabled());
+
+ if (inputSource == null)
+ {
+ if (log.isDebugEnabled())
+ log.debug("Cannot resolve entity: [pub=" + publicId +
",sysid=" + systemId + "]");
+ }
+
+ return inputSource;
+ }
+
/**
* Use a ResourceURL to access the resource. This method should be protected
* in the super class.
@@ -53,7 +72,6 @@
* @param trace
* @return an InputSource
*/
- @Override
protected InputSource resolveSystemIDAsURL(String id, boolean trace) {
if (id == null)
return null;
Show replies by date