Inserting number fields into Oracle

I have a flow that takes as input an XML message and needs to insert the result into an Oracle table. The primary key fields of the table are numeric. I’ve created an adapter service to do the insert. The question I have is, how do I handle the numeric fields? WebMethods gives me two choices for the input field type: String and java.math.BigDecimal. If I choose the former, I get a unique constraint violation from oracle (this is also what I get if I try inserting string values into the key fields via sqlplus; odd, but that’s the way Oracle chooses to complain). If I choose the latter, I get an exception from WebMethods:

: Unable to invoke adapter service psoft:ppstinsert.
[ART.114.505] Error while invoking adapter service com.wm.adapter.wmjdbc.services.Insert.
java.lang.String

Anybody have any thoughts on how to do this?

Never mind. Just my confusion about what the primary key of the table was. Is there a way to delete a thread?

Hi Bruce,

I’m trying to insert into an Oracle table with a InsertSQL Service via the JDBC Adapter. But I’ve encountered problems when inserting a field that is NUMERIC in Oracle. In WebMethods I can only choose between “java.lang.String” and “java.math.BigDecimal”. The first one produces an error in Oracle, and the second doesn’t seem to do anything. Do you know what I’m doing wrong?

Besides, I’ve got a a timestamp field that with the wmDB package was corretly assigned, but with the InsertSQL service doesn’t. How I’m supposed to do it?

Thanks in advance,

Ignasi

You can let adapter service do the conversion by defining input field for integer column as follows:
‘JDBC Type’ as ‘INTEGER’ and
‘Input Field Type’ as ‘java.lang.String’

I do that for input parameters in the select adapter services.

You can also get this error when inserting into date rows with the default Input Field Type that webMethods assigns Oracle Date columns (java.sql.Timestamp). Changing this Input Field Type to ‘java.lang.string’ solves the problem.