tags:

views:

191

answers:

1

Hello,

I have to integrate several existing webservices in my .net application. But unfortunately, invoking the svcutil tool results in an error with the message:

Microsoft (R) Service Model Metadata Tool [Microsoft (R) Windows (R) Communication Foundation, Version 3.0.4506.2152] Copyright (c) Microsoft Corporation. All rights reserved.

Error: Cannot import wsdl:binding Detail: Cannot find definition for http://grupobancolombia.com/intf/Clientes/GestionClientes/EnviarRespuestaVerificarIdentidadCliente/V1.0:EnviarRespuestaVerifi carIdentidadCliente. Service Description with namespace http://grupobancolombia.com/intf/Clientes/GestionClientes/EnviarRespuestaVerificarIdentidadCliente/V1.0 is missing. Parameter name: name XPath to Error Source: //wsdl:definitions[@targetNamespace='http://grupobancolombia.com/intf/Clientes/GestionClientes/EnviarRespuestaVerificarIdentidadCliente/E nlace/V1.0']/wsdl:binding[@name='EnviarRespuestaVerificarIdentidadCliente_HttpBinding']

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://grupobancolombia.com/intf/Clientes/GestionClientes/EnviarRespuestaVerificarIdentidadCliente/E nlace/V1.0']/wsdl:binding[@name='EnviarRespuestaVerificarIdentidadCliente_HttpBinding'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://grupobancolombia.com/intf/Clientes/GestionClientes/EnviarRespuestaVerificarIdentidadCliente/E nlace/V1.0']/wsdl:service[@name='EnviarRespuestaVerificarIdentidadCliente']/wsdl:port[@name='EnviarRespuestaVerificarIdentidadCliente_HttpPort']

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. Has anyone an idea what causes this problem?

+1  A: 

I'm seeing the same issue. I have a set of 30-odd wsdl files in a folder and am trying to create C# client classes for them all.

If I do the following

svcutil /noconfig /namespace:*,My.Required.Namespace *.wsdl

I see a lot of the error you mention (Cannot import wsdl:binding).

However, picking one file at a time

svcutil /noconfig /namespace:*,My.Required.Namespace a.wsdl

Frequently works; sometimes I have to include another file, e.g.

svcutil /noconfig /namespace:*,My.Required.Namespace b.wsdl c.wsdl

This is necessary when attempting to run svcutil on b.wsdl fails due to a dependency on c.wsdl.

Bottom line: I am not sure why I can't create contracts for all of these service definitions in one go, but it doesn't seem possible. I still have a big problem with shared types across the files; this means I effectively have to edit either third-party wsdl or the automatically generated code in order to get things to compile and run correctly.

CJBrew