0

I am using svcutil to generate service references from my wcf endpoints. All was working fine up to recently, but suddenly I started getting the following error against all my endpoints.

Attempting to download metadata from 'http://localhost.myservice.com/MyEndpoint.svc' using WS-Metadata Exchange or DISCO. Error: Cannot import wsdl:binding Detail: The given key was not present in the dictionary. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/' ]/wsdl:binding[@name='wsMyEndpoint']

Error: Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is depend ent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/' ]/wsdl:binding[@name='wsMyEndpoint'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://myservice.com/serv ices/']/wsdl:service[@name='MyEndpoint']/wsdl:port[@name='wsMyEndpoint']

Error: Cannot import wsdl:binding Detail: The given key was not present in the dictionary. XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/' ]/wsdl:binding[@name='netNamedMyEndpoint']

Error: Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is depend ent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/' ]/wsdl:binding[@name='netNamedMyEndpoint'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://myservice.com/serv ices/']/wsdl:service[@name='MyEndpoint']/wsdl:port[@name='netNamedMyEndpoint']

Generating files... Warning: No code was generated. If you were trying to generate a client, this could be because the metadata docu ments did not contain any valid contracts or services or because all contracts/services were discovered to exist in /reference assembl ies. Verify that you passed all the metadata documents to the tool.

I generate the service reference by calling svcutil in a batch file that generates the service reference.

I expect it might be a change another developer made but thats just speculation. Anyone know how I might investigate as to what is the issue here or even point in me the correct direction re solution.

amateur
  • 43,371
  • 65
  • 192
  • 320

1 Answers1

0

In order to automatically generate the clients from your endpoints, the service needs to be successfully built and deployed with no other errors. Further, IIS needs to be ready to accept messages from the service.

Some debugging to try out: once deployed, can you generate the proxy/service reference if you run the batch file by hand? Do things work if you point VS at the endpoint and create a service reference in a 'throw away' project?

If not, please post the configuration for the element in the related service behavior. I suspect the answer might be there.

Scott Seely
  • 757
  • 4
  • 6