Error Cannot Import Wsdl Binding
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have there was an error importing a wsdl binding Meta Discuss the workings and policies of this site About Us
Svcutil Error Cannot Import Wsdl Porttype
Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with unable to import binding from namespace wsdl us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just
Cannot Import Wsdl Port
like you, helping each other. Join them; it only takes a minute: Sign up What does this WCF error mean: “Custom tool warning: Cannot import wsdl:portType” up vote 71 down vote favorite 26 I created a WCF service library project in my solution, and have service references to this. I use the services from a class custom tool warning cannot import wsdl library, so I have references from my WPF application project in addition to the class library. Services are set up straight forward - only changed to get async service functions. Everything was working fine - until I wanted to update my service references. It failed, so I eventually rolled back and retried, but it failed even then! So - updating the service references fails without doing any changes to it. Why?! The error I get is this one: Custom tool error: Failed to generate code for the service reference 'MyServiceReference'. Please check other error and warning messages for details. The warning gives more information: Custom tool warning: Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporter Error: List of referenced types contains more than one type with data contract name 'Patient' in namespace 'http://schemas.datacontract.org/2004/07/MyApp.Model'. Need to exclude all but one of the following types. Only matching types can be valid references: "MyApp.Dashboard.MyServiceReference.Patient, Medski.Dashboard, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" (matching) "MyApp.Model.Patient, MyApp.Model, Version=1.0.0.0, C
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About
Wsdl Binding Style
Us Learn more about Stack Overflow the company Business Learn more about hiring developers
Wsdl Binding Transport Types
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack wsdl soap binding Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Error: Cannot import wsdl:port with svcutil up http://stackoverflow.com/questions/1872865/what-does-this-wcf-error-mean-custom-tool-warning-cannot-import-wsdlporttype vote 1 down vote favorite I created a small WCF service (hosted in IIS) and used Chrome to take the wsdl of it, put that in a .wsdf file and then wanted to use svcutil test.wsdl to generate the client proxy out of it but I'm getting this error: Error: Cannot import wsdl:port Detail: There was an error importing a wsdl:binding that the wsdl:port is depend http://stackoverflow.com/questions/4504301/error-cannot-import-wsdlport-with-svcutil ent on. XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://tempuri.org/' ]/wsdl:binding[@name='WSHttpBinding_IService1'] XPath to Error Source: //wsdl:definitions[@targetNamespace='http://tempuri.org/' ]/wsdl:service[@name='Service1']/wsdl:port[@name='WSHttpBinding_IService1'] Anyone else encountered this and found a solution for it? Update: as suggested by John Saunders, thanks for that, it works when I point it out directly to the url. However this is my little test case to see what svcutil can do as I expect the coming days to get a wsdl file from a 3rd party and might run into the same problem. As I took the most simplistic out of the box generated .svc I don't seem to be having include blocks. .net wcf compiler-errors svcutil.exe share|improve this question edited Aug 28 '12 at 13:21 abatishchev 57k56214353 asked Dec 21 '10 at 21:53 XIII 12k52250 3 I bet it told you exactly what problem it was having. Are you sure that's all the error output? Also, what happens when you specify the URL of the service directly to svcutil.exe? –John Saunders Dec 22 '10 at 0:58 add a comment| 1 Answer 1 active oldest votes up vote 3 down vote accepted If the wsdl has Include blocks in it - and they often do when generated by WCF - then you're
> Windows Communication Foundation, https://social.msdn.microsoft.com/Forums/vstudio/en-US/5969d6a2-a8f7-456a-85dc-a6e3296f7ffc/svcutilexe-error-cannot-import-wsdlporttype?forum=wcf Serialization, and Networking Question 0 Sign in to vote 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: Error: Cannot import wsdl:portTypeDetail: An exception was cannot import thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporterError: Schema with target namespace 'http://www.wsi4j.at/rci/SecurityTypes/3.0.0' could not be found.XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.racon-linz.at/delfin/KreditantragService/1.0']/wsdl:portType[@name='KreditantragServicePort'] Error: Cannot import wsdl:bindingDetail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://www.racon-linz.at/delfin/KreditantragService/1.0']/wsdl:portType[@name='KreditantragServicePort']XPath to cannot import wsdl Error Source: //wsdl:definitions[@targetNamespace='http://www.racon-linz.at/delfin/KreditantragService/1.0']/wsdl:binding[@name='KreditantragServiceBinding'] Error: Cannot import wsdl:portDetail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://www.racon-linz.at/delfin/KreditantragService/1.0']/wsdl:binding[@name='KreditantragServiceBinding']XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.racon-linz.at/delfin/KreditantragService/1.0']/wsdl:service[@name='KreditantragService']/wsdl:port[@name='KreditantragServicePort'] 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 servicesor 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 touse the /dataContractOnly option. It seems that the schema import can not be resolved. According to third party tools, the wsdl matches the WSI-Basic Profile. The xsd-import is done as follows: