While I was working on XML schema definition (XSD) files, during compilation I was receiving the below error –
“The targetNamespace of the referenced XML Schema does not match the expected namespace. at AccountingEntryEBS.wsdl”
Reason: In my AccountingEntryEBS.wsdl file I’m importing another schema file as below –
<xsd:import namespace=“http://union.ca.net/EnterpriseObjects/Core/Common/V2“ schemaLocation=“../Schemas/Meta.xsd“/>
In Meta.xsd schema file the targetNamespace attribute values was definesd as ‘http://union.ca.net/EnterpriseObjects/Core/Common/V1’.
Since in my reference namespace URL (http://union.ca.net/EnterpriseObjects/Core/Common/V2) and the targetNamespace attribute value (http://union.ca.net/EnterpriseObjects/Core/Common/V1) mismatches this issue was araising.
Resoultion: I have modified my reference namespace URL from http://union.ca.net/EnterpriseObjects/Core/Common/V2 to http://union.ca.net/EnterpriseObjects/Core/Common/V1. This fixed the issue.