You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Grant McDonald <gm...@infocomp.com> on 2006/06/22 00:59:14 UTC
Problems importing XML Schemas in WSDL documents (http and bpe
engines)
I have declared xml schema imports in a wsdl that forms part of an endpoint
on servicemix-http and when I start up servicemix I get a WSDLException from
the importer as it trys to load my xsd from the directory the server was
launched from and not the directory that the service unit was deployed to.
How can I control what directory servicemix will use as its base to import
documents from? (esp. wsdl and xsd imports).
Here is the import in question:
<import
location="EchoRequest.xsd"
namespace="http://www.infocomp.com/conductor/test"/>
Here is the relevant part of the stacktrace:
WSDLException (at /definitions/import[1]): faultCode=OTHER_ERROR: Unable to
resolve imported document at 'EchoRequest.xsd'.:
This file was not found:
file:/opt/Applications/servicemix-3.0-20060523.071937-3/EchoRequest.xsd:
java.io.FileNotFoundException: This file was not found:
file:/opt/Applications/servicemix-3.0-20060523.071937-3/EchoRequest.xsd
at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown
Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at
org.apache.servicemix.soap.SoapEndpoint.loadWsdl(SoapEndpoint.java:193)
EchoRequest.xsd is in the same directory as the WSDL file so I must be doing
something wrong with the configuration if it can't find it.
--
View this message in context: http://www.nabble.com/Problems-importing-XML-Schemas-in-WSDL-documents-%28http-and-bpe-engines%29-t1827154.html#a4984243
Sent from the ServiceMix - User forum at Nabble.com.
Re: Problems importing XML Schemas in WSDL documents (http and bpe
engines)
Posted by Grant McDonald <gm...@infocomp.com>.
I note that this problem has a trivial solution which has been implemented in
the M2 release. After passing the importing issue though I came across a
warn message where the same problem occurs when activating the endpoint. The
problem here is that the document base is not so easily accessible as the
Document object URI is null. See the stacktrace below:
12:08:08,428 | DEBUG | Thread-12 | EndpointRegistry |
jbi.framework.EndpointRegistry 286 | Error retrieving interfaces from
service description
WSDLException (at /definitions/import): faultCode=OTHER_ERROR: Unable to
resolve imported document at 'EchoRequest.xsd'.: This file was not found:
file:/home/INFOCOMP/gmcdonald/projects/cbis/Server/EchoRequest.xsd:
java.io.FileNotFoundException: This file was not found:
file:/home/INFOCOMP/gmcdonald/projects/cbis/Server/EchoRequest.xsd
at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseImport(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
at
org.apache.servicemix.jbi.framework.EndpointRegistry.retrieveInterfacesFromDescription(EndpointRegistry.java:246)
at
org.apache.servicemix.jbi.framework.EndpointRegistry.registerInternalEndpoint(EndpointRegistry.java:168)
at
org.apache.servicemix.jbi.framework.Registry.activateEndpoint(Registry.java:179)
at
org.apache.servicemix.jbi.framework.ComponentContextImpl.activateEndpoint(ComponentContextImpl.java:135)
at org.apache.servicemix.soap.SoapEndpoint.activate(SoapEndpoint.java:304)
at org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:49)
This comes out as a warning on the console:
12:08:08,415 | WARN | Thread-12 | EndpointRegistry |
jbi.framework.EndpointRegistry 284 | Error retrieving interfaces from
service description: WSDLException (at /definitions/import):
faultCode=OTHER_ERROR: Unable to resolve imported document at
'EchoRequest.xsd'.: This file was not found:
file:/home/INFOCOMP/gmcdonald/projects/cbis/Server/EchoRequest.xsd
Will this failure cause problems using the endpoint?
--
View this message in context: http://www.nabble.com/Problems-importing-XML-Schemas-in-WSDL-documents-%28http-and-bpe-engines%29-t1827154.html#a4986189
Sent from the ServiceMix - User forum at Nabble.com.