Romain
16 years agoNew Contributor
XSD Reference : "java.lang.Exception: Missing local file"
Hi,
i'm currently using SOAP UI 3.0.
I have many WSDLs and i integrate them into SOAPUI in order to build mock services.
When everthing is ok locally (mock services up and test requests ok), i send all the wsdl and soapui-project.xml to another server.
SOAPUI is also installed on this server and it's easy to make these mock services work on it (with the mockservicesrunner.sh). My computer is used to build the mock services and the soapui projects, the server to launch the mock services.
Only one wsdl is quite different, it is linked to a xsd file. The WSDL provides the following line within the schema definition :
Locally, i put the xsd file and the wsdl one in the same directory (E:/SOAPUI/MyWSDL/). I integrate them into SOAPUI, and build the test requests and the mock services. Everything is still normal at this point.
Then, i put all the files in the other server (the soapui-project.xml and the couple WSDL + XSD). I put the wsdl and the xsd in the same directory, on a unix filesystem witch path is obviously different thant the windows one.
Same log (soapui.log) than before when i launch it with the mockservicerunner.sh
When i try to connect to the WSDL (http://myserv:myport/myWebServiceName?WSDL), an error is thrown on my browser : Server java.lang.NullPointerException (there are the only words the browser displays).
The soapui-errors.log is more explicit :
It's difficult for Unix to understand E:/SOAPUI/MyWSDL/MyXSD.xsd
It seems that the soapui-project.xml keeps a hard reference to the xsd file.
Is it possible to make this reference become relative to the wsdl file ? Am I missing something ?
The objective is to do such transfers without modifing manually the soapui-project.xml.
Thanks in advance.
Romain
i'm currently using SOAP UI 3.0.
I have many WSDLs and i integrate them into SOAPUI in order to build mock services.
When everthing is ok locally (mock services up and test requests ok), i send all the wsdl and soapui-project.xml to another server.
SOAPUI is also installed on this server and it's easy to make these mock services work on it (with the mockservicesrunner.sh). My computer is used to build the mock services and the soapui projects, the server to launch the mock services.
Only one wsdl is quite different, it is linked to a xsd file. The WSDL provides the following line within the schema definition :
<xsd:import namespace="urn:myNameSpace" schemaLocation="MyXSD.xsd"/>
Locally, i put the xsd file and the wsdl one in the same directory (E:/SOAPUI/MyWSDL/). I integrate them into SOAPUI, and build the test requests and the mock services. Everything is still normal at this point.
Then, i put all the files in the other server (the soapui-project.xml and the couple WSDL + XSD). I put the wsdl and the xsd in the same directory, on a unix filesystem witch path is obviously different thant the windows one.
Same log (soapui.log) than before when i launch it with the mockservicerunner.sh
When i try to connect to the WSDL (http://myserv:myport/myWebServiceName?WSDL), an error is thrown on my browser : Server java.lang.NullPointerException (there are the only words the browser displays).
The soapui-errors.log is more explicit :
2009-07-17 16:29:34,840 ERROR [errorlog] java.lang.Exception: Missing local file for [file:/E:/SOAPUI/MyWSDL/MyXSD.xsd]
java.lang.Exception: Missing local file for [file:/E:/SOAPUI/MyWSDL/MyXSD.xsd]
at com.eviware.soapui.impl.support.definition.export.AbstractDefinitionExporter.replaceLocation(AbstractDefinitionExporter.java:208)
at com.eviware.soapui.impl.support.definition.export.AbstractDefinitionExporter.replaceImportsAndIncludes(AbstractDefinitionExporter.java:180)
at com.eviware.soapui.impl.support.definition.export.AbstractDefinitionExporter.createFilesForExport(AbstractDefinitionExporter.java:103)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.initWsdlCache(WsdlMockRunner.java:123)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.<init>(WsdlMockRunner.java:108)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockService.start(WsdlMockService.java:204)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockService.start(WsdlMockService.java:466)
at com.eviware.soapui.tools.SoapUIMockServiceRunner.runMockService(SoapUIMockServiceRunner.java:200)
at com.eviware.soapui.tools.SoapUIMockServiceRunner.runRunner(SoapUIMockServiceRunner.java:121)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:128)
at com.eviware.soapui.tools.AbstractSoapUIRunner.runFromCommandLine(AbstractSoapUIRunner.java:72)
at com.eviware.soapui.tools.SoapUIMockServiceRunner.main(SoapUIMockServiceRunner.java:65)
2009-07-17 16:29:42,691 ERROR [errorlog] com.eviware.soapui.impl.wsdl.mock.DispatchException: java.lang.NullPointerException
com.eviware.soapui.impl.wsdl.mock.DispatchException: java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchGetRequest(WsdlMockRunner.java:464)
at com.eviware.soapui.model.support.AbstractMockRunner.dispatchRequest(AbstractMockRunner.java:63)
at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:392)
at com.eviware.soapui.monitor.MockEngine$ServerHandler.handle(MockEngine.java:694)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
It's difficult for Unix to understand E:/SOAPUI/MyWSDL/MyXSD.xsd

It seems that the soapui-project.xml keeps a hard reference to the xsd file.
</con:content><con:type>http://www.w3.org/2001/XMLSchema</con:type></con:part><con:part><con:url>file:\E:\SOAPUI\MyWSDL\MyXSD.xsd</con:url><con:content><![CDATA[<schema ...
Is it possible to make this reference become relative to the wsdl file ? Am I missing something ?
The objective is to do such transfers without modifing manually the soapui-project.xml.
Thanks in advance.
Romain