Problem with understanding WSDL structure. RRS feed

  • Question

  • Hello. Im trying to create client application for social web service which provide its own WSDL document.

    I try to create proxy for this document with svcutil like this

    svcutil /namespace:*,TestReference

    Its generates ApiSoap.cs with a part of types presented in this file.

    For example, this file has description for type "ErrorDetails" - this type returns in server fault answer like this 

          <faultstring>Authentication failed</faultstring>
          <detail xsi:type="ns1:ErrorDetails">
            <name>Authentication failed</name>
            <description>Login failed</description>

    But the type "ErrorDetails" is not generated by svcutil. I see nothing.

    For example, file contains enum "ProfilePartsEnum", which is a part of complex type "GetFilesInfoFromHouseProfile" in member "profile_part_id". But in generated file i see only type "GetFilesInfoFromHouseProfile" and type of member "profile_part_id" is int! Why not ProfilePartsEnum and why does svcutil skip this and a lot of similar types until generation?

    Sorry of my bad english)

    • Edited by Sellec Tuesday, March 31, 2015 2:25 PM
    Tuesday, March 31, 2015 2:24 PM


  • Hi,

    Generally speaking, you can use WCF to export WSDL documents from a ServiceDescription instance for your service. WSDL documents are automatically generated for your service when you publish metadata endpoints.

    You can also import ServiceEndpoint instances, ContractDescription instances, and Binding instances from WSDL documents using the WsdlImporter type.

    The WSDL documents, exported by WCF, import any XML Schema definitions used from external XML Schema documents. A separate XML Schema document is exported for each target namespace the data types use in the service.

    And Svcutil.exe generates the client based on the Web Services Description Language (WSDL) or policy file received from the service.

    For more information about ServiceModel Metadata Utility Tool (Svcutil.exe):

    Besides, if there is any misunderstand, please feel free to let me know and you could describe the issue in detail.


    Thursday, April 2, 2015 2:52 AM