Bonita BPM 6.4 Respose Web Service Connector (Groovy Script)

import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.InputSource; try { // Clean response xml document responseDocumentBody.normalizeDocument(); // Get result node NodeList resultList = responseDocumentBody.getElementsByTagNameNS("http://ws.sumanumerosws.ilychbram.com.ec/", "sumaResponse"); Element resultElement = (Element) resultList.item(0); return resultElement.getTextContent(); } catch (Exception e) { return e.getMessage(); }
Bonita BPM 6.4 web service connector. Return the web service response operation into an output variable using Groovy Script.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.