I apologize it has taken so long for me to post this, but as promised, here is the .cs file for the wsdl flattener.
FlatWSDL.cs (10.75 kb)
To use it, you need to modify your web config and add a reference to the library in the behavior extensions section: More...
Recently I had the need to let a user upload a zip file and then have the Ruby app extract it and store it in a DB. I turned to google, but beyond some posts recommending using rubyzip to do the zip file handling I couldn't find anything showing a good way to do this recursively without first actually extracting the zip file to disk and then using the dir object.
After much adding and deleting code I have something that works reasonably well. More...
I've recently begun learning Ruby by working my way through the Ruby Koans. I finally made it to the section on error handling, which answered a few questions for me.
Once again, Ruby has not surprised me (this is a good thing). There's just some minor syntactical differences. Specifically in place of "try, catch, finally" Ruby uses "begin, rescue, ensure".
begin
fail "Oops"
rescue StandardError => ex
#Do something with the error
ensure
result = :code_that_always_runs
end
Since I haven't made it all the way through the koans yet I'm, probably missing something that seems obvious to long time Ruby users, but so far it's pretty damned simple.
I’ve got a few more WCF posts in the cooker, but I thought it might be nice to start the new year off with something a little bit different. This past Thursday, my wife and I were fortunate enough to receive an invite to the Knoxville Symphony Orchestra’s “Blogger’s Night”. More...
Sometimes when creating a WCF behavior it'd be nice to be able to pass in some sort of instance specific configuration information. Fortunately, you can.
In the previous post we added a class that implemented BehaviorExtensionElement so that we could apply our IServiceBehavior via the config file. There are a few other methods that you can implement so that the BehaviorExtensionElement will pull settings from the config file. This way when you add the behavior you can tell it something special, like what the friendly name of the service is. More...
Apparently BlogEngine.NET sends a trackback everytime I update a post with a trackback link in it. If I have spammed you with trackbacks, I apologize. I've turned them off until I have time to dig through the code and fix it.
Behaviors in WCF are so stinking useful, and once you get past the basics of WCF they're arguably a necessity. Microsoft has saved itself from hundreds of hours of cursing by including the ability to define custom behaviors.
My favorite use of behaviors is addressing some cross cutting concerns that we consistently have in our WCF services. Specifically logging, service registration, wsdl tweaking, and error handling. Which brings us around to the IErrorHandler interface.
More...
If you've done any work with WCF and non .NET clients, you've probably had the need to make WCF emit a flattened WSDL that doesn't use xsd includes. You've probably run across Tomas Restrepo's InlineXSDInWSDLBehavior and Christian Weyer's FlatWSDL extension. They both work quite well. Possibly too well.
More...
Finally, the base functionality is working. I got tired of fighting and switched IIS 7 to classic mode.
Problems, are magically gone. Now it's on to moving old stuff over here and getting a decent looking theme working.
So, I’ve left Edfinancial and am at Bechtel now.
I’d forgotten how annoying changing jobs can be. New paperwork, gotta move all the crap you’ve accumulated, can’t remember where the damned bathroom is.
Life is good!