Bug 18577 - WSDL parser generates duplicate delegates and methods
Summary: WSDL parser generates duplicate delegates and methods
Status: CONFIRMED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web.Services ()
Version: 3.8.0
Hardware: Macintosh Mac OS
: High normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
: 21228 ()
Depends on:
Blocks:
 
Reported: 2014-03-25 14:05 UTC by Mark Smith
Modified: 2014-10-24 12:37 UTC (History)
7 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 18577 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:
CONFIRMED

Description Mark Smith 2014-03-25 14:05:48 UTC
Generate a .NET 2.0 Web Service proxy with Xamarin Studio (Add > Add Web Reference), against the following WSDL:
http://rxnav.nlm.nih.gov/RxNormDBService.xml

Generates 12 duplicate delegates and methods which causes the file to be uncompilable.

Repro:

1) New iOS or Android project
2) Add > Add Web Reference
3) Pick .NET 2.0 Web Service
4) Use given URL as WSDL - I tend to change the namespace too, but that's optional; it fails either way.
5) Click OK to generate reference.cs
6) Build fails due to compile errors.

See:
http://www.screencast.com/t/Z8VwKAFU0bKQ

Xamarin Studio
Version 4.2.4 (build 32)
Installation UUID: 50562e10-5ff9-448f-b0e4-17ca662d9b75
Runtime:
	Mono 3.2.6 ((no/9b58377)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 302060000

Apple Developer Tools
Xcode 5.1 (5084)
Build 5B130a

Xamarin.Mac
Xamarin.Mac: Not Installed

Xamarin.iOS
Version: 7.2.0.2 (Business Edition)
Hash: 58c3efa
Branch: 
Build date: 2014-10-03 18:02:26-0400

Xamarin.Android
Version: 4.12.1 (Business Edition)
Android SDK: /Users/mark/Android/sdk
	Supported Android versions:
		1.6   (API level 4)
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		3.2   (API level 13)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.3   (API level 18)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

Build Information
Release ID: 402040032
Git revision: a160c35dac9ab9fd32eeadaa171216316d5a5133
Build date: 2014-03-12 13:55:08-04
Xamarin addins: a779416ceabd54981ce812771a4061c942e8b872

Operating System
Mac OS X 10.9.2
Darwin Marks-MacBook-Pro.local 13.1.0 Darwin Kernel Version 13.1.0
    Thu Jan 16 19:40:37 PST 2014
    root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Comment 1 Shruti 2014-03-26 02:06:12 UTC
I am able to reproduce this issue by following the same steps mentioned above
Steps are :
1) New iOS or Android project
2) Add > Add Web Reference
3) Pick .NET 2.0 Web Service
4) Use given URL as WSDL.
5) Click OK to generate reference.cs
6) Build fails due to compile errors.

Screen Cast Info : 
http://screencast.com/t/1dW1izqg2A
https://gist.github.com/Nischalk/62f523bdd699ee7cc5dd

Environment Info:
=== Xamarin Studio ===

Version 4.2.3 (build 60)
Installation UUID: ce3f5199-e126-42fd-bc8a-6a96370af9ab
Runtime:
	Mono 3.2.6 ((no/9b58377)
	GTK+ 2.24.23 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302060000

=== Apple Developer Tools ===

Xcode 5.0 (3332.22)
Build 5A1412

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.12.1 (Business Edition)
Android SDK: /Users/mac109/Desktop/android-sdk-macosx
	Supported Android versions:
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0   (API level 14)
		4.0.3 (API level 15)
		4.1   (API level 16)
		4.2   (API level 17)
		4.4   (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin.iOS ===

Version: 7.2.0.2 (Business Edition)
Hash: 58c3efa
Branch: 
Build date: 2014-10-03 18:02:26-0400

=== Build Information ===

Release ID: 402030060
Git revision: 30c4afc300c2a39ec5300851357ce02e49dd217e
Build date: 2014-03-05 22:09:33+0000
Xamarin addins: f8a9589b57c2bfab2ccd73c880e7ad81e3ecf044

=== Operating System ===

Mac OS X 10.9.2
Darwin mac109s-Mac-mini.local 13.1.0 Darwin Kernel Version 13.1.0
    Thu Jan 16 19:40:37 PST 2014
    root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Comment 2 Mark Smith 2014-08-26 10:09:03 UTC
Any update on this? It kills the Web Service class for Xamarin University.
Comment 3 Lluis Sanchez 2014-08-27 04:04:01 UTC
This is going to be a bug in Mono.
Comment 4 Mark Smith 2014-08-27 15:41:53 UTC
Is there someone who directly influences or supports the Mono tools where we could push on this, it's a big pain point for the XamU class on web services to have to hand-edit the generated service code every time. People get the impression it's Xamarin Studio so it reflects poorly on the product.
Comment 5 Lluis Sanchez 2014-09-02 10:22:17 UTC
I verified that his is ineed a bug in mono. This particular web service has two operations with the same name, and mono's WSDL generator is not taking that into account when generating some class members.
Comment 6 Atsushi Eno 2014-09-03 12:06:20 UTC
And that is invalid WSDL: each operation should have a unique name.

Try some WSDL validator such as:
https://www.wsdl-analyzer.com/

findRxcuiById, findRxcuiByString and getProprietaryInformation are reported as error. Are they the ones that failed to generate code?
Comment 7 Lluis Sanchez 2014-10-24 12:37:19 UTC
*** Bug 21228 has been marked as a duplicate of this bug. ***