+ Start a Discussion
Steven2005ASteven2005A 

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


I don't know what is wrong with this wsdl? when I click Parse WSDL, it gives that error message, can anyone help me fix the file?
Thanks
the original code is posted below
 
 
Code:
<—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://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="SForceLogin">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="UID" type="s:string" />
            <s:element minOccurs="0" maxOccurs="1" name="Pwd" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="SForceLoginResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="SForceLoginResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="Query">
        <s:complexType />
      </s:element>
      <s:element name="QueryResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="QueryResult" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>
    </s:schema>
  </wsdl:types>
  <wsdl:message name="SForceLoginSoapIn">
    <wsdl:part name="parameters" element="tns:SForceLogin" />
  </wsdl:message>
  <wsdl:message name="SForceLoginSoapOut">
    <wsdl:part name="parameters" element="tns:SForceLoginResponse" />
  </wsdl:message>
  <wsdl:message name="QuerySoapIn">
    <wsdl:part name="parameters" element="tns:Query" />
  </wsdl:message>
  <wsdl:message name="QuerySoapOut">
    <wsdl:part name="parameters" element="tns:QueryResponse" />
  </wsdl:message>
  <wsdl:portType name="ServiceSoap">
    <wsdl:operation name="SForceLogin">
      <wsdl:input message="tns:SForceLoginSoapIn" />
      <wsdl:output message="tns:SForceLoginSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="Query">
      <wsdl:input message="tns:QuerySoapIn" />
      <wsdl:output message="tns:QuerySoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="ServiceSoap" type="tns:ServiceSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="SForceLogin">
      <soap:operation soapAction="http://tempuri.org/SForceLogin" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Query">
      <soap:operation soapAction="http://tempuri.org/Query" 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="SForceLogin">
      <soap12:operation soapAction="http://tempuri.org/SForceLogin" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="Query">
      <soap12:operation soapAction="http://tempuri.org/Query" 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:1908/Salesforce_Origination/Service.asmx" />
    </wsdl:port>
    <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
      <soap12:address location="http://localhost:1908/Salesforce_Origination/Service.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

 
Best Answer chosen by Admin (Salesforce Developers) 
Ron WildRon Wild
Try deleting the Soap1.2 binding.

All Answers

zirosziros
is this wsdl from ASP.NET ?
Steven2005ASteven2005A
Yes
Raghu_devRaghu_dev
I am getting the same error. Do you have a solution yet on this ? Please help me.
Ron WildRon Wild
Try deleting the Soap1.2 binding.
This was selected as the best answer
eriklangeriklang

I am getting the same error. I have attached my wsdl code.  Any help would be greatly appreciated:

 

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsdl:types>
    <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
      <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:element name="GetPublisher">
        <s:complexType />
      </s:element>
      <s:element name="GetPublisherResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="GetPublisherResult">
              <s:complexType>
                <s:sequence>
                  <s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
                  <s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
                </s:sequence>
              </s:complexType>
            </s:element>
          </s:sequence>
        </s:complexType>
      </s:element>
      <s:element name="string" nillable="true" type="s:string" />
      <s:element name="DataTable" nillable="true">
        <s:complexType>
          <s:sequence>
            <s:any minOccurs="0" maxOccurs="unbounded" namespace="http://www.w3.org/2001/XMLSchema" processContents="lax" />
            <s:any minOccurs="1" namespace="urn:schemas-microsoft-com:xml-diffgram-v1" processContents="lax" />
          </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:message name="GetPublisherSoapIn">
    <wsdl:part name="parameters" element="tns:GetPublisher" />
  </wsdl:message>
  <wsdl:message name="GetPublisherSoapOut">
    <wsdl:part name="parameters" element="tns:GetPublisherResponse" />
  </wsdl:message>
  <wsdl:message name="HelloWorldHttpGetIn" />
  <wsdl:message name="HelloWorldHttpGetOut">
    <wsdl:part name="Body" element="tns:string" />
  </wsdl:message>
  <wsdl:message name="GetPublisherHttpGetIn" />
  <wsdl:message name="GetPublisherHttpGetOut">
    <wsdl:part name="Body" element="tns:DataTable" />
  </wsdl:message>
  <wsdl:message name="HelloWorldHttpPostIn" />
  <wsdl:message name="HelloWorldHttpPostOut">
    <wsdl:part name="Body" element="tns:string" />
  </wsdl:message>
  <wsdl:message name="GetPublisherHttpPostIn" />
  <wsdl:message name="GetPublisherHttpPostOut">
    <wsdl:part name="Body" element="tns:DataTable" />
  </wsdl:message>
  <wsdl:portType name="SFGetHalSoap">
    <wsdl:operation name="HelloWorld">
      <wsdl:input message="tns:HelloWorldSoapIn" />
      <wsdl:output message="tns:HelloWorldSoapOut" />
    </wsdl:operation>
    <wsdl:operation name="GetPublisher">
      <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">This method call will get a list of all the publishers.</wsdl:documentation>
      <wsdl:input message="tns:GetPublisherSoapIn" />
      <wsdl:output message="tns:GetPublisherSoapOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:portType name="SFGetHalHttpGet">
    <wsdl:operation name="HelloWorld">
      <wsdl:input message="tns:HelloWorldHttpGetIn" />
      <wsdl:output message="tns:HelloWorldHttpGetOut" />
    </wsdl:operation>
    <wsdl:operation name="GetPublisher">
      <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">This method call will get a list of all the publishers.</wsdl:documentation>
      <wsdl:input message="tns:GetPublisherHttpGetIn" />
      <wsdl:output message="tns:GetPublisherHttpGetOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:portType name="SFGetHalHttpPost">
    <wsdl:operation name="HelloWorld">
      <wsdl:input message="tns:HelloWorldHttpPostIn" />
      <wsdl:output message="tns:HelloWorldHttpPostOut" />
    </wsdl:operation>
    <wsdl:operation name="GetPublisher">
      <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">This method call will get a list of all the publishers.</wsdl:documentation>
      <wsdl:input message="tns:GetPublisherHttpPostIn" />
      <wsdl:output message="tns:GetPublisherHttpPostOut" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="SFGetHalSoap" type="tns:SFGetHalSoap">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetPublisher">
      <soap:operation soapAction="http://tempuri.org/GetPublisher" 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="SFGetHalSoap12" type="tns:SFGetHalSoap">
    <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="HelloWorld">
      <soap12:operation soapAction="http://tempuri.org/HelloWorld" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetPublisher">
      <soap12:operation soapAction="http://tempuri.org/GetPublisher" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="SFGetHalHttpGet" type="tns:SFGetHalHttpGet">
    <http:binding verb="GET" />
    <wsdl:operation name="HelloWorld">
      <http:operation location="/HelloWorld" />
      <wsdl:input>
        <http:urlEncoded />
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="Body" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetPublisher">
      <http:operation location="/GetPublisher" />
      <wsdl:input>
        <http:urlEncoded />
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="Body" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="SFGetHalHttpPost" type="tns:SFGetHalHttpPost">
    <http:binding verb="POST" />
    <wsdl:operation name="HelloWorld">
      <http:operation location="/HelloWorld" />
      <wsdl:input>
        <mime:content type="application/x-www-form-urlencoded" />
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="Body" />
      </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="GetPublisher">
      <http:operation location="/GetPublisher" />
      <wsdl:input>
        <mime:content type="application/x-www-form-urlencoded" />
      </wsdl:input>
      <wsdl:output>
        <mime:mimeXml part="Body" />
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="SFGetHal">
    <wsdl:port name="SFGetHalSoap" binding="tns:SFGetHalSoap">
      <soap:address location="https://stage.reporderz.com/salesforceintegrationtest/sfgethal.asmx" />
    </wsdl:port>
    <wsdl:port name="SFGetHalSoap12" binding="tns:SFGetHalSoap12">
      <soap12:address location="https://stage.reporderz.com/salesforceintegrationtest/sfgethal.asmx" />
    </wsdl:port>
    <wsdl:port name="SFGetHalHttpGet" binding="tns:SFGetHalHttpGet">
      <http:address location="https://stage.reporderz.com/salesforceintegrationtest/sfgethal.asmx" />
    </wsdl:port>
    <wsdl:port name="SFGetHalHttpPost" binding="tns:SFGetHalHttpPost">
      <http:address location="https://stage.reporderz.com/salesforceintegrationtest/sfgethal.asmx" />
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

Raghu_devRaghu_dev

Since complex types (and other binding issues) are not supported by wsdltoapex I moved on to a different approach and I am pretty much making good progress with this approach. Here is the code snippet (please ignore if you are already aware of this approach)

 

 

                  HttpRequest req= new HttpRequest(); 
		  req.setEndpoint('your endpoint here'); 
		  req.setMethod('POST'); 
		  req.setHeader('content-type', 'text/xml; charset=utf-8');  
	          req.setHeader('SOAPAction', 'http://wcf42.Services/IUploadSvc/Upload'); 
		  
		  
		  req.setBody(request);
		  Http http = new Http();
		  SimpleXMLParser.ReturnObject xmlparserError = new SimpleXMLParser.ReturnObject();
		  
		  //Send the request, and return a response 
		  System.debug('Request sent: ' + req.getBody());
		  HttpResponse resObj = new HttpResponse();
		  String response = '';
		  try{
	            // Send the request, and return a response
	           resObj = http.send(req); 
		  	   response = resObj.getBody();
		  	   
	        }
	        catch(Exception ex){
	            System.debug(ex.getCause());
	            System.debug(ex.getMessage());
	            xmlparserError.ReturnId = '-1';
	            xmlparserError.ErrorMessage = ex.getMessage();
	            return xmlparserError;
	        }
	       
	        if(response.length() == 0){
	            return null;
	        }
	        else {
	        	System.debug('Response got : ' + resObj.getBody());
	        	SimpleXMLParser xmlparser = new SimpleXMLParser();
	        	XmlStreamReader reader = new XmlStreamReader(response);
	     		return xmlparser.parseReturnObjects(reader); 
	  		} 
    }

 

Hope the above will help you to overcome wsdl:binding issue.