I have a webservice to generate an id .
The script which i use to generate the token is as below
import javax.xml.transform.*
import javax.xml.transform.dom.*
import javax.xml.transform.stream.*
import org.w3c.dom.*
import groovy.xml.DOMBuilder
Element root = ((DOMSource) sourceResponse).getNode().getFirstChild();
NodeList result = root.getElementsByTagName(“token”);
String xmlContent = result.item(0).getTextContent();
String out = xmlContent
But i get the following error when i run the process.
Caused by: org.bonitasoft.engine.expression.exception.SExpressionEvaluationException: Groovy script throws an exception of type class org.codehaus.groovy.runtime.typehandling.GroovyCastException with message = Cannot cast object ‘javax.xml.transform.sax.SAXSource@1071c6b’ with class ‘javax.xml.transform.sax.SAXSource’ to class ‘javax.xml.transform.dom.DOMSource’.
Can anyone help?
Im using Bonita 7.1
Regards,
A.