User talk:Sean Colombo/SOAP .NET Issues
From LyricWiki
SOAP WS client in .NET?
Hi,
dear Sean, would you be so kind to take a look at help request in my talk? I believe to teknomunk, stating you are just the one able to help me.
Thanks in advance,
-- talk to Senvaikis 14:35, 5 October 2007 (EDT)
PostSong is still unavailable for .NET developers
Hi, Sean
hate to be pesky, but have no other choice - i'm constrained to state that SOAP WS is still unavailable for .NET developers. You are absolutely right saying that method postSong must take parameter onAlbums as AlbumResultArray, not as array of string. That's exactly what I was repeatedly trying to say! .Net developers just have no possibility to do that! Take one more look at postSong declaration in WS class I provided earlier, and you'll see that parameter onAlbums is declared there as array of strings; moreover - there are even no such declared public type of AlbumResultArray in WS! So, I'm still sure that problem lays in wsdl declarations, wich somehow are good for others, but not for .NET. That's why, I suppose, my searches all over Inet looking for someone, who was able to use postSong in .NET, were unsuccessful.
I know you have a lot of jobs in your ToDo list, but please, be so kind - take a look at this once more, and I promise - you'll get a thousands of new lyrics from army of .NET developers :)
thanks in advance, --Senvaikis 07:09, 29 January 2008 (EST)
- Even if you aren't going to do anything with this, it would be more polite at least let me know about that.
- Sorry, - Senvaikis
- I should have some time later today to try to mess with it. Sorry for the massive delays. -Sean Colombo (talk|contribs) 13:06, 9 February 2008 (EST)
- Hi... I looked into it again, and started to remember what's going on. I think I worded it better in my last response on this thread, but it appears that our WSDL file is correctly declaring it as an AlbumResultArray, not as an array of strings - somehow this is getting broken in the transition from our WSDL file to .NET's interpreted declaration. No fun at all! :P Here is the code from the actual WSDL:
<message name="postSongRequest"> <part name="overwriteIfExists" type="xsd:boolean"/> <part name="artist" type="xsd:string"/> <part name="song" type="xsd:string"/> <part name="lyrics" type="xsd:string"/> <part name="onAlbums" type="tns:AlbumResultArray"/> </message>
... so we're going to have to trick .NET into reading that correctly. I don't have .NET, and I don't yet know of any tricks for doing this. If you could download a copy of the WSDL file and mess with it until you can get it in a state where .NET actually understands it correctly, pleeeease let me know. This is a really strange/frustrating bug and I'm sorry from my end that my responses have been so spread out.
- If you can figure out a way to trick .NET into doing the right thing, I'll merge it into the SOAP. We may need a special parameter for the changed version of the WSDL, but hopefully not.
- In the mean time, I'm going to do a bit of google-searching to see if any other .NET developers have run into similar things and found a workaround.
- Thanks,
- -Sean Colombo (talk|contribs) 17:21, 9 February 2008 (EST)
- Thanks for response, Sean. Now, when I know you do want to solve this problem, I'm sure we'll do that. I showed your wsdl file to one my friend Romualdas, he is MVP (Microsoft Most Valuable Proffesional) and knows well all requirements every WS must conform to (Thx, Romualdas). That's what he said: "..this wsdl isn't BasicProfile1.1 compliant. If you want your WS to be compatible to all - make it WS-I (Web Services Interoperability) complient". I can confirm, that loading your wsdl into Visual Studio 2005 project, wsdl.exe generates warnings about some incompatibilities. For example, it treats "SOAP-ENC:array" as "undefined complextype", and MS guru Romualdas confirms that "SOAP-ENC:array" is deprecated as per WS-I.
- According to Romualdas, declaration of ArrayOfAlbumResult should look something like that to conform WS-I:
<s: complexType name="ArrayOfAlbumResult"> <s: sequence> <s:element minOccurs="0" maxOccurs="unbounded" name="AlbumResult" nillable="true" type="tns:AlbumResult" /> </s: sequence> </s: complexType>
- I'm currently trying to upgrade to the newest version of the nuSOAP library, hoping that will fix it. -Sean Colombo (talk|contribs) 13:36, 16 February 2008 (EST)
- I have another version up which runs the new library... it doesn't change the code in the way mentioned above (to use
, etc.), but it has a year or two more of upgrades in it. Hopefully one of them made it work in .NET. If this doesn't work then I'll probably have to just make a hack in there to fix it. - Here is the URL for the version with the newer version of the nuSOAP library in it:
- http://lyricwiki.org/server2.php
- Let me know if that does any better for you.
- Thanks,
- -Sean Colombo (talk|contribs) 13:42, 16 February 2008 (EST)
- Unfortunatelly...
- Adding VS errors/warnings dump after trying to add webrefference to ws you provided:
- I have another version up which runs the new library... it doesn't change the code in the way mentioned above (to use
Error 2 Custom tool error: Unable to import WebService/Schema. Unable to import binding 'LyricWikiBinding' from namespace 'urn:LyricWiki'. Unable to import operation 'searchArtists'. The datatype 'http://schemas.xmlsoap.org/wsdl/:string' is missing.
Message 3 Could not find schema information for the element 'DiscoveryClientResultsFile'. ...Reference.map 2 2 lw
Message 4 Could not find schema information for the element 'Results'. ....Reference.map 3 4 lw
Message 5 Could not find schema information for the element 'DiscoveryClientResult'. ...Reference.map 4 6 lw
Message 6 Could not find schema information for the attribute 'referenceType'. ...Reference.map 4 28 lw
Message 7 Could not find schema information for the attribute 'url'. ...Reference.map 4 92 lw
Message 8 Could not find schema information for the attribute 'filename'. ...Reference.map 4 136 lw
Warning 9 Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is used as a base for complex type restriction. ...server2.wsdl 9 12 lw
Warning 10 Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is used as a base for complex type restriction. ...server2.wsdl 16 12 lw
Warning 11 Undefined complexType 'http://schemas.xmlsoap.org/soap/encoding/:Array' is used as a base for complex type restriction. ...server2.wsdl 53 12 lw
Warning 12 Imported schema for namespace 'http://schemas.xmlsoap.org/soap/encoding/' was not resolved. ...server2.wsdl 5 8 lw
- --Senvaikis 08:41, 17 February 2008 (EST)
- Just so you know, I'm still actively trying to fix this on a regular basis. I'll let you know when I come up with something... but if you don't see me post again within a week, I probably lost track of it YET AGAIN... this is a surprisingly tricky bug.
- Thanks for your patience (it's really been quite a long time, and I definitely appreciate it),
- -Sean Colombo (talk|contribs) 17:44, 23 February 2008 (EST)
- Thanks, Sean.
- --Senvaikis 08:54, 24 February 2008 (EST)
- Hi, Sean,
- referencing to your foresight
.. but if you don't see me post again within a week, I probably lost track of it YET AGAIN...
, I assume it wouldn't be impolite to ask you once more about strides making SOAP WS WS-I complient...:)- --Senvaikis 09:39, 20 April 2008 (EDT)
- I've taken a few cracks at this and I'm basically coming up dry on a way to make this work for .NET without breaking for everyone else and/or completely rewriting the nuSOAP library. I'm gonna try the "lazyweb" thing now: Does anyone know of a way to make nuSOAP work with .NET (ie: comply to the WS-I standard?). Please help! I don't know what else to try at the moment, so any links or examples anyone could provide would be very helpful.
- -Sean Colombo (talk|contribs) 10:12, 26 April 2008 (EDT)
- I'm not sure if it can help you, Sean, but just for curiosity I've made a little experiment - wrote some 'dummy' .NET webservice project , containing such your structures as AlbumResult, LyricsResult etc. and two methods (getSong & postSong). You can take a look at WS-I compliant wsdl generated for such webservice here.
- BTW, would like to pay your attention to the fact, that your wsdl <types> section does not contain any declaration of public type postSongResponse, used as response type for method postSong.
- regards, --Senvaikis 11:55, 28 April 2008 (EDT)
- ...?... --Senvaikis 02:39, 8 May 2008 (EDT)
- I'm just puzzled by such evident dissregard...--Senvaikis 16:41, 13 May 2008 (EDT)
+ 

