在MonoDevelop中引用暴露System.Data.DataSet的WCF时出现异常

时间:2011-08-11 13:30:09

标签: monodevelop

当引用我们的测试WCF服务时,我在MonoDevelop(2.4和2.6)中收到此错误。 我们正在揭露System.Data.DataSet,似乎不喜欢这样。这是MonoDevelop的一个已知问题吗?有解决方法吗? 我可以在Studio 2008中引用相同的服务。

  

只允许本地元素作为序列的内容   复杂类型的顶级内容   'http://tempuri.org/:GetDataResult'。其他粒子(序列,   选择,all,any,group ref)不受支持。

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 

0 个答案:

没有答案