Page view counter

Add Service Reference creates empty app.config

Last post 11-18-2008 5:20 AM by johnwsaunders3. 2 replies.

Sort Posts:

  • Add Service Reference creates empty app.config

    11-14-2008, 2:23 PM
    • Loading...
    • nmahesh567
    • Joined on 04-27-2004, 10:10 AM
    • Posts 206
    • Points 402

     I develped simple WCF service. I ran the service in VS.NET 2008 itself under WCF Test Client. This WCF Test Client shows correct config file and I can execute method in that tool. Also I can access WSDL by going through IE (http://localhost:8731/Design_Time_Addresses/CatalogServiceLibraryTest/CatalogDataProviderService/?wsdl).

     But when I try to add Service Reference in VS.NET, it creates empty app.config file and not all types including service proxy classs are generated in proxy.Also if I try to use generated proxy as it is, it gives following warnings.

     Warning    1    Custom tool warning: Cannot import wsdl:portType
    Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter
    Error: ISerializable type with data contract name 'CatalogServiceException' in namespace 'http://schemas.datacontract.org/2004/07/XXX.Technology.Services.Catalog.Faults' cannot be imported. The data contract namespace cannot be customized for ISerializable types and the generated namespace 'CatalogServiceClient.ServiceReference1' does not match the required CLR namespace 'XXX.Technology.Services.Catalog.Faults'. Check if the required namespace has been mapped to a different data contract namespace and consider mapping it explicitly using the namespaces collection.
    XPath to Error Source: //wsdl:definitions[@targetNamespace='XXX.com/Technology/Services/CatalogService/ServiceContracts']/wsdl:portType[@name='CatalogDataProviderService']    <path>\Service References\ServiceReference1\Reference.svcmap    1    1    CatalogServiceClient


    Warning    2    Custom tool warning: Cannot import wsdl:binding
    Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
    XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='www.XXX.com/Technology/Services/CatalogService/ServiceContracts']/wsdl:portType[@name='CatalogDataProviderService']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='WSHttpBinding_CatalogDataProviderService']    <path>\CatalogServiceTest\CatalogServiceClient\Service References\ServiceReference1\Reference.svcmap    1    1    CatalogServiceClient


    Warning    3    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://tempuri.org/']/wsdl:binding[@name='WSHttpBinding_CatalogDataProviderService']
    XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='CatalogDataProviderService']/wsdl:port[@name='WSHttpBinding_CatalogDataProviderService']    <path>\Service References\ServiceReference1\Reference.svcmap    1    1    CatalogServiceClient
     

  • Re: Add Service Reference creates empty app.config

    11-14-2008, 2:54 PM
    • Loading...
    • nmahesh567
    • Joined on 04-27-2004, 10:10 AM
    • Posts 206
    • Points 402

     Also, svcutil generates config file and proxy.

  • Re: Add Service Reference creates empty app.config

    11-18-2008, 5:20 AM

    I don't understand. Do you have a question? The exception message is telling you what is wrong.

    John Saunders | MVP – Connected System Developer
Page 1 of 1 (3 items)