function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Manoj.tManoj.t 

Failed to parse wsdl: Unable to find schema for element; {http://www.w3.org/2001/XMLSchema}

 

<?xml version="1.0" encoding="utf-8"?>
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://force.com/">
      <s:element name="HelloWorld">
        <s:complexType />
      </s:element>
      <s:element name="HelloWorldResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="HelloWorldSoapIn">
    <wsdl:part name="parameters" element="tns:HelloWorld" />
  </wsdl:message>
  <wsdl:message name="HelloWorldSoapOut">
    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />
  </wsdl:message>
  <wsdl:portType name="ServiceSoap">
    <wsdl:operation name="HelloWorld">
      <wsdl:input message="tns:HelloWorldSoapIn" />
      <wsdl:output message="tns:HelloWorldSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap:operation soapAction="http://force.com/HelloWorld" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap12:operation soapAction="http://force.com/HelloWorld" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="Service">
    <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
      <soap:address location="http://localhost:50402/webs/Service.asmx" />
    </wsdl:port>
    <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
      <soap12:address location="http://localhost:50402/webs/Service.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

<?xml version="1.0" encoding="utf-8"?><wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://force.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://force.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">  <wsdl:types>    <s:schema elementFormDefault="qualified" targetNamespace="http://force.com/">      <s:element name="HelloWorld">        <s:complexType />      </s:element>      <s:element name="HelloWorldResponse">        <s:complexType>          <s:sequence>            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />          </s:sequence>        </s:complexType>      </s:element>    </s:schema>  </wsdl:types>  <wsdl:message name="HelloWorldSoapIn">    <wsdl:part name="parameters" element="tns:HelloWorld" />  </wsdl:message>  <wsdl:message name="HelloWorldSoapOut">    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />  </wsdl:message>  <wsdl:portType name="ServiceSoap">    <wsdl:operation name="HelloWorld">      <wsdl:input message="tns:HelloWorldSoapIn" />      <wsdl:output message="tns:HelloWorldSoapOut" />    </wsdl:operation>  </wsdl:portType>  <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />    <wsdl:operation name="HelloWorld">      <soap:operation soapAction="http://force.com/HelloWorld" style="document" />      <wsdl:input>        <soap:body use="literal" />      </wsdl:input>      <wsdl:output>        <soap:body use="literal" />      </wsdl:output>    </wsdl:operation>  </wsdl:binding>  <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />    <wsdl:operation name="HelloWorld">      <soap12:operation soapAction="http://force.com/HelloWorld" style="document" />      <wsdl:input>        <soap12:body use="literal" />      </wsdl:input>      <wsdl:output>        <soap12:body use="literal" />      </wsdl:output>    </wsdl:operation>  </wsdl:binding>  <wsdl:service name="Service">    <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">      <soap:address location="http://localhost:50402/webs/Service.asmx" />    </wsdl:port>    <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">      <soap12:address location="http://localhost:50402/webs/Service.asmx" />    </wsdl:port>  </wsdl:service></wsdl:definitions>

 

Pradeep_NavatarPradeep_Navatar

Make sure you have read the best practices for importing WSDL in Apex code Developer's guide documentation.

 

Not all WSDL features are supported in the WSDL2Apex. The XML Schema in your WSDL doc uses a feature of schema called attributeGroups and in my opinion these are not supported by WSDL2Apex.

Manoj.tManoj.t

Thanks u all now i am able to access my WSDL file and Apex class generated by apex. 

sornasorna

Hi Manoj,

Can you please share the solution with me....I am facing the same problem too "Unsupported Schema element found http://www.w3.org/2001/XMLSchema:attributeGroup".

 

 

Thanks in advance,

sorna

Manoj.tManoj.t



Hi sorna 

 just remove servicesoap12 element from your code after that u can able to generate apex class from wsdl file.

Thanks

 Manoj  








<?xml version="1.0" encoding="utf-8"?>

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://force.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://force.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">

  <wsdl:types>

    <s:schema elementFormDefault="qualified" targetNamespace="http://force.com/">

      <s:element name="HelloWorld">

        <s:complexType />

      </s:element>

      <s:element name="HelloWorldResponse">

        <s:complexType>

          <s:sequence>

            <s:element minOccurs="0" maxOccurs="1" name="HelloWorldResult" type="s:string" />

          </s:sequence>

        </s:complexType>

      </s:element>

    </s:schema>

  </wsdl:types>

  <wsdl:message name="HelloWorldSoapIn">

    <wsdl:part name="parameters" element="tns:HelloWorld" />

  </wsdl:message>

  <wsdl:message name="HelloWorldSoapOut">

    <wsdl:part name="parameters" element="tns:HelloWorldResponse" />

  </wsdl:message>

  <wsdl:portType name="ServiceSoap">

    <wsdl:operation name="HelloWorld">

      <wsdl:input message="tns:HelloWorldSoapIn" />

      <wsdl:output message="tns:HelloWorldSoapOut" />

    </wsdl:operation>

  </wsdl:portType>

  <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">

    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="HelloWorld">

      <soap:operation soapAction="http://force.com/HelloWorld" style="document" />

      <wsdl:input>

        <soap:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <soap:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:binding name="ServiceSoap12" type="tns:ServiceSoap">

    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="HelloWorld">

      <soap12:operation soapAction="http://force.com/HelloWorld" style="document" />

      <wsdl:input>

        <soap12:body use="literal" />

      </wsdl:input>

      <wsdl:output>

        <soap12:body use="literal" />

      </wsdl:output>

    </wsdl:operation>

  </wsdl:binding>

  <wsdl:service name="Service">

    <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">

      <soap:address location="http://localhost:50402/webs/Service.asmx" />

    </wsdl:port>

    <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">

      <soap12:address location="http://localhost:50402/webs/Service.asmx" />

    </wsdl:port>

  </wsdl:service>

</wsdl:definitions>

AshyAshy

can you tell me how did it got parsed?

 

i am facing the same issue actually.

AshyAshy

hi manoj, i am facing the same error  can you help me out?

 

below is my wsdl file.

 

<?xml version="1.0" encoding="utf-8" ?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://Bodhtree.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://Bodhtree.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://Bodhtree.com/">
<s:element name="GetData">
<s:complexType />
</s:element>
<s:element name="GetDataResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetDataResult">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="GetDataSoapIn">
<wsdl:part name="parameters" element="tns:GetData" />
</wsdl:message>
<wsdl:message name="GetDataSoapOut">
<wsdl:part name="parameters" element="tns:GetDataResponse" />
</wsdl:message>
<wsdl:portType name="Service1Soap">
<wsdl:operation name="GetData">
<wsdl:input message="tns:GetDataSoapIn" />
<wsdl:output message="tns:GetDataSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Service1Soap" type="tns:Service1Soap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetData">
<soap:operation soapAction="http://Bodhtree.com/GetData" style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="Service1Soap12" type="tns:Service1Soap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetData">
<soap12:operation soapAction="http://Bodhtree.com/GetData" style="document" />
<wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Service1">
<wsdl:port name="Service1Soap" binding="tns:Service1Soap">
<soap:address location="http://172.16.2.195/Test/Service1.asmx" />
</wsdl:port>
<wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
<soap12:address location="http://172.16.2.195/Test/Service1.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Shri RajShri Raj

Hello Manoj and Ashy,

Im facing the same problem right now. Can you please let me know how did you get over it? I have removed servicesoap12 from my XML and it did not parse the WSDL. ITs showing the same error.

Thanks, 
Shri