AF-DesignWe put the customer's needs before the technology
News
Portfolio
Products
Services
Resources
Contact Us
ColdFusion:
 Components
Computer Primer:
 Bit/Byte/Kilobyte
 Download Calculator
Design Primer:
 Color Picker
Images:
 Free use images
JavaScript Primer:
 Forms
 Popup's
 Redirect Select
 UUID Class
PHP
 Graphing Tool
SQL Toolkit:
 Download/Info
 Documentation
 Changelog
 Demo
Just for fun:
 TV width & height

ColdFusion MX Tools

ASP.NET Data Conversion Component dotNetGlue.zip v.1.0 (4K) 2003-12-12
ASP.NET Data Conversion Component dotNetGlue.zip v.1.0.1 (4K) 2004-03-14

1.0.1 - Minor bug fix release. The Microsoft Framework 1.1 changed the case of some of the XML request.

Methods:

  • resultToQuery
    Takes the result from an ASP.NET webservice call and returns a ColdFusion MX component.
    <cfscript>
    
       // create component based on the file name you used.
       dotNetGlue = createObject("component","components.dotNetGlue");
    
       // create service connector based on your webservice.
       dotNetSvc = createObject("webservice","[address to WSDL here]");
    
       // invoke your remote method and parse the results
       qResult = dotNetGlue.resultToQuery(dotNetSvc.invokedMethod([your attributes]));
    </cfscript>
    
    <--- dump the results here --->
    <cfdump var="#qResult#">
    	

Remarks

Microsoft ASP.NET and Macromedia ColdFusion MX 6.1 do not always play well together, however, this tag will convert the DataSet object returned by ASP.NET into a native ColdFusion Object. This is handy when exchanging data between two sites.

This component translates the ASP.NET structure into a native object through the magic of webservices and XML. If you investigate the ASP.NET DataSet closely you can uncover the underlying XML structure and then process it to obtain a table structure, and then create a query based on that table.

Drawbacks to using this method include, loss of column name case in the ColdFusion query object and loss of data types because ColdFusion is typeless (sort-of).

Why would you need this? If an ASP.NET developer returns a DataSet from a method, ColdFusion will not be able to parse it by default. This is your glue between ASP.NET and ColdFusion MX.

Has it been tested? Yes. this code has been used in a production environment and has been found to add minimal overhead to the service invokation. Un-scientific results show an additional 30-60ms of processing for the conversion. Since some service calls can take as long as 200-3000ms, this is a small price to pay.

Next steps include testing of a reverse translation method which will take a ColdFusion MX query result and pass it as a ASP.NET DataSet for processing by ASP.NET application servers.


Copyright (C) 2000-2009, Erik Giberti (AF-Design), All rights reserved.

Program as used in this license may refer to entire software packages, code snippets and binary image or visual information.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

AF-Design, 1305 Karen Drive, West Dundee, IL, 60118 / Tel: 888-762-1056 / Fax: 888-845-8898
Copyright © 1998-2009 AF-Design, All rights reserved. Privacy / Contact Us