Bug 2531 - WSDL throws "Key duplication" when same element name has different types
Summary: WSDL throws "Key duplication" when same element name has different types
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web.Services ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2011-12-15 11:28 UTC by valeriy.pikulskiy
Modified: 2011-12-16 03:45 UTC (History)
1 user (show)

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


Attachments
Simple WSDL that fails (2.11 KB, application/xml)
2011-12-15 11:28 UTC, valeriy.pikulskiy
Details


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 2531 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 valeriy.pikulskiy 2011-12-15 11:28:18 UTC
Created attachment 1050 [details]
Simple WSDL that fails

Mono wsdl tool throws an exception while parsing WSDL in case an element with same name is found in another complexType. Exception is thrown if 1) elements with the same name have different types, and 2) element is not the first in the sequence.

Microsoft wsdl.exe parses wsdl without any errors. Version:
Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.3038]

Reproducible: Always
Steps to Reproduce:
Download attached ping.wsdl file
Execute "wsdl ping.wsdl"
Actual Results:
Web Services Description Language Utility
Mono Framework v2.0.50727.1433
Error: Key duplication when adding: code
Stack:
   at System.Collections.Hashtable.PutImpl (System.Object key, System.Object value, Boolean overwrite) [0x00000] in <filename unknown>:0 
  at System.Collections.Hashtable.Add (System.Object key, System.Object value) [0x00000] in <filename unknown>:0 
  at System.Xml.Serialization.CodeIdentifiers.Add (System.String identifier, System.Object value) [0x00000] in <filename unknown>:0 
  at System.Web.Services.Description.ProtocolImporter.AddAsyncMembers (System.String messageName, System.CodeDom.CodeMemberMethod method) [0x00000] in <filename unknown>:0 
  at System.Web.Services.Description.ProtocolImporter.ImportPortBinding (Boolean multipleBindings) [0x00000] in <filename unknown>:0 
  at System.Web.Services.Description.ProtocolImporter.Import (System.Web.Services.Description.ServiceDescriptionImporter descriptionImporter, System.CodeDom.CodeNamespace codeNamespace, System.Collections.ArrayList importInfo) [0x00000] in <filename unknown>:0 
  at System.Web.Services.Description.ServiceDescriptionImporter.Import (System.CodeDom.CodeNamespace codeNamespace, System.CodeDom.CodeCompileUnit codeCompileUnit) [0x00000] in <filename unknown>:0 
  at System.Web.Services.Description.ServiceDescriptionImporter.GenerateWebReferences (System.Web.Services.Description.WebReferenceCollection webReferences, System.CodeDom.Compiler.CodeDomProvider codeGenerator, System.CodeDom.CodeCompileUnit codeCompileUnit, System.Web.Services.Description.WebReferenceOptions options) [0x00000] in <filename unknown>:0 
  at Mono.WebServices.Driver.GenerateCode (System.Web.Services.Description.WebReferenceCollection references, System.CodeDom.CodeCompileUnit codeUnit) [0x00000] in <filename unknown>:0 
  at Mono.WebServices.Driver.Run (System.String[] args) [0x00000] in <filename unknown>:0 


Seems like it's same bug as described in:
https://bugzilla.novell.com/show_bug.cgi?id=488550
Comment 1 Zoltan Varga 2011-12-16 03:43:32 UTC
-> web services.
Comment 2 valeriy.pikulskiy 2011-12-16 03:45:59 UTC
wsdl tool fails only for WSDL with "document literal" binding style, for RPC encoding it works as expected.