tags:

views:

434

answers:

1

I have been wrestling with SvcUtil all day, trying to get it to generate useful code for some IMS Enterprise Services (primarily Group Management Service, but there are others we need it to work for as well.) You can find the IMS service WSDL's here http://www.imsglobal.org/es/index.html.

I have come to the conclusion that SvcUtil is a useless afterthought from Microsoft that doesn't support the WSDL and XSD standards even in a half-assed way. It is incapable of generating a WCF service that conforms to the standard WSDL contracts that IMS uses AND functions at the same time. Despite generating compilable code from the following WSDL (http://www.imsglobal.org/services/gms/wsdl/imsGroupManServiceSync_v1p0.wsdl), observing the generated WSDL from the WCF service (?wsdl, ?wsdl=wsdl0, ?xsd=xsd0, etc.) shows that none of the operations exist, and only a fraction of the types that were generated in code are actually recognized by WCF. If we screw with the generated code, we can get something that sort of functions (we are using SoapUI to test), but then it no longer conforms to the contract, so its useless to the people who really need to call these services.

Are there any alternatives to SvcUtil? (Please don't suggest the built in Visual Studio "Add Service Reference" tool, that is just as useless as it uses the exact same code as SvcUtil.) We need something that will give us a degree of control over how code is generated from the WSDL contract, what files each part ends up in, which namespaces each code element ends up in, etc. The IMS contract imports both XSD types specific to the services defined in the WSDL, as well as XSD types that are common to all IMS services. We need to be able to generate different assemblies for those types, and reference them in the generated code (similar to how SvcUtil is apparently supposed to do it...but it doesn't seem to do what it says its documentation says it does at all.)

I have been a huge fan of WCF until now. It obviously works when you use only .NET/WCF services, but any time you try to use it in a standards-compliant, cross-platform environment, everything goes to shit.

+5  A: 

Have you had a look at the WCF Proxy Generator on Codeplex? Based on who's behind it (Kate Gregory and Michele Leroux Bustamante), there's hope it might be useful - plus you get the sources, so you can adapt / tweak at your heart's content!

(haven't had the time to take a serious look at it myself - yet - it's on the endless "To-Do when I get around to it" list....)

Plus check out this blog post here by Pedram Rezaei showing how to influence the Visual Studio "Add Service Reference" step with your own custom code.

marc_s
Thanks a lot for the link! Looks very useful. Michele Bustamante is the goddess of WCF, and I like most of her work.
jrista
Bad choice of word. Hows; "all" sound? ;P I have another question...you mentioned source was available, but when I go to the Source Code tab on the codeplex site, it shows that no source is available, and there is only a download for the MSI. Where can I get the source code?
jrista
There's a "Add-In Source" link on the page there: Add-In Source * Get the source for the add-in and setup program here: http://wcfproxygenerator.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=29584
marc_s
Thanks, I never scrolled down on that main page.
jrista
Accepting as answer, as while it did not solve the issue in the OP, it was useful for solving issues with other services.
jrista