Search code examples
xsdwsdleclipse-indigoeclipse-juno

WSDL error: XSD: The location has not been resolved


I just upgraded to Eclipse Juno (4.2) from Eclipse Indigo (3.7) and where my WSDL validated without any issues in Indigo, I am now getting an odd warning and error that I do not understand.

WSDL snippet:

<wsdl:types>
    <xsd:schema 
        targetNamespace="http://www.domain.com/ClientServices/LendingSimulation/V1"
        xmlns:cpReq="http://www.domain.com/ClientServices/LendingSimulation/CalculateProfitabilityRequest" 
        xmlns:cpRes="http://www.domain.com/ClientServices/LendingSimulation/CalculateProfitabilityResponse" 
        xmlns:error="http://www.domain.com/fw/errorMgmt">

        <xsd:import namespace="http://www.domain.com/ClientServices/LendingSimulation/CalculateProfitabilityRequest" schemaLocation="CalculateProfitabilityRequest.xsd" />

        <xsd:element name="calculateProfitabilityRequest" type="cpReq:CalculateProfitabilityRequestType" />

    </xsd:schema>
</wsdl:types>

Juno marks the xsd:import line with the following warning:

XSD: The location 'CalculateProfitabilityRequest.xsd' has not been resolved

It then flags the xsd:element line with the following error:

XSD: Type reference 'http://www.domain.com/ClientServices/LendingSimulation/CalculateProfitabilityRequest#CalculateProfitabilityRequestType' is unresolved

I'm pretty stumped. Not only do I not understand what the warning or error messages mean, I do not understand why Juno is flagging this as an issue, but in Indigo there are no issues. If I ctrl-click on the schemaLocation, Eclipse opens up the associated xsd file, so it isn't an issue of Eclipse not finding the file.

I've tried cleaning the project, but it has not made any difference.

EDIT

I bit the bullet and decided to reinstall Indigo Java EE (3.7). However, now when I load my project, I get the same error as in Juno! So it would appear that it isn't Juno itself, but rather something in my configuration that is not correct. However, I have no idea where to find the problem, or why Eclipse is complaining that the location is not resolved. It is almost as though I have to pre-load the files in Eclipse somehow, but I have no idea how.

If I delete the project, and reload the project as an existing Maven project, then all warning and error messages disappear. However, the project then becomes unassociated with my SCM. If I load it via the SCM, then I get this error reoccurring. I am guessing that there must be something with the project configuration, but the facets are the same so I do not know which configuration is different. Is there anyway to tell?

Any thoughts or suggestions appreciated!


Solution

  • Ok - so after countless hours of different tests and trials, I finally found the culprit. It was not RTC or Maven as I previously posted, but rather the WSDL validator being used. In the process of installing the WebSphere tools (I think!), I seem to have installed the IBM WSDL Validator (in Preferences->Validation->WSDL Validator -> implementation dropdown). I reset the implementation to WSDL4J-based WSDL Validator and everything works properly and as expected.

    Hopefully this will be able to help someone else in the future.