NullPointerException in JBossXSEntityResolver.getXMLInputSource still happening in 5.1.0
jbonham100 Jul 8, 2010 7:32 PMHi
I thought this was a fixed problem in JBoss 5.1.0, but I still got this when trying to consume a SOAP service provided by a .NET server. The exception occurs in the client service constructor. I used wsconsume to create the stub. I noticed the WSDL has a <s:import/> clause, but I removed that and still got the problem.
Any ideas would be greatly appreciated.
Here is the exception.
java.lang.NullPointerException
at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.getXMLInputSource(JBossXSEntityResolver.java:170)
at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.resolveEntity(JBossXSEntityResolver.java:136)
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:181)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processTypes(WSDL11Reader.java:451)
at org.jboss.ws.tools.wsdl.WSDL11Reader.processDefinition(WSDL11Reader.java:180)
at org.jboss.ws.tools.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitionsFactory.java:129)
at org.jboss.ws.metadata.umdm.ServiceMetaData.getWsdlDefinitions(ServiceMetaData.java:293)
at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:84)
at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:138)
at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:63)
at javax.xml.ws.Service.<init>(Service.java:79)
at com.navteq.atg.lpup.targeting.cms.ws.client.Nmap.<init>(Nmap.java:41)
at com.navteq.atg.lpup.targeting.cms.ws.client.CMSDataServiceClient.obtainServicePort(CMSDataServiceClient.java:73)
at com.navteq.atg.lpup.targeting.cms.ws.client.CMSDataServiceClient.fetchConfigurationFromCMS(CMSDataServiceClient.java:24)
at com.navteq.atg.lpup.targeting.cache.ws.CacheRefreshService.refreshConfiguration(CacheRefreshService.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.wsf.container.jboss50.invocation.InvocationHandlerJSE.invoke(InvocationHandlerJSE.java:108)
at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:222)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Here is the WSDL:
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://navteq.com/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://navteq.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://navteq.com/">
<s:import />
<s:element name="GetNmapTargetingXml">
<s:complexType />
</s:element>
<s:element name="GetNmapTargetingXmlResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="GetNmapTargetingXmlResult" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetAdvertisementNmapTargetingXmlMapping">
<s:complexType />
</s:element>
<s:element name="GetAdvertisementNmapTargetingXmlMappingResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" ref="GetAdvertisementNmapTargetingXmlMappingResult" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
<s:schema elementFormDefault="qualified">
<s:element name="GetNmapTargetingXmlResult">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="element">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="allowedValue">
<s:complexType>
<s:attribute name="description" type="s:string" />
<s:attribute name="value" type="s:string" />
</s:complexType>
</s:element>
</s:sequence>
<s:attribute name="description" type="s:string" />
<s:attribute name="name" type="s:string" />
<s:attribute default="true" name="allowManyValuesInQuery" type="s:boolean" />
<s:attribute default="false" name="allowManyValuesInRequest" type="s:boolean" />
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetAdvertisementNmapTargetingXmlMappingResult">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="advertisement">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" form="unqualified" name="id" type="s:long" />
<s:element minOccurs="0" maxOccurs="1" name="targetProfileList" type="ArrayOfTargetProfile" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfTargetProfile">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="targetProfile">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" form="unqualified" name="required" type="s:boolean" />
<s:element minOccurs="0" maxOccurs="1" form="unqualified" name="name" type="s:string" />
<s:element minOccurs="0" maxOccurs="unbounded" form="unqualified" name="value" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
<s:element name="targeting">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="element">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="allowedValue">
<s:complexType>
<s:attribute name="description" type="s:string" />
<s:attribute name="value" type="s:string" />
</s:complexType>
</s:element>
</s:sequence>
<s:attribute name="description" type="s:string" />
<s:attribute name="name" type="s:string" />
<s:attribute default="true" name="allowManyValuesInQuery" type="s:boolean" />
<s:attribute default="false" name="allowManyValuesInRequest" type="s:boolean" />
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="advertisementList">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="advertisement">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" form="unqualified" name="id" type="s:long" />
<s:element minOccurs="0" maxOccurs="1" name="targetProfileList" type="ArrayOfTargetProfile" />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="GetNmapTargetingXmlSoapIn">
<wsdl:part name="parameters" element="tns:GetNmapTargetingXml" />
</wsdl:message>
<wsdl:message name="GetNmapTargetingXmlSoapOut">
<wsdl:part name="parameters" element="tns:GetNmapTargetingXmlResponse" />
</wsdl:message>
<wsdl:message name="GetAdvertisementNmapTargetingXmlMappingSoapIn">
<wsdl:part name="parameters" element="tns:GetAdvertisementNmapTargetingXmlMapping" />
</wsdl:message>
<wsdl:message name="GetAdvertisementNmapTargetingXmlMappingSoapOut">
<wsdl:part name="parameters" element="tns:GetAdvertisementNmapTargetingXmlMappingResponse" />
</wsdl:message>
<wsdl:message name="GetNmapTargetingXmlHttpGetIn" />
<wsdl:message name="GetNmapTargetingXmlHttpGetOut">
<wsdl:part name="Body" element="targeting" />
</wsdl:message>
<wsdl:message name="GetAdvertisementNmapTargetingXmlMappingHttpGetIn" />
<wsdl:message name="GetAdvertisementNmapTargetingXmlMappingHttpGetOut">
<wsdl:part name="Body" element="advertisementList" />
</wsdl:message>
<wsdl:message name="GetNmapTargetingXmlHttpPostIn" />
<wsdl:message name="GetNmapTargetingXmlHttpPostOut">
<wsdl:part name="Body" element="targeting" />
</wsdl:message>
<wsdl:message name="GetAdvertisementNmapTargetingXmlMappingHttpPostIn" />
<wsdl:message name="GetAdvertisementNmapTargetingXmlMappingHttpPostOut">
<wsdl:part name="Body" element="advertisementList" />
</wsdl:message>
<wsdl:portType name="NmapSoap">
<wsdl:operation name="GetNmapTargetingXml">
<wsdl:input message="tns:GetNmapTargetingXmlSoapIn" />
<wsdl:output message="tns:GetNmapTargetingXmlSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetAdvertisementNmapTargetingXmlMapping">
<wsdl:input message="tns:GetAdvertisementNmapTargetingXmlMappingSoapIn" />
<wsdl:output message="tns:GetAdvertisementNmapTargetingXmlMappingSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="NmapHttpGet">
<wsdl:operation name="GetNmapTargetingXml">
<wsdl:input message="tns:GetNmapTargetingXmlHttpGetIn" />
<wsdl:output message="tns:GetNmapTargetingXmlHttpGetOut" />
</wsdl:operation>
<wsdl:operation name="GetAdvertisementNmapTargetingXmlMapping">
<wsdl:input message="tns:GetAdvertisementNmapTargetingXmlMappingHttpGetIn" />
<wsdl:output message="tns:GetAdvertisementNmapTargetingXmlMappingHttpGetOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="NmapHttpPost">
<wsdl:operation name="GetNmapTargetingXml">
<wsdl:input message="tns:GetNmapTargetingXmlHttpPostIn" />
<wsdl:output message="tns:GetNmapTargetingXmlHttpPostOut" />
</wsdl:operation>
<wsdl:operation name="GetAdvertisementNmapTargetingXmlMapping">
<wsdl:input message="tns:GetAdvertisementNmapTargetingXmlMappingHttpPostIn" />
<wsdl:output message="tns:GetAdvertisementNmapTargetingXmlMappingHttpPostOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="NmapSoap" type="tns:NmapSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetNmapTargetingXml">
<soap:operation soapAction="http://navteq.com/GetNmapTargetingXml" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetAdvertisementNmapTargetingXmlMapping">
<soap:operation soapAction="http://navteq.com/GetAdvertisementNmapTargetingXmlMapping" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="NmapSoap12" type="tns:NmapSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetNmapTargetingXml">
<soap12:operation soapAction="http://navteq.com/GetNmapTargetingXml" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetAdvertisementNmapTargetingXmlMapping">
<soap12:operation soapAction="http://navteq.com/GetAdvertisementNmapTargetingXmlMapping" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="NmapHttpGet" type="tns:NmapHttpGet">
<http:binding verb="GET" />
<wsdl:operation name="GetNmapTargetingXml">
<http:operation location="/GetNmapTargetingXml" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetAdvertisementNmapTargetingXmlMapping">
<http:operation location="/GetAdvertisementNmapTargetingXmlMapping" />
<wsdl:input>
<http:urlEncoded />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="NmapHttpPost" type="tns:NmapHttpPost">
<http:binding verb="POST" />
<wsdl:operation name="GetNmapTargetingXml">
<http:operation location="/GetNmapTargetingXml" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetAdvertisementNmapTargetingXmlMapping">
<http:operation location="/GetAdvertisementNmapTargetingXmlMapping" />
<wsdl:input>
<mime:content type="application/x-www-form-urlencoded" />
</wsdl:input>
<wsdl:output>
<mime:mimeXml part="Body" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Nmap">
<wsdl:port name="NmapSoap" binding="tns:NmapSoap">
<soap:address location="http://intlbabe4.ilapqa.local/nmapcms/nmap.asmx" />
</wsdl:port>
<wsdl:port name="NmapSoap12" binding="tns:NmapSoap12">
<soap12:address location="http://intlbabe4.ilapqa.local/nmapcms/nmap.asmx" />
</wsdl:port>
<wsdl:port name="NmapHttpGet" binding="tns:NmapHttpGet">
<http:address location="http://intlbabe4.ilapqa.local/nmapcms/nmap.asmx" />
</wsdl:port>
<wsdl:port name="NmapHttpPost" binding="tns:NmapHttpPost">
<http:address location="http://intlbabe4.ilapqa.local/nmapcms/nmap.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Thanks
Andre