Cannot find the declaration of element 'wsdl:definitions'

Viewed 3236

I have tried to search a solution to my problem and didn't succeed.

When I am trying to validate my XML file with the XSD I am getting the next error:

"cvc-elt.1: Cannot find the declaration of element 'wsdl:definitions'"

I am validating it with http://www.xmlvalidation.com/index.php?

in other validator I am getting:

element definitions: Schemas validity error : Element '{http://schemas.xmlsoap.org/wsdl/}definitions': No matching global declaration available for the validation root.

My XML/wsdl file is

 <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://com.my.company/IFBTCIBPSI" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="IFBTCIBPSI" targetNamespace="http://com.my.company/IFBTCIBPSI">
  <wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://com.my.company/IFBTCIBPSI" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:QF2="urn:http://com.my.company/RSException_ARRAY" xmlns:QF1="urn:http://com.my.company/RSErrorMessage_ARRAY" xmlns:Q5="urn:com/EXCEPTION_ARRAY" xmlns:Q4="urn:com/IMOFDA" xmlns:Q3="urn:com/IMOC" xmlns:Q2="urn:com/IMIC" targetNamespace="http://com.my.company/IFBTCIBPSI">
  <xsd:import namespace="urn:http://com.my.company/RSErrorMessage_ARRAY" schemaLocation="http://mycompany.com/IFBTCIBPSI?xsd=RSErrorMessage_ARRAY.xsd" />
  <xsd:import namespace="urn:http://com.my.company/RSException_ARRAY" schemaLocation="http://mycompany.com/IFBTCIBPSI?xsd=RSException_ARRAY.xsd" />
  <xsd:import namespace="urn:com/IMIC" schemaLocation="http://mycompany.com/IFBTCIBPSI?xsd=IMIC.xsd" />
  <xsd:import namespace="urn:com/IMOC" schemaLocation="http://mycompany.com/IFBTCIBPSI?xsd=IMOC.xsd" />
  <xsd:import namespace="urn:com/IMOFDA" schemaLocation="http://mycompany.com/IFBTCIBPSI?xsd=IMOFDA.xsd" />
  <xsd:import namespace="urn:com/EXCEPTION_ARRAY" schemaLocation="http://mycompany.com/IFBTCIBPSI?xsd=EXCEPTION_ARRAY.xsd" />
  <xsd:element name="IFBTCIBP">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="Q2:IMIC" />
        <xsd:element ref="Q5:EXCEPTION_ARRAY" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="IFBTCIBPR">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="Q3:IMOC" />
        <xsd:element ref="Q4:IMOFDA" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  <xsd:element name="RSError">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element ref="QF1:RSErrorMessage_ARRAY" />
        <xsd:element ref="QF2:RSException_ARRAY" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
  </wsdl:types>
  <wsdl:message name="IFBTCIBPR">
    <wsdl:part element="tns:IFBTCIBPR" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="RSError">
    <wsdl:part element="tns:RSError" name="fault">
    </wsdl:part>
  </wsdl:message>
  <wsdl:message name="IFBTCIBP">
    <wsdl:part element="tns:IFBTCIBP" name="parameters">
    </wsdl:part>
  </wsdl:message>
  <wsdl:portType name="IFBTCIBPSI">
    <wsdl:operation name="IFBTCIBP">
<wsdl:documentation />
      <wsdl:input message="tns:IFBTCIBP">
    </wsdl:input>
      <wsdl:output message="tns:IFBTCIBPR">
    </wsdl:output>
      <wsdl:fault message="tns:RSError" name="fault">
    </wsdl:fault>
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="IFBTCIBPSI" type="tns:IFBTCIBPSI">
    <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="IFBTCIBP">
      <soap:operation soapAction="http://com.my.company/IFBTCIBPSI/IFBTCIBP" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="fault">
        <soap:fault name="fault" use="literal" />
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="IFBTCIBPSI">
<wsdl:documentation />
    <wsdl:port binding="tns:IFBTCIBPSI" name="IFBTCIBPSHttpS11Ep">
      <soap:address location="http://mycompany.com/IFBTCIBPSI" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

my xsd file is:

<?xml version='1.0' encoding='UTF-8'?><xsd:schema 
 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:com/IMIC" 
targetNamespace="urn:com/IMIC">
<xsd:annotation>
    <xsd:documentation>
    </xsd:documentation>
</xsd:annotation>
<xsd:element name="IMIC">
    <xsd:complexType>
        <xsd:sequence>
            <xsd:element minOccurs="1" ref="ID" />
            <xsd:element minOccurs="1" ref="IT" />
            <xsd:element minOccurs="1" ref="CT" />
            <xsd:element minOccurs="1" ref="MI" />
            <xsd:element minOccurs="1" ref="KBC" />
            <xsd:element minOccurs="1" ref="TT" />
            <xsd:element minOccurs="1" ref="TI" />
            <xsd:element minOccurs="1" ref="CN" />
            <xsd:element minOccurs="0" ref="ST" />
        </xsd:sequence>
    </xsd:complexType>
</xsd:element>
<xsd:element name="ID" type="xsd:date" />
<xsd:element name="IT" type="xsd:integer" />
<xsd:element name="CT" type="xsd:integer" />
<xsd:element name="MI" type="xsd:integer" />
<xsd:element name="KBC" type="xsd:integer" />
<xsd:element name="TT" type="xsd:integer" />
<xsd:element name="TI" type="xsd:string" />
<xsd:element name="CN" type="xsd:string" />
<xsd:element name="ST" type="xsd:integer" />
</xsd:schema>

Please your help.

Thanks a lot !!

1 Answers
Related