I am trying to use datasink to write some data to either MySQL or DB2. I have tried all ways ie. Like prepared statements, hard coded. Nothing seems to work. The datasink fails (icon becomes red) no error message or exception is shown in the log or anywhere else, and nothing is written to the database.
I am using the Driver and connection string succesfully to read data from both databases mentioned above.
I saw a recent post on soapUI board and apparently it was solved in a newer version. I have soapUI pro 2.0.2.
Also is it possible to not have the default '?' question marks in the XML messages? They break the schema and for large messages it becomes to labour intensive removing those by hand.
I managed to write to a mysql database using jdbc in the setup script (both insert and update) using prepared statements but still no luck with datasink.
With DB2 it's a little trickier. I can write to DB2 using hard coded values.
If I use prepared statement and press the green arrow on the setup script - nothing happens, nothing get written to the DB. If I press the green arrow on the test the following exception is logged in soapUI log and test log: java.lang.UnsatisfiedLinkError: COM.ibm.db2.jdbc.app.DB2PreparedStatement.SQLBindChar(IIJILjava/lang/String;IJ[JIIZ)I
I was able to insert and update mySQL using prepared statements
And was able to insert and update DB2 but had to use a different Connection String (which forces the use of a different driver). I used this version of the string: "jdbc:db2://serverort/database:user=xxx;password=xxx;"
If the server and port are omitted then the CLI driver is used which throws the following exception when using a prepared statement: