Forum Discussion

vguna's avatar
vguna
New Contributor
16 years ago

error importing relative XSDs

Hi.

I've upgraded to 3.0.1 this morning and it seems that this version doesn't like relative schema imports.
I get this error message with a wsdl that was imported ok with 2.x:

Sun Sep 13 13:14:13 CEST 2009:ERROR:Loading of definition failed for [https://localhost:8443/backend/soap/user/MyRoomCategoryWSService?wsdl]; javax.wsdl.WSDLException: WSDLException (at /definitions/types/xs:schema): faultCode=OTHER_ERROR: Unable to locate with a locator the schema referenced at 'frontend-common.xsd' relative to document base 'https://localhost:8443/backend/soap/user/MyRoomCategoryWSService?wsdl'
Sun Sep 13 13:14:13 CEST 2009:ERROR:An error occured [WSDLException (at /definitions/types/xs:schema): faultCode=OTHER_ERROR: Unable to locate with a locator the schema referenced at 'frontend-common.xsd' relative to document base 'https://localhost:8443/backend/soap/user/MyRoomCategoryWSService?wsdl'], see error log for details
Sun Sep 13 13:15:32 CEST 2009:ERROR:An error occured [javax.wsdl.WSDLException: WSDLException (at /definitions/types/xs:schema): faultCode=OTHER_ERROR: Unable to locate with a locator the schema referenced at 'frontend-common.xsd' relative to document base 'https://localhost:8443/backend/soap/user/MyRoomCategoryWSService?wsdl'], see error log for details


Where the wsdl (...MyRoomCategoryWSService?wsdl) begins with:

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.foobar.de/frontend/user" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:frontend-user="http://www.foobar.de/frontend/user" xmlns:frontend-common="http://www.foobar.de/frontend/common" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  <types>
    <xs:schema targetNamespace="http://www.foobar.de/frontend/user">
      <xs:import namespace="http://www.foobar.de/frontend/common" schemaLocation="frontend-common.xsd"/>


frontend-common.xsd can be accessed simply via browser:

https://localhost:8443/backend/soap/user/frontend-common.xsd


So it lies next to:

https://localhost:8443/backend/soap/user/MyRoomCategoryWSService?wsdl


But somehow it can't be found by soapui.

If I change it to an absolute path like:

schemaLocation="/backend/soap/user/frontend-common.xsd"

It works as expected.

Any hints?