[jboss-dev-forums] [JBoss XML Binding Development] - Re: JBossEntityResolver cannot resolve...
klowtherjr
do-not-reply at jboss.com
Wed Oct 28 17:15:13 EDT 2009
Alex,
Here are two examples. I would expect loadClasspathResource to find this first one using the sysid. However, it isn't in the jar as just wxBase.xsd. It is in myAppPrefix/OGC/int/eurocontrol/wx/1.1.0. I noticed there's an extra .0 there that isn't in the pub. I put a version of the file with a path of myAppPrefix/OGC/int/eurocontrol/wx/1.1 as well, but that doesn't help either.
2009-10-28 15:17:51,156 DEBUG [org.jboss.ws.core.utils.JBossWSEntityResolver] resolveEntity: [pub=http://www.eurocontrol.int/wx/1.1,sysid=wxBase.xsd]
2009-10-28 15:17:51,156 TRACE [org.jboss.util.xml.JBossEntityResolver] resolvePublicID, publicId=http://www.eurocontrol.int/wx/1.1
2009-10-28 15:17:51,156 TRACE [org.jboss.util.xml.JBossEntityResolver] resolveSystemID, systemId=wxBase.xsd
2009-10-28 15:17:51,156 TRACE [org.jboss.util.xml.JBossEntityResolver] resolveClasspathName, systemId=wxBase.xsd
2009-10-28 15:17:51,156 TRACE [org.jboss.util.xml.JBossEntityResolver] Mapped systemId to filename: wxBase.xsd
2009-10-28 15:17:51,156 TRACE [org.jboss.util.xml.JBossEntityResolver] resolveSystemIDasURL, systemId=wxBase.xsd
2009-10-28 15:17:51,156 TRACE [org.jboss.util.xml.JBossEntityResolver] Trying to resolve systemId as a URL
2009-10-28 15:17:51,156 TRACE [org.jboss.util.xml.JBossEntityResolver] SystemId is not a url: wxBase.xsd
java.net.MalformedURLException: no protocol: wxBase.xsd
at java.net.URL.(URL.java:567)
at java.net.URL.(URL.java:464)
at java.net.URL.(URL.java:413)
at org.jboss.util.xml.JBossEntityResolver.resolveSystemIDasURL(JBossEntityResolver.java:403)
at org.jboss.util.xml.JBossEntityResolver.resolveEntity(JBossEntityResolver.java:266)
at org.jboss.ws.core.utils.JBossWSEntityResolver.resolveEntity(JBossWSEntityResolver.java:65)
at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.resolveEntity(JBossXSEntityResolver.java:79)
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:182)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:401)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:178)
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:295)
at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:86)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.(ServiceDelegateImpl.java:140)
at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:64)
at javax.xml.ws.Service.(Service.java:81)
...
2009-10-28 15:17:51,156 DEBUG [org.jboss.util.xml.JBossEntityResolver] Cannot resolve [publicID=http://www.eurocontrol.int/wx/1.1,systemID=wxBase.xsd]
2009-10-28 15:17:51,156 DEBUG [org.jboss.ws.core.utils.JBossWSEntityResolver] Cannot resolve entity: [pub=http://www.eurocontrol.int/wx/1.1,sysid=wxBase.xsd]
For completeness, I'm posting the xsd file that is causing the above:
<schema targetNamespace="http://www.eurocontrol.int/wx/1.1" xmlns:wx="http://www.eurocontrol.int/wx/1.1"
xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
attributeFormDefault="unqualified" version="1.0">
...
I noticed in the jar that there's an extra .1 here that isn't in the pub (gml/3.2.1). I removed it in the jar just to see, but it didn't seem to make a difference.
2009-10-28 15:17:51,250 DEBUG [org.jboss.ws.core.utils.JBossWSEntityResolver] resolveEntity: [pub=http://www.opengis.net/gml/3.2,sysid=../../../../net/opengis/gml/3.2.1/gml.xsd]
2009-10-28 15:17:51,250 TRACE [org.jboss.util.xml.JBossEntityResolver] resolvePublicID, publicId=http://www.opengis.net/gml/3.2
2009-10-28 15:17:51,250 TRACE [org.jboss.util.xml.JBossEntityResolver] resolveSystemID, systemId=../../../../net/opengis/gml/3.2.1/gml.xsd
2009-10-28 15:17:51,250 TRACE [org.jboss.util.xml.JBossEntityResolver] resolveClasspathName, systemId=../../../../net/opengis/gml/3.2.1/gml.xsd
2009-10-28 15:17:51,250 TRACE [org.jboss.util.xml.JBossEntityResolver] Mapped systemId to filename: gml.xsd
2009-10-28 15:17:51,250 TRACE [org.jboss.util.xml.JBossEntityResolver] resolveSystemIDasURL, systemId=../../../../net/opengis/gml/3.2.1/gml.xsd
2009-10-28 15:17:51,250 TRACE [org.jboss.util.xml.JBossEntityResolver] Trying to resolve systemId as a URL
2009-10-28 15:17:51,250 TRACE [org.jboss.util.xml.JBossEntityResolver] SystemId is not a url: ../../../../net/opengis/gml/3.2.1/gml.xsd
java.net.MalformedURLException: no protocol: ../../../../net/opengis/gml/3.2.1/gml.xsd
at java.net.URL.(URL.java:567)
at java.net.URL.(URL.java:464)
at java.net.URL.(URL.java:413)
at org.jboss.util.xml.JBossEntityResolver.resolveSystemIDasURL(JBossEntityResolver.java:403)
at org.jboss.util.xml.JBossEntityResolver.resolveEntity(JBossEntityResolver.java:266)
at org.jboss.ws.core.utils.JBossWSEntityResolver.resolveEntity(JBossWSEntityResolver.java:65)
at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.resolveEntity(JBossXSEntityResolver.java:79)
at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:182)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:401)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:178)
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:128)
at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:295)
at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:86)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.(ServiceDelegateImpl.java:140)
at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:64)
at javax.xml.ws.Service.(Service.java:81)
...
2009-10-28 15:17:51,250 DEBUG [org.jboss.util.xml.JBossEntityResolver] Cannot resolve [publicID=http://www.opengis.net/gml/3.2,systemID=../../../../net/opengis/gml/3.2.1/gml.xsd]
2009-10-28 15:17:51,250 DEBUG [org.jboss.ws.core.utils.JBossWSEntityResolver] Cannot resolve entity: [pub=http://www.opengis.net/gml/3.2,sysid=../../../../net/opengis/gml/3.2.1/gml.xsd]
Here is the offending XSD file snippet that caused this:
<xsd:import namespace="http://www.opengis.net/gml/3.2"
schemaLocation="../../../../net/opengis/gml/3.2.1/gml.xsd"/>
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262815#4262815
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262815
More information about the jboss-dev-forums
mailing list