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
AkiraDioAkiraDio 

WSDL parse error

Faced with this problem, I want to create Apex Class from WSDL, but get an error:

Error: Failed to parse wsdl: Found more than one wsdl:binding. WSDL with multiple binding not supported

My WSDL:

<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://tempuri.org/" 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://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <s:element name="Tset">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="a" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="b" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="TsetResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="TsetResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="TsetSoapIn">
    <wsdl:part name="parameters" element="tns:Tset" />
  </wsdl:message>
  <wsdl:message name="TsetSoapOut">
    <wsdl:part name="parameters" element="tns:TsetResponse" />
  </wsdl:message>
  <wsdl:portType name="Service1Soap">
    <wsdl:operation name="Tset">
      <wsdl:input message="tns:TsetSoapIn" />
      <wsdl:output message="tns:TsetSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="Service1Soap" type="tns:Service1Soap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="Tset">
      <soap:operation soapAction="http://tempuri.org/Tset" 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="Tset">
      <soap12:operation soapAction="http://tempuri.org/Tset" 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://demo17841.atservers.net/Service1.asmx" />
    </wsdl:port>
    <wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
      <soap12:address location="http://demo17841.atservers.net/Service1.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

 Web-service: http://demo17841.atservers.net/Service1.asmx?WSDL

Never had to deal with WSDL, please help!

 

Best Answer chosen by Admin (Salesforce Developers) 
Avidev9Avidev9
This is a salesforce limitation.
Salesforce doesnt support wsdl with multiple binding.

What you can do is, open your WSDL file in notepad and remove these lines and save the wsdl.

<wsdl:port name="Service1Soap12" binding="tns:Service1Soap12">
<soap12:address location="http://demo17841.atservers.net/Service1.asmx" />
</wsdl:port>

After making the changes try to consume the WSDL again