Geeks With Blogs

News
Elton Stoneman (@EltonStoneman) IT Consultant, integration specialist, @Microsoft MVP and @Pluralsight author.

[Source: http://geekswithblogs.net/EltonStoneman]

If you're hosting WCF services in IIS and try accessing the WSDL using ServiceDescriptionImporter.Import, you'll get an error saying Unable to import binding BasicHttpBinding_IXyzService…

WCF separates out its schemas into logical components, which ServiceDescriptionImporter and other clients (including the ESBSimpleSamples ServiceClient generator) can't work with, as they're expecting a single flat WSDL.

Christian Weyer from Thinktecture has a solution here: Improving WCF Interoperability: Flattening your WSDL. If you download and build his sample project, copy Thinktecture.ServiceModel.Extensions.Description.dll to your service bin folder and amend your .svc description to use the Thinktecture factory:

<% @ServiceHost Language=C# Service="Xyz.XyzService" Factory="Thinktecture.ServiceModel.Extensions.Description.FlatWsdlServiceHostFactory " %>

- this will return a flattened WSDL, so tools expecting one file will work correctly.

Posted on Wednesday, July 30, 2008 12:23 PM CodeGen , WCF | Back to top


Comments on this post: Flattening WSDL from WCF Services

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
I struggle to use IIS sometimes so will bookmark this page for future reference. Thanks a bunch Mr Elton!
Left by Staff Handbook on Apr 30, 2010 2:25 PM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
You have to register the 'behaviour element extension' or you get problems with this method...
Left by Cool Computer Tricks on May 12, 2010 10:13 AM

# re: re: Flattening WSDL from WCF Services
Requesting Gravatar...
I didn't have any problems using the method though and I didn't register the extension?
Left by Awsome Stuff on May 12, 2010 3:12 PM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Strange because I had lots of problems with it!
Left by Chris on May 13, 2010 4:07 PM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Me tooooo!!!!
Left by Steven Davis on May 13, 2010 4:08 PM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
That’s pretty good article, I really like the tips you have given..Thank you so much for sharing this information. I have bookmarked this page for future use.
Left by platinum protection35 on May 26, 2010 2:40 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
I am still having problems please help:S
Left by Book App on Jun 30, 2010 9:35 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Works great!!
Left by Flavio Santos on Jul 07, 2010 6:20 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Superb stuff, thank you for this insight!
Left by Yorkshire Wedding Photographer on Jul 10, 2010 11:28 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Pretty informative post and really impressive thinking,I like the presentation and your style of writing.Keep blogging.
Left by USANA-57 on Jul 29, 2010 4:38 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Thanks again, always useful stuff I find on here.
Left by Search Engine Optimisation on Nov 16, 2010 8:49 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Always finding golden nuggets of information on here Elton, nice one!
Left by Daily Forex Trading on Nov 16, 2010 8:50 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Good post thanks for sharing.
Left by sikiş on Nov 25, 2010 2:31 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
thanks for the post.. good to be updated.
Left by forex on Dec 14, 2010 12:28 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
The basic steps required to create a WCF service that is hosted in IIS.The hosting options for WCF services are significantly enhanced in Microsoft .NET Framework 3.0.Thanks..
Left by Rob Poulos on Dec 18, 2010 1:13 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Yup I had problems too.
Left by Trading Systems on Dec 22, 2010 2:15 PM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
I think I will definitely get benefit from your content.I really like it.I m glad to find this type of site.
Left by Tents on Dec 24, 2010 5:10 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
Can't find a solution to this online..
Left by college football bowl prediction on Jan 10, 2011 12:14 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
This is a lame method. About time somebody at MS created a right-click solution.
Left by Sam on Mar 08, 2011 5:59 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
I just wanted to thank you for this article. I have been trying to call a .NET WCF Web Service from KSOAP2 on Android and this resolved my problem. Thanks again..
Left by Orlando Monaco on May 04, 2011 9:30 PM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
I try to read the solution in Christian Weyer. I cannot fully understand the solution.
Left by best online universities on May 13, 2011 5:46 AM

# re: Flattening WSDL from WCF Services
Requesting Gravatar...
You wrote something that people could understand and made the subject intriguing for everyone. I love it.
Left by marine battery charger on Jun 25, 2011 6:58 AM

Your comment:
 (will show your gravatar)


Copyright © Elton Stoneman | Powered by: GeeksWithBlogs.net | Join free