When trying to create a web service proxy (WCF) using SVCUTIL.EXE
(on command line or via Visual Studio) I get the below nonsensical error message.
Note: There is nothing wrong with the service as it works on another machine just fine. It's a new install of Windows and the service is on my local box. Generating the same proxy on my machine using a URL on a different machine works fine.
What's going on?!
Microsoft (R) Service Model Metadata Tool
[Microsoft (R) Windows (R) Communication Foundation, Version 4.0.30319.1]
Copyright (c) Microsoft Corporation. All rights reserved.
Attempting to download metadata from 'https://ws1.example.com/ShoppingCartWS/WCF/ShoppingCartWCF.svc?wsdl' using WS-Metadata Exchan
Error: Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageCont
Error: Schema with target namespace '' could not be found.
XPath to Error Source: //wsdl:definitions[@targetNamespace='']/wsdl:portType[@name='IShoppingCart']
Error: 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='']/wsdl:portType[@name='IShoppingCart']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='WSHttpBinding_IShoppingCart']
.....
Error: 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='']/wsdl:portType[@name='IShoppingCart']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:binding[@name='BasicHttpBinding_IShoppingCart1']
Error: 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='BasicHttpBinding_IShoppingCart1']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/']/wsdl:service[@name='ShoppingCartWCF']/wsdl:port[@name='BasicHttpBinding_IShoppingCart1']
Generating files...
Warning: No code was generated.
If you were trying to generate a client, this could be because the metadata documents did not contain any valid contracts or services
or because all contracts/services were discovered to exist in /reference assemblies. Verify that you passed all the metadata documents to the tool.
Warning: If you would like to generate data contracts from schemas make sure to use the /dataContractOnly option.