I have been busy enough to not be motivated to blog lately, but I have a backblog of things that I have been thinking about posting on. Please bear with me if some of these end up sounding like ancient history.
In answer to WSE Pop Quiz 2, the problem, as Joseph alludes in the comments, is that the Microsoft.Web.Services2.Addressing.EndpointReference is not easily serializable because it doesn't have a public default constructor, and so you get "issues" when you try to use it. Some alternatives would be to use a string or uri if you only need the uri bits of the EPR, but if you want things like reference properties, you will have to roll your own class. Disappointing, but in the new era of services, you can easily get the impression that code level reuse is considered evil anyhow :).
If you do roll your own, you can obviously use xsd or wsdl to gen the classes, or you can try Christian Weyer's WSContractFirst. I haven't had much luck with imports use wscf, and I want to be able to generate stubs and skeletons form wsdl porttypes OR bindings OR service elements, and I want to be able to target wse and asmx (and wse'd asmx). I would also like to be able to save config options, so that I don't have to type it all into the dialog each time. The new WseWsdl2 in the WSE 2.0 SP1 does a lot of what I want on the proxy side of things, but no dice on the server side.
Since he hasn't held up to his almost promise to open-source the darn thing :), I am rolling my own, partly because I need it now, partly because it is fun. I will open source it when I get it done (please see busy comment from above). Christian, if you are reading this and you are open sourcing it soon, please let me know, because I would hate to waste the effort if I could contribute to your version.
I am borrowing some ideas from Daniel Cazzu's Custom XSD Code Generation MSDN article. He also blogs about the concept and has a follow-on vs.net tool for custom gen. I am personally not a big fan of the inline annotations, though I suppose you could easily add the annotations to a new schema and then import the target schema -- not a terrible tradeoff, all things considered. I have done work with CodeDom for a (gasp, heresy) "transparent", reflective object relational mapper. I, for one, love object-relational mappers, but I hadn't touched the System.Xml.Schema and Serialization classes too much, so it was a great, fun intro. I especially like the reflective types. Just so that you know which side of the fence I land on. More on that later.
Recent Comments