При ссылке на наш тестовый сервис WCF я получаю эту ошибку в MonoDevelop (2.4 и 2.6).
Мы выставляем System.Data.DataSet
, и это, похоже, не нравится. Это известная проблема с MonoDevelop? Есть ли обходной путь?
Я могу сослаться на тот же сервис в Studio 2008 просто отлично.
В качестве содержимого последовательности элемента допускается только локальный элемент.
контент верхнего уровня сложного типа
http://tempuri.org/:GetDataResult'. Другие частицы (последовательность,
choice, all, any, ссылка на группу) не поддерживаются.
System.Runtime.Serialization.InvalidDataContractException: Only local element is allowed as the content of the sequence of the top-level content of a complex type 'http://tempuri.org/:GetDataResult'. Other particles (sequence, choice, all, any, group ref) are not supported.
at System.Runtime.Serialization.XsdDataContractImporter.ImportComplexType (System.CodeDom.CodeTypeDeclaration td, System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.XmlSchemaComplexType type, System.Xml.XmlQualifiedName qname) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XsdDataContractImporter.DoImport (System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.XmlSchemaType type, System.Xml.XmlQualifiedName qname) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XsdDataContractImporter.Import (System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.XmlSchemaType type, System.Xml.XmlQualifiedName qname) [0x00000] in <filename unknown>:0
at System.Runtime.Serialization.XsdDataContractImporter.Import (System.Xml.Schema.XmlSchemaSet schemas, System.Xml.Schema.XmlSchemaElement element) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.CreateMessagePart (System.Xml.Schema.XmlSchemaElement elem) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.ImportPartsBySchemaElement (System.Xml.XmlQualifiedName qname, System.Collections.Generic.List`1 parts, System.String ns) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.resolveMessage (System.Web.Services.Description.Message msg, System.ServiceModel.Description.MessageBodyDescription body, System.Collections.Generic.List`1 parts) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.DoImportContract () [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.DataContractSerializerMessageContractImporter.System.ServiceModel.Description.IWsdlImportExtension.ImportContract (System.ServiceModel.Description.WsdlImporter importer, System.ServiceModel.Description.WsdlContractConversionContext context) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.WsdlImporter.ImportContract (System.Web.Services.Description.PortType wsdlPortType) [0x00000] in <filename unknown>:0
at System.ServiceModel.Description.WsdlImporter.ImportAllContracts () [0x00000] in <filename unknown>:0
at MonoDevelop.WebReferences.WCF.WebServiceDiscoveryResultWCF.CreateProxyFile (MonoDevelop.Projects.DotNetProject dotNetProject, FilePath basePath, System.String proxyNamespace, System.String referenceName) [0x0014d] in /Users/michael/Mono/md-2-5-90/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.WCF/WebServiceDiscoveryResultWCF.cs:176
at MonoDevelop.WebReferences.WebServiceDiscoveryResult.GenerateFiles (MonoDevelop.Projects.DotNetProject project, System.String namspace, System.String referenceName) [0x0008b] in /Users/michael/Mono/md-2-5-90/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences/WebServiceDiscoveryResult.cs:89
at MonoDevelop.WebReferences.Commands.WebReferenceCommandHandler.NewWebReference () [0x000b8] in /Users/michael/Mono/md-2-5-90/main/src/addins/MonoDevelop.WebReferences/MonoDevelop.WebReferences.Commands/WebReferenceCommandHandler.cs:43