1
Vote

Array is used as a base for complex type restriction.

description

Getting the error below when i try to import a valid wsdl (imports ok as a webreferece in visual studio)
 
Error 8 System.InvalidOperationException: Cannot import invalid schemas. Compilation on the XmlSchemaSet failed. ---> System.Xml.Schema.XmlSchemaException: Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is used as a base for complex type restriction.
at Microsoft.Practices.ServiceFactory.Description.XmlSchemaTypeGenerator.OnSchemasValidation(Object sender, ValidationEventArgs e)
at System.Xml.Schema.BaseProcessor.SendValidationEvent(XmlSchemaException e, XmlSeverityType severity)
at System.Xml.Schema.Compiler.CompileComplexContentRestriction(XmlSchemaComplexType complexType, XmlSchemaComplexContent complexContent, XmlSchemaComplexContentRestriction complexRestriction)
at System.Xml.Schema.Compiler.CompileComplexType(XmlSchemaComplexType complexType)
at System.Xml.Schema.Compiler.Compile()
at System.Xml.Schema.Compiler.Execute(XmlSchemaSet schemaSet, SchemaInfo schemaCompiledInfo)
at System.Xml.Schema.XmlSchemaSet.Compile()
at System.Runtime.Serialization.SchemaImporter.CompileSchemaSet(XmlSchemaSet schemaSet)
at System.Runtime.Serialization.SchemaImporter.Import()
--- End of inner exception stack trace ---
at Microsoft.Practices.ServiceFactory.Description.XmlSchemaTypeGenerator.GenerateTypesWithDataContractImporter(XmlSchemaSet schemas)
at Microsoft.Practices.ServiceFactory.Description.XmlSchemaTypeGenerator.GenerateCodeCompileUnit(String schemaSource)
at Microsoft.Practices.ServiceFactory.Validation.XsdElementValidator.DoValidate(String objectToValidate, Object currentTarget, String key, ValidationResults validationResults)
at Microsoft.Practices.EnterpriseLibrary.Validation.Validator`1.DoValidate(Object objectToValidate, Object currentTarget, String key, ValidationResults validationResults)
at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.AndCompositeValidator.DoValidate(Object objectToValidate, Object currentTarget, String key, ValidationResults validationResults)
at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.ValueAccessValidator.DoValidate(Object objectToValidate, Object currentTarget, String key, ValidationResults validationResults)
at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.AndCompositeValidator.DoValidate(Object objectToValidate, Object currentTarget, String key, ValidationResults validationResults)
at Microsoft.Practices.EnterpriseLibrary.Validation.Validators.ValidatorWrapper.DoValidate(Object objectToValidate, Object currentTarget, String key, ValidationResults validationResults)
at Microsoft.Practices.EnterpriseLibrary.Validation.Validator.Validate(Object target)
at Microsoft.Practices.Modeling.CodeGeneration.ValidationEngine.Validate(ValidationElementState state, ValidationContext context, ModelElement currentElement, String ruleSet) c:\test\Services1\Services1\scm.servicecontract 0 1 Services1

comments

hernandelahitte wrote May 9, 2010 at 11:41 PM

Can you upload the wsdl that is failing so we can repro this issue?
Thanks!

wrote Feb 13, 2013 at 7:49 PM