[Mono-bugs] [Bug 691083] New: svcutil fails with InvalidDataContractException on valid data contract

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun May 1 02:40:36 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=691083

https://bugzilla.novell.com/show_bug.cgi?id=691083#c0


           Summary: svcutil fails with InvalidDataContractException on
                    valid data contract
    Classification: Mono
           Product: Mono: Tools
           Version: 2.10.x
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: tools
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: cinyc.s at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=427450)
 --> (http://bugzilla.novell.com/attachment.cgi?id=427450)
Output of Microsoft.Net svcutil on the same URL

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.16
(KHTML, like Gecko) Ubuntu/10.10 Chromium/10.0.648.205 Chrome/10.0.648.205
Safari/534.16

Using Fedora 14, with the RHEL5 Mono-addon packages, svcutil throws an
InvalidDataContractException when attempting to import metadata from
http://dev.wikipedia-lab.org/WikipediaOntologyAPIv3/Service.asmx?WSDL . 
Version of Mono is 2.10.2.

On an Ubuntu 10.04 machine, running Mono 2.6.7, svcutil also fails, but with an
InvalidOperationException.  Both exceptions reference the same operation in the
WSDL.

Reproducible: Always

Steps to Reproduce:
1. Type: "svcutil
http://dev.wikipedia-lab.org/WikipediaOntologyAPIv3/Service.asmx?WSDL"
Actual Results:  
Full output is:


Mono service contract conversion tool  0.1.0.0 - Copyright (C) 2006 Novell,
Inc.

Attempting to download metadata from
'http://dev.wikipedia-lab.org/WikipediaOntologyAPIv3/Service.asmx?WSDL' using
DISCO..
Disco found documents at the following URLs:
- WSDL document at 
http://dev.wikipedia-lab.org/WikipediaOntologyAPIv3/Service.asmx?WSDL

Unhandled Exception: 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/:GetCandidatesFromKeywordResult'.
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.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 


Expected Results:  
svcutil should generate an appropriate proxy & configuration file from the
WSDL.

The Microsoft.Net svcutil imports this correctly.

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list