here i Decided to go for Javaservice for converting String to the CLOB Object
i Adapter service i thought to keep java.sql.CLOB as a inputType, map the output of javaservice to this adapter service filed
than i started java service below is java code
IDataCursor datacursor =pipeline.getCursor();
String data=IDataUtil.getString(datacursor,“string”);
long l=0;
oracle.sql.CLOB clobdocument=null;
try
{
//int in=clobdocument.setString(l,data);
Writer wr=clobdocument.setCharacterStream(l);
BufferedWriter br = new BufferedWriter(wr);
StringReader strrd=new StringReader(data);
char aux;
do{
aux=(char)strrd.read();
br.write(aux);
}while(aux != -1);
}catch(Exception e)
{
throw new ServiceException (“Canot convert CLOB To String”+e.toString());
}
datacursor.insertAfter(“CLOBData”,clobdocument);
datacursor.destroy();
if i run this service giving below Error
Could not run ‘convertCLOB’.
java.lang.reflect.InvocationTargetException: oracle.sql.CLOB.setCharacterStream(J)Ljava/io/Writer;
i think problem in javaservice is not instatiated the CLOB ,i canot instatitate the CLOb becuase it is an interface.
pls provide me suggestion to convert string(XML Data ) to CLOB Object…
#webMethods#Integration-Server-and-ESB#Adapters-and-E-Standards