none
Web Service - Cannot import wsdl:binding RRS feed

  • Question

  • Hello,

    I am getting below warning within Visual Studio 2013 when I build my C# Web application by referring to a Web Service developed by external consultant.  The web service is installed on my local server but it was developed externally.  It cannot bind into the application.  Any recommendation?

    Warning 1 Custom tool warning: Cannot import wsdl:binding
    Detail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.XYZ.com/CustomerInquiry/']/wsdl:binding[@name='ServiceHttpGet'] C:\Users\Brandon\Documents\Visual Studio 2013\Projects\ABC\Service References\XYZWebService\Reference.svcmap 1 1 ABC

    Thanks,

    Brandon.

    Thursday, April 27, 2017 12:36 AM

Answers

All replies

  • >>The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled

    Did you generate proxy code by svcutil.exe or Add Service Reference in VS 2013?

    If you use svcutil for generating service proxy you have to remove everything related to http://schemas.xmlsoap.org/wsdl/http namespace which is prefixed as http.

    For another way, I suggest you try to use VS 2013 by Adding Service Reference->Advanced->Add Web Reference->Enter URL and Web Reference name->Add Reference.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, April 27, 2017 2:17 AM
  • I am using VS 2013 to add the Web service.  It added fine but when I built the solution, it generates these warnings.  Due to the limitation of the application, I have to use .NET Framework 3.5.  I used a free Web VS version which uses .NET 4.5 version.  I can build the solution without warning. Unfortunately, the Web VS does not provide .NET 3.5 option.   I am not sue if it is a bug in VS 2013 or related to .NET 3.5 which is causing the problem.

    You mentioned to use svcutil to generate service proxy.  How does it integrate into VS 2013?  I am not familiar with this utility.

    Thanks,

    Brandon.

    Thursday, April 27, 2017 2:50 AM
  • >>The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled

    These are not used by Client, I suggest you try to remove them and check whether your service will work.

    In my option, these are warning according to SOAP schema. They would not make your service broken. As you know, the warning did not appear in .net 4.5. If you compare the difference between generated code in 3.5 and 4.5, is there any difference?

    I would suggest you run your client to check whether it will broke your service.


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, April 27, 2017 2:58 AM
  • I am referring to production asmx file.  The 'http://schemas.xmlsoap.org/wsdl/http is embedded in the Service Description which I cannot change it...
    Thursday, April 27, 2017 3:06 AM
  • Hello,

    I have been searching the Internet with limited information for resolution.  Anyone has any suggestion to help correct below problem? Thanks in advance.


    Below are the warnings which prevent me from building the solution in Visual Studio 2013 or 2015:

    Severity Code Description Project File Line Suppression State
    Warning Custom tool warning: Cannot import wsdl:binding
    Detail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:binding[@name='ServiceHttpGet'] Test D:\Temp\Projects\Test\Test\Test\Service References\MyWebService\Reference.svcmap 1

    Severity Code Description Project File Line Suppression State
    Warning Custom tool warning: Cannot import wsdl:binding
    Detail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:binding[@name='ServiceHttpPost'] Test D:\Temp\Projects\Test\Test\Test\Service References\MyWebService\Reference.svcmap 1

    Severity Code Description Project File Line Suppression State
    Warning Custom tool warning: Cannot import wsdl:port
    Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
    XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:binding[@name='ServiceHttpPost']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:service[@name='Service']/wsdl:port[@name='ServiceHttpPost'] Test D:\Temp\Projects\Test\Test\Test\Service References\MyWebService\Reference.svcmap 1

    Severity Code Description Project File Line Suppression State
    Warning Custom tool warning: Cannot import wsdl:port
    Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
    XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:binding[@name='ServiceHttpGet']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:service[@name='Service']/wsdl:port[@name='ServiceHttpGet'] Test D:\Temp\Projects\Test\Test\Test\Service References\MyWebService\Reference.svcmap 1

    Below is the partial Service Description that I extracted from the Web Service:

    <?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://www.consultant.com/CustomerQuery/" 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://www.consultant.com/CustomerQuery/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://www.consultant.com/CustomerQuery/">
          <s:element name="GetCustomerChanges">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
        </s:schema>
      </wsdl:types>
      <wsdl:message name="GetCustomerChangesSoapIn">
        <wsdl:part name="parameters" element="tns:GetCustomerChanges" />
      </wsdl:message>
      <wsdl:message name="GetCustomerChangesSoapOut">
        <wsdl:part name="parameters" element="tns:GetCustomerChangesResponse" />
      </wsdl:message>
        <wsdl:message name="GetCustomerChangesHttpGetIn">
        <wsdl:part name="GUID" type="s:string" />
      </wsdl:message>
      <wsdl:message name="GetCustomerChangesHttpGetOut">
        <wsdl:part name="Body" />
      </wsdl:message>
      <wsdl:message name="GetCustomerChangesHttpPostIn">
        <wsdl:part name="GUID" type="s:string" />
      </wsdl:message>
      <wsdl:message name="GetCustomerChangesHttpPostOut">
        <wsdl:part name="Body" />
      </wsdl:message>
        <wsdl:operation name="GetCustomerChanges">
          <wsdl:input message="tns:GetCustomerChangesSoapIn" />
          <wsdl:output message="tns:GetCustomerChangesSoapOut" />
        </wsdl:operation>
        <wsdl:operation name="GetCustomerChanges">
          <wsdl:input message="tns:GetCustomerChangesHttpGetIn" />
          <wsdl:output message="tns:GetCustomerChangesHttpGetOut" />
        </wsdl:operation>
        <wsdl:operation name="GetCustomerChanges">
          <wsdl:input message="tns:GetCustomerChangesHttpPostIn" />
          <wsdl:output message="tns:GetCustomerChangesHttpPostOut" />
        </wsdl:operation>
        <wsdl:operation name="GetCustomerChanges">
          <soap:operation soapAction="http://www.consultant.com/CustomerQuery/GetCustomerChanges" style="document" />
          <wsdl:input>
            <soap:body use="literal" />
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal" />
          </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetCustomerChanges">
          <http:operation location="/GetCustomerChanges" />
          <wsdl:input>
            <http:urlEncoded />
          </wsdl:input>
          <wsdl:output>
            <mime:content part="Body" type="text/xml" />
          </wsdl:output>
        </wsdl:operation>
      <wsdl:service name="Service">
        <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
          <soap:address location="http://MyServer/Connects/CustomerQuery.asmx" />
        </wsdl:port>
        <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
          <soap12:address location="http://MyServer/Connects/CustomerQuery.asmx" />
        </wsdl:port>
        <wsdl:port name="ServiceHttpGet" binding="tns:ServiceHttpGet">
          <http:address location="http://MyServer/Connects/CustomerQuery.asmx" />
        </wsdl:port>
        <wsdl:port name="ServiceHttpPost" binding="tns:ServiceHttpPost">
          <http:address location="http://MyServer/Connects/CustomerQuery.asmx" />
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>

    Thursday, April 27, 2017 10:56 PM
  • Hello,

    I am getting below warning from the web service developed by our consultant.  I prevent my from creating the solution within VS 2013.  I am able to add the Web Service into VS but when I compile, it gives me below warnings.

    I have been searching the Internet with limited information for resolution.  Anyone has any suggestion to help correct below problem? Thanks in advance.

    Below are the warnings which prevent me from building the solution in Visual Studio 2013 or 2015:

    Severity Code Description Project File Line Suppression State
    Warning Custom tool warning: Cannot import wsdl:binding
    Detail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:binding[@name='ServiceHttpGet'] Test D:\Temp\Projects\Test\Test\Test\Service References\MyWebService\Reference.svcmap 1

    Severity Code Description Project File Line Suppression State
    Warning Custom tool warning: Cannot import wsdl:binding
    Detail: The required WSDL extension element 'binding' from namespace 'http://schemas.xmlsoap.org/wsdl/http/' was not handled.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:binding[@name='ServiceHttpPost'] Test D:\Temp\Projects\Test\Test\Test\Service References\MyWebService\Reference.svcmap 1

    Severity Code Description Project File Line Suppression State
    Warning Custom tool warning: Cannot import wsdl:port
    Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
    XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:binding[@name='ServiceHttpPost']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:service[@name='Service']/wsdl:port[@name='ServiceHttpPost'] Test D:\Temp\Projects\Test\Test\Test\Service References\MyWebService\Reference.svcmap 1

    Severity Code Description Project File Line Suppression State
    Warning Custom tool warning: Cannot import wsdl:port
    Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
    XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:binding[@name='ServiceHttpGet']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.consultant.com/CustomerQuery/']/wsdl:service[@name='Service']/wsdl:port[@name='ServiceHttpGet'] Test D:\Temp\Projects\Test\Test\Test\Service References\MyWebService\Reference.svcmap 1

    Below is the partial Service Description that I extracted from the Web Service:

    <?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://www.consultant.com/CustomerQuery/" 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://www.consultant.com/CustomerQuery/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
      <wsdl:types>
        <s:schema elementFormDefault="qualified" targetNamespace="http://www.consultant.com/CustomerQuery/">
          <s:element name="GetCustomerChanges">
            <s:complexType>
              <s:sequence>
                <s:element minOccurs="0" maxOccurs="1" name="GUID" type="s:string" />
              </s:sequence>
            </s:complexType>
          </s:element>
        </s:schema>
      </wsdl:types>
      <wsdl:message name="GetCustomerChangesSoapIn">
        <wsdl:part name="parameters" element="tns:GetCustomerChanges" />
      </wsdl:message>
      <wsdl:message name="GetCustomerChangesSoapOut">
        <wsdl:part name="parameters" element="tns:GetCustomerChangesResponse" />
      </wsdl:message>
        <wsdl:message name="GetCustomerChangesHttpGetIn">
        <wsdl:part name="GUID" type="s:string" />
      </wsdl:message>
      <wsdl:message name="GetCustomerChangesHttpGetOut">
        <wsdl:part name="Body" />
      </wsdl:message>
      <wsdl:message name="GetCustomerChangesHttpPostIn">
        <wsdl:part name="GUID" type="s:string" />
      </wsdl:message>
      <wsdl:message name="GetCustomerChangesHttpPostOut">
        <wsdl:part name="Body" />
      </wsdl:message>
        <wsdl:operation name="GetCustomerChanges">
          <wsdl:input message="tns:GetCustomerChangesSoapIn" />
          <wsdl:output message="tns:GetCustomerChangesSoapOut" />
        </wsdl:operation>
        <wsdl:operation name="GetCustomerChanges">
          <wsdl:input message="tns:GetCustomerChangesHttpGetIn" />
          <wsdl:output message="tns:GetCustomerChangesHttpGetOut" />
        </wsdl:operation>
        <wsdl:operation name="GetCustomerChanges">
          <wsdl:input message="tns:GetCustomerChangesHttpPostIn" />
          <wsdl:output message="tns:GetCustomerChangesHttpPostOut" />
        </wsdl:operation>
        <wsdl:operation name="GetCustomerChanges">
          <soap:operation soapAction="http://www.consultant.com/CustomerQuery/GetCustomerChanges" style="document" />
          <wsdl:input>
            <soap:body use="literal" />
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal" />
          </wsdl:output>
        </wsdl:operation>
        <wsdl:operation name="GetCustomerChanges">
          <http:operation location="/GetCustomerChanges" />
          <wsdl:input>
            <http:urlEncoded />
          </wsdl:input>
          <wsdl:output>
            <mime:content part="Body" type="text/xml" />
          </wsdl:output>
        </wsdl:operation>
      <wsdl:service name="Service">
        <wsdl:port name="ServiceSoap" binding="tns:ServiceSoap">
          <soap:address location="http://MyServer/Connects/CustomerQuery.asmx" />
        </wsdl:port>
        <wsdl:port name="ServiceSoap12" binding="tns:ServiceSoap12">
          <soap12:address location="http://MyServer/Connects/CustomerQuery.asmx" />
        </wsdl:port>
        <wsdl:port name="ServiceHttpGet" binding="tns:ServiceHttpGet">
          <http:address location="http://MyServer/Connects/CustomerQuery.asmx" />
        </wsdl:port>
        <wsdl:port name="ServiceHttpPost" binding="tns:ServiceHttpPost">
          <http:address location="http://MyServer/Connects/CustomerQuery.asmx" />
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>

    Thursday, April 27, 2017 11:02 PM
  • As below link, you need to remove the binding and port.

    #WebService Client Exception: Cannot Import wsdl:binding

    http://stackoverflow.com/questions/4295224/webservice-client-exception-cannot-import-wsdlbinding


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Brandon.Ho Friday, April 28, 2017 9:39 PM
    Friday, April 28, 2017 1:25 AM
  • Hi Brandon.Ho,

    Thanks for posting here.

    This forum is for questions and discussions about the Visual Studio IDE, as your issue is more related to the Windows Communication Foundation, Serialization, and Networking. And you have already post the same issue on that forum, so we will merge this post.

    Thanks for your understanding and cooperation.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, April 28, 2017 6:02 AM
  • I had to use svcutil.exe to extract the wsdl contents then import the service.cs file and output.config file into IDE to make it works locally.  I also remove the duplicate binding of Soap.  Thanks for the advise.

    Brandon.

    • Marked as answer by Brandon.Ho Monday, May 1, 2017 5:01 PM
    Friday, April 28, 2017 9:41 PM