Trying to generate a web client using a provided wsdl. (disco.exe/wsdl.exe) RRS feed

  • Question

  • I am currently using Visual Studio 2008 to create a web site.   I am developing a web client that will connect to an external web service.   The external agency is going to provide me a WSDL so I wanted to emulate this as much as possible.   I created a test service to emulate the external web service.   I have successfully connected to the web service using both svcutil.exe tool and creating a service reference.   However I want to do this using a wsdl alone.   I am having issues doing this.   Here is what I did to create the wsdl and then use the wsdl to generate C# code.  

    1.  disco.exe http://localhost:4607/MyTestService/service.svc  //this generated a wsdl that looks correct to me.  This generated MyTestService.wsdl
    2.  I then used that wsdl to generate a C# class from the wsdl:   wsdl.exe /l:cs MyTestService.wsdl

    When I ran this I recived this:

    C:\Temp\test>wsdl /l:cs /n:MMSOC.Test.DataServices File:///C://Temp/test/MyTestService.wsdl

    Microsoft (R) Web Services Description Language Utility
    [Microsoft (R) .NET Framework, Version 2.0.50727.1432]
    Copyright (C) Microsoft Corporation. All rights reserved.
    Warning: This web reference does not conform to WS-I Basic Profile v1.1.
    SOAP 1.1 binding was not found: WS-I's Basic Profile 1.1 consists of implementation guidelines that recommend how a set of core Web services specifications should be used together to develop interoperable Web services. For the 1.1 Profile,those specifications are SOAP 1.1, WSDL 1.1, UDDI 2.0, XML 1.0 and XML Schema.

    For more details on the WS-I Basic Profile v1.1, see the specification
    at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.
    Warning: one or more optional WSDL extension elements were ignored.
    Warnings were encountered. Review generated source comments for more details.

    Writing file 'C:\Temp\test\MyTestService.cs'.


    This generated a c# class called MyTestService.cs which I placed in my Client Project.  Every thing appears to work but once I run in debug mode when a public method in the service is accessed the client times out.   I have done this not using a wsdl and it works fine so I think it has something to do with the non-conformance of the WSI standards however I did not generate the wsdl myself but used microsofts disco.exe to generate it.  Any help or advice would be greatly appreciated.


    Mike M.

    Tuesday, September 29, 2009 11:44 PM


  • Hi Mike,

    If you want to use ASMX client to invoke WCF Service operations, you need to use basicHttpBinding for one endpoint for ASMX client application. BasicHttpBinding provides HTTP communications using SOAP 1.1, which is compliant with WS-I BasicProfile 1.1. Please refer to the following MSDN document:
    Best regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Proposed as answer by Mr . Khoi Nguyen Monday, October 5, 2009 9:26 AM
    • Marked as answer by Riquel_Dong Tuesday, October 6, 2009 6:41 AM
    Monday, October 5, 2009 9:01 AM

All replies