ServiceStack/ServiceStack — Issue #98: Unable to use WCF test client against ServiceStack 3.4.3 WSDL
Author: enriquein
Created: 2012-02-14 16:22:54+00:00
State: open

Hi, I'm currently using ServiceStack 3.4.3 at work with the hopes to enlighten my boss to switch from WCF to this. However, even though rest services are working beautifully, I'm having a hard time making the WCF test client work with both soap 1.1 and 1.2 WSDL. The error I'm getting while adding the services is:

Error: Cannot import wsdl:portTypeDetail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.DataContractSerializerMessageContractImporterError: Schema with target namespace 'http://schemas.servicestack.net/types' could not be found.XPath to Error Source: //wsdl:definitions[@targetNamespace='http://schemas.servicestack.net/types']/wsdl:portType[@name='ISyncReply']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://schemas.servicestack.net/types']/wsdl:portType[@name='ISyncReply']XPath to Error Source: //wsdl:definitions[@targetNamespace='http://schemas.servicestack.net/types']/wsdl:binding[@name='BasicHttpBinding_ISyncReply']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://schemas.servicestack.net/types']/wsdl:binding[@name='BasicHttpBinding_ISyncReply']XPath to Error Source: //wsdl:definitions[@targetNamespace='http://schemas.servicestack.net/types']/wsdl:service[@name='SyncReply']/wsdl:port[@name='BasicHttpBinding_ISyncReply']Error: Cannot import wsdl:portTypeDetail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporterError: Schema with target namespace 'http://schemas.servicestack.net/types' could not be found.XPath to Error Source: //wsdl:definitions[@targetNamespace='http://schemas.servicestack.net/types']/wsdl:portType[@name='IOneWay']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://schemas.servicestack.net/types']/wsdl:portType[@name='IOneWay']XPath to Error Source: //wsdl:definitions[@targetNamespace='http://schemas.servicestack.net/types']/wsdl:binding[@name='BasicHttpBinding_IOneWay']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://schemas.servicestack.net/types']/wsdl:binding[@name='BasicHttpBinding_IOneWay']XPath to Error Source: //wsdl:definitions[@targetNamespace='http://schemas.servicestack.net/types']/wsdl:service[@name='AsyncOneWay']/wsdl:port[@name='BasicHttpBinding_IOneWay']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 to use the /dataContractOnly option.

I saw an old issue that had a similar if not the same issue as me, and I tried following the advice at https://groups.google.com/forum/#!msg/servicestack/xiDhJGQMz8w/3wLF8xWXEk0J . My DTO's are not nested within classes, and adding the [assembly: ContractNamespace()] attribute to my Assembly.cs file caused build errors that I was unable to fix (VS complained that it couldn't find the attribute, even though I added what I think are the correct using directives).

Any ideas, guidance, recommendations?