[jboss-user] [JBossWS] - Nullpointer at JBossXSEntityResolver.getXMLInputSource

QPool.Char do-not-reply at jboss.com
Fri Apr 25 13:30:59 EDT 2008


Hi, there already is a similar thread here: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124794#4124794 , but i think my situation is slightly different.

Using JBoss 4.2.2 with integrated jbossws, i have a locally published WSDL file that i cannot manipulate.
I have generated my client artifacts using Metro (wsimport tool), because i had to do some external binding customizations, which i dont know how to do with jbossws. I try to set up the service like this: 

RepositoryService repositoryService = 
  |   new RepositoryService(new URL("http://localhost:8080/alfresco/wsdl/repository-service.wsdl"), 
  |     new QName("repositoryService"));

but i get this error:


  | 19:03:51,328 WARN  [JBossWSEntityResolver] Trying to resolve id as a non-file URL: http://www.alfresco.org/ws/model/content/1.0
  | 19:03:52,703 ERROR [STDERR] java.lang.NullPointerException
  | 19:03:52,703 ERROR [STDERR] 	at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.getXMLInputSource(JBossXSEntityResolver.java:167)
  | 19:03:52,703 ERROR [STDERR] 	at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.resolveEntity(JBossXSEntityResolver.java:135)
  | 19:03:52,703 ERROR [STDERR] 	at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
  | 19:03:52,703 ERROR [STDERR] 	at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
  | 19:03:52,703 ERROR [STDERR] 	at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
  | 19:03:52,703 ERROR [STDERR] 	at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
  | 19:03:52,703 ERROR [STDERR] 	at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
  | 19:03:52,703 ERROR [STDERR] 	at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
  | 19:03:52,703 ERROR [STDERR] 	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
  | 19:03:52,703 ERROR [STDERR] 	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
  | 19:03:52,703 ERROR [STDERR] 	at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:182)
  | 

my wsd (excerptsl:


  | <wsdl:definitions name="repository-service" targetNamespace="http://www.alfresco.org/ws/service/repository/1.0">
  | <!-- ************************************** -->
  | <!-- Copyright Alfresco Software, Inc. 2005 -->
  | <!-- ************************************** -->
  | â  
  | 	<wsdl:types>
  | −
  | 	<schema elementFormDefault="qualified" targetNamespace="http://www.alfresco.org/ws/service/repository/1.0">
  | <xsd:import namespace="http://www.alfresco.org/ws/headers/1.0" schemaLocation="../wsdl/headers.xsd"/>
  | <xsd:import namespace="http://www.alfresco.org/ws/cml/1.0" schemaLocation="../wsdl/cml.xsd"/>
  | −
  | 	<element name="createStore">
  | −
  | 	<complexType>
  | −
  | 	<sequence>
  | <element name="scheme" type="xsd:string"/>
  | <element name="address" type="xsd:string"/>
  | </sequence>
  | </complexType>
  | </element>
  | −
  | 	<element name="createStoreResponse">
  | −
  | 	<complexType>
  | −
  | 	<sequence>
  | <element name="createStoreReturn" type="cms:Store"/>
  | </sequence>
  | </complexType>
  | </element>
  | −
  | 	<element name="getStores">
  | −
  | 	<complexType>
  | <sequence/>
  | </complexType>
  | </element>
  | −
  | 	<element name="getStoresResponse">
  | −
  | 	<complexType>
  | −
  | 	<sequence>
  | <element name="getStoresReturn" type="cms:Store" minOccurs="1" maxOccurs="unbounded"/>
  | </sequence>
  | </complexType>
  | </element>
  | −
  | 	<element name="query">
  | −
  | 	<complexType>
  | −
  | 	<sequence>
  | <element name="store" type="cms:Store"/>
  | <element name="query" type="cms:Query"/>
  | <element name="includeMetaData" type="xsd:boolean"/>
  | </sequence>
  | </complexType>
  | </element>
  | −....................
  | </schema>
  | </wsdl:types>
  | −
  | 	<wsdl:message name="Headers">
  | <wsdl:documentation>Defines the SOAP headers used by this service.</wsdl:documentation>
  | <wsdl:part element="rep:QueryConfiguration" name="QueryConfiguration"/>
  | </wsdl:message>
  | −
  | 	<wsdl:message name="createStoreRequest">
  | <wsdl:part element="rep:createStore" name="parameters"/>
  | </wsdl:message>
  | −
  | 	<wsdl:message name="createStoreResponse">
  | <wsdl:part element="rep:createStoreResponse" name="parameters"/>
  | </wsdl:message>
  | −
  | ............−
  | 	<wsdl:service name="RepositoryService">
  | −
  | 	<wsdl:documentation>
  | Provides read and write operations against a repository.
  | </wsdl:documentation>
  | −
  | 	<wsdl:port binding="rep:RepositoryServiceSoapBinding" name="RepositoryService">
  | <wsdlsoap:address location="http://localhost:8080/alfresco/api/RepositoryService"/>
  | </wsdl:port>
  | </wsdl:service>
  | </wsdl:definitions>
  | 

Injection also doesnt work, as expected. And using an empty constructor also doesnt work. Any hints on this? Do i have to upgrade jbossws? Or any workaround to show the method where to search for my xsd?

thx in advance


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146891#4146891

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146891




More information about the jboss-user mailing list