Friday, October 29, 2004

Converting .NET dataset to ColdFusion Queries

Joe Rinehart has posted on his blog a short UDF that shows how to convert a Dataset to CF queries.
This is something we get asked about all the time: "Do CFMX web services support the Microsoft DataSet object?" I have always recommended that using DataSet is a really good way to screw interop, since it is a Microsoft proprietary data type. The problem with it? The WSDL does not describe the data inside the dataset. There is XML Schema inside the XML on the wire that then describes the types of the data. This requires parsing this Schema at runtime. Something the Axis engine at the heart of the CFMX web services support does not do. Why not? Because it is fairly difficult to do well, slows execution time, and would only be to support this wacky MS specific type.

In any case, I haven't tested Joes implementation, but if you are dealing with a MS specific web service that you have to consume, this should help you out tremendously!

No comments: