Organizing ASP.NET SOAP Endpoints

.NET provides the ability to create HTTP GET and POST bindings for your ASMX web services. Unfortunately, the bindings are enabled across the entire endpoint, so if you enable GET, it's enabled for every WebMethod on the endpoint, whether or not it's appropriate for that method. If you want to enable GET and POST, that means you really should organize your endpoints by verb and not necessarily by "object"; so all your getter methods would go on one endpoint, and all the modifier methods go on other endpoints.

Another way to do this would be to disable GET and POST and create a .ASHX that would reflect out HTTP bindings for methods only as appropriate. The whole trick there is to get the .ASHX to generate WSDL with bindings selectively enabled, and then simply forward requests on to the service implementation. You could even automate this by using some sort of simple convention, i.e. WebMethods that begin with "Get" are reflected as GET, all others are reflected as POST.

Of course, the whole question is toolset support - if toolsets don't handle HTTP GET and POST bindings, or if they don't allow you to mix bindings into a client proxy, then what's the point of doing all the work?

— Gordon Weakliem at permanent link

The Price of Oil in China

Brad Feld has a post on oil hitting $67/bbl. My brother got his BS in Geology in 1981 and decided to go for his Master's. When he finished that 2 years later, the oil market had crashed and it took 15 years before he actually got a job as a geologist. I remember a flight to the UK in 1999, sitting next to an oil geologist who was talking about the state of affairs - at the time, oil was around $10/barrel. He wasn't a real happy guy at that time; I bet that's changed.

Brad thinks this will end badly; maybe it will end badly for more than just us, or rather the US. I remember reading that China is a huge reason for the price jump, their economy's been red hot and they're on track to become as large a consumer of oil as the US. Similar things have happened in all the raw materials - looked at the price of scrap steel lately? About a year ago I had to replace a water heater, I asked how to dispose of the old one. "Just put it in the alley" I was told. Sure enough, 2 hours later, that 23 year old, rusted out water heater was gone. Steel's gotten so expensive, people actually go up the alleys in Denver looking for scrap. All this is attributed to China's consumption; where they used to be exporters of raw materials, they're now consuming those raw materials and instead becoming exporters of finished products. What happens to global politics when China's economy suffers an oil shock?

— Gordon Weakliem at permanent link