IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only

java.sql.ResultSet to IData

  • 1.  java.sql.ResultSet to IData

    Posted Wed October 29, 2008 06:56 PM

    Hello,
    We have a service that builds and executes SQL based off the criteria selected by the user. There are eight criteria fields which leaves many different possibilities. We were just building a SQL string and using the dynamic SQL adapter to execute it. Unfortunately our DBA Team has mandated that parameter markers always be used. There are too many possible combinations to use one JDBC adapter per each possible combination and since we can’t build the string we are left with little options. Ideally we would like an adapter like the DynamicSQL adapter where the input parameters can be built dynamically as well but since we don’t have it I have created a java program that “prepares” the SQL using java.sql.PreparedStatement and executes it. What is the best way to convert the ResultSet into an IData document? The output of the java service needs to match the output of the prior JDBC adapter. I’m hoping for a simple way so that I don’t have to process the ResultSet and put each field into the IData.
    Thanks!


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB