plsqlwebmethods

Simple way to pass a list of values into a WebMethods JDBC Adapter Service


For a WebMethods JDBC Adapter Service, I'm looking to provide a list of values as an input (values are strings in this case) to a stored procedure. The Param JDBC Type that I use in particular for this doesn't matter but ARRAY seemed like the most fitting from the options available. I've read into this a bit and it seems like providing input this way will require that I write a custom java service to convert my String list into a java.sql.array in order for it to be a valid input. This in turn, requires connection details to be provided. This seems overly complicated for the simple case of passing a list to a JDBC.

Is there any easier way to provide a String list to a WebMethods JDBC Adapter Service for use in a stored procedure or similar, such that the list can be iterated over in the SQL? My backup plan is potentially to do some kind of String splitting thing, where I pass my list in as a string with comma separated values which are split apart in the procedure logic, but this seems quite an inelegant solution.


Solution

  • Sorry, string list to java.sql.Array mapping is still not supported OOTB with webMethods JDBC adapter. If you can control your stored procedure, then try to create an input like you said, i.e. using a comma separated string which you split in your stored proc.

    If you have to use java.sql.Array as input, then you have to go with the java service to create your java.sql.Array object, or you can call a select adapter which returns such an object type, which you can re-use then.