Reputation: 16139
We are using Java to call a web service to deliver a set of data back to ColdFusion. What is the proper way to get the data from Java into a ColdFusion query object?
I see that there is a Query object interface in the Java CFX api but can not tell how to instantiate a new one.
Upvotes: 3
Views: 272
Reputation: 28873
If you are using a CFX tag, try the addQuery method in the Response object
theResponse.addQuery(String name, String[] columns)
Update:
They may have added new interop functionality since the last I checked, but .. the only pure java method I am aware of is using the undocumented internal classes. If you already have a java ResultSet you could create a query object ie coldfusion.sql.QueryTable
using:
QueryTable query = new QueryTable(yourResultSet);
Another option is to instantiate the query object with the basics (row count, column names, etcetera). coldfusion.sql.QueryTable(int rowCount, String columnNames[])
Then populated it manually, one row at a time.
Upvotes: 1