Forum Discussion

redknee1's avatar
redknee1
New Contributor
10 years ago

WSDL load issue: redefine schemaLocation failed

when I try to load attached wsdl/xsd, loading fails with:

WSDLException (at/wsdl.definitions/wsdl.types/xsd:schema/xsd:schema):
faultCode=OTHER_ERROR: Unable to locate with locator the schema referenced at 'ADPD.xsd' relative to document base 'file:\D:\tmp\151013\wsdl\ADPJ.xsd'

 

Test project has set  resourceRoot="${projectDir}".

Schema is redefined by:

    <xsd:redefine schemaLocation="ADPD.xsd">

If I use instead an absolute path:

    <xsd:redefine schemaLocation="file:///d:/tmp/151011/wsdl/ADPD.xsd" >

it works.

 

As we have to pass the WSDL to other collegues or customer who are using SOAPUI it is annoying to ask them to edit the file before they are able to use it.

 

Any idea of a format which finds the ADPD.xsd stored in the same directory? Any hint is very welcome!

 

Regards

Charlotte

 

 

4 Replies

  • nmrao's avatar
    nmrao
    Community Hero

    I believe that this is more of a xml schema and wsdl related question rather than a soapUI question.

     

    You need to check what you are a redefining i.e., do not see anything in the redefining schema. Also consider positing in the appropriate forum.

  • kondasamy's avatar
    kondasamy
    Regular Contributor

    I would like to shed few thoughts over this question! I assume, you are using a linked Schema/ WSDL; in which the dependent schema location causes some errors because SoapUI could not able to find the linked Schema in your local system directory. Also, you would like to reduice the dependency. Correct?

     

    So, I would suggest these solutions,

    1) Instead of refering the Schema in local directory, you could place in a common share path which is accessible by all your colleagues and refer the same path in WSDL.

    Eg: "file:///CTDIT0098/tmp/151011/wsdl/ADPD.xsd" instead of "file:///d:/tmp/151011/wsdl/ADPD.xsd"

    2) Another similar solution is alike, but refering the schema from web server location.

    Eg: "file:///www.samplesite.com/151011/wsdl/ADPD.xsd" instead of "file:///d:/tmp/151011/wsdl/ADPD.xsd"

     

    I have experienced the same problem while importing WSDL/ WADL to SoapUI. So, these were the options which I tried and succeed. Please add if any other better solution is available.

     

    Thanks,

    Samy

     

    Did my reply answer your question? Give Kudos or Accept it as a Solution to help others, Thanks. ↓↓↓

    • redknee1's avatar
      redknee1
      New Contributor

      Thanks for the answers... but

      the intension is to have all xsd togehter, and all addressed relativly (in the resource directory).

      We want to deliver the interface files to our customer together with a simple installation hint like "put them in your resource directory".

      What is necessary now and what we do not like is that customer has to edit our files.

       

      nmrao:

      This format is supported by the standard, as well as by some other tools. The problem is linked to SOAUI - so I do not know a better a forum.

       

      kondasamy:

      As I tried to explain above: for sure we could take a different absolute path - but any absolute path is local, and somebody has to edit the delivered files. That is why we are searching for a way to address it relativly.

      • kondasamy's avatar
        kondasamy
        Regular Contributor

        I can able to understand your situation! But, I'm still not sure whether Schema location can be specified with a realtive path. I would suggest you to make use of the absolute path (with the options specified in my past answer) where ever you feel comfortable to edit. Also, I came across this thread - http://stackoverflow.com/questions/1071849/is-there-an-elegant-way-to-specify-an-xsd-schemalocation-attribute-in-visual-stu ;  where the have used as below relative path format,

        <xs:include schemaLocation="../../ReferencedProject/Data/ReferencedSchema.xsd" />

        Please check whether this solution gives hands to your problem!

         

        Thanks,

        Samy

         

        Did my reply answer your question? Give Kudos or Accept it as a Solution to help others, Thanks. ↓↓↓