Bug 2410 - WCF Proxy generation error using svcutil
Summary: WCF Proxy generation error using svcutil
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web.Services ()
Version: master
Hardware: PC Mac OS
: High major
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
: 2046 ()
Depends on:
Blocks:
 
Reported: 2011-12-07 23:04 UTC by James Clancey
Modified: 2012-04-24 12:39 UTC (History)
6 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 2410 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description James Clancey 2011-12-07 23:04:46 UTC
Using the web service on https://github.com/Clancey/WcfTestSuite an error is generated.


Unhandled Exception: System.InvalidOperationException: schema type 'http://schemas.datacontract.org/2004/07/WcfWebApp.Models:ArrayOfUser' has not been imported yet. Import it first.
  at System.Runtime.Serialization.XsdDataContractImporter.GetTypeInfo (System.Xml.XmlQualifiedName typeName, Boolean throwError) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.XsdDataContractImporter.GetCodeTypeReferenceInternal (System.Xml.XmlQualifiedName typeName, Boolean throwError) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.XsdDataContractImporter.GetCodeTypeReference (System.Xml.XmlQualifiedName typeName) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.XsdDataContractImporter.GetCodeTypeReference (System.Xml.XmlQualifiedName typeName, System.Xml.Schema.XmlSchemaElement element) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.DataContractMessageContractImporterInternal.CreateMessagePart (System.Xml.Schema.XmlSchemaElement elem, System.Web.Services.Description.Message msg, System.Web.Services.Description.MessagePart msgPart) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.DataContractMessageContractImporterInternal.ImportPartsBySchemaElement (System.Xml.XmlQualifiedName qname, System.Collections.Generic.List`1 parts, System.Web.Services.Description.Message msg, System.Web.Services.Description.MessagePart part) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.MessageContractImporterInternal.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.MessageContractImporterInternal.DoImportContract () [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.MessageContractImporterInternal.ImportContract (System.ServiceModel.Description.WsdlImporter importer, System.ServiceModel.Description.WsdlContractConversionContext context) [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.ImportEndpoint (System.Web.Services.Description.Port wsdlPort) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.WsdlImporter.ImportAllEndpoints () [0x00000] in <filename unknown>:0 
  at Mono.ServiceContractTool.Driver.Run (System.String[] args) [0x00000] in <filename unknown>:0 
  at Mono.ServiceContractTool.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.InvalidOperationException: schema type 'http://schemas.datacontract.org/2004/07/WcfWebApp.Models:ArrayOfUser' has not been imported yet. Import it first.
  at System.Runtime.Serialization.XsdDataContractImporter.GetTypeInfo (System.Xml.XmlQualifiedName typeName, Boolean throwError) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.XsdDataContractImporter.GetCodeTypeReferenceInternal (System.Xml.XmlQualifiedName typeName, Boolean throwError) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.XsdDataContractImporter.GetCodeTypeReference (System.Xml.XmlQualifiedName typeName) [0x00000] in <filename unknown>:0 
  at System.Runtime.Serialization.XsdDataContractImporter.GetCodeTypeReference (System.Xml.XmlQualifiedName typeName, System.Xml.Schema.XmlSchemaElement element) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.DataContractMessageContractImporterInternal.CreateMessagePart (System.Xml.Schema.XmlSchemaElement elem, System.Web.Services.Description.Message msg, System.Web.Services.Description.MessagePart msgPart) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.DataContractMessageContractImporterInternal.ImportPartsBySchemaElement (System.Xml.XmlQualifiedName qname, System.Collections.Generic.List`1 parts, System.Web.Services.Description.Message msg, System.Web.Services.Description.MessagePart part) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.MessageContractImporterInternal.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.MessageContractImporterInternal.DoImportContract () [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.MessageContractImporterInternal.ImportContract (System.ServiceModel.Description.WsdlImporter importer, System.ServiceModel.Description.WsdlContractConversionContext context) [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.ImportEndpoint (System.Web.Services.Description.Port wsdlPort) [0x00000] in <filename unknown>:0 
  at System.ServiceModel.Description.WsdlImporter.ImportAllEndpoints () [0x00000] in <filename unknown>:0 
  at Mono.ServiceContractTool.Driver.Run (System.String[] args) [0x00000] in <filename unknown>:0 
  at Mono.ServiceContractTool.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0
Comment 1 Miguel de Icaza [MSFT] 2011-12-11 21:35:15 UTC
James,

Does this happen with svcutil os slsvcutil?   

Atsushi,

Would you mind evaluating this bug and giving us an idea of how hard would it be to fix, and where we should start looking at this?

My understanding is that this WSDL is a test-suite that we can use to ensure that our WCF stub generation is complete.
Comment 2 Atsushi Eno 2011-12-12 12:49:32 UTC
It is exactly marked as MonoTODO in mcs/class/System.Runtime.Serialization/System.Runtime.Serialization/XsdDataContractImporter.cs, so it is pretty much unimplemented.

The source is only 1000 lines of code and it covers most of the importer functionality, so I guess it's not very hard for anyone to read only this file and guess where needs fix.

XsdDataContractExporter (which is used to convert CLR types into WSDL) seems to support array, so it might be of some help (grep "ArrayOf").
Comment 3 Miguel de Icaza [MSFT] 2012-04-24 12:33:32 UTC
*** Bug 2046 has been marked as a duplicate of this bug. ***