Hello.
I’m going further on my test against Bonita 7… and I got another issue…
I’m testing a very simple SAOP web service, that just takes a string and returns its length. The service is served by a SoapUI mock that seems to work as expected.
The request is built in my process connector using a Groovy MarkupBuilder, and is correctly sent to the service that returns the same response I’ve successfully tested out of Bonita.
Here is the Groovy script.
def xml = new StringWriter()
def mb = new groovy.xml.MarkupBuilder(xml)
mb.doubleQuotes = true
mb.mkp.xmlDeclaration(version:‘1.0’, encoding:‘UTF-8’)
mb.‘soap:Envelope’(‘xmlns:soap’:‘http://www.w3.org/2003/05/soap-envelope’, ‘xmlns:moon’:‘urn:moon-ws-1/schema’) {
‘soap:Body’ {
‘moon:computeStringLength’ {
‘moon:string’ {mb.mkp.yield(request.getQuestion())}
}
}
}
return xml.toString()
The request :
<?xml version='1.0' encoding='UTF-8'?>
q
And the response :
1
But Bonita fails handling this response with the following exception.
org.bonitasoft.engine.core.connector.exception.SConnectorException: PROCESS_DEFINITION_ID=4978914611161110206 | PROCESS_NAME=Processus-Un | PROCESS_VERSION=2.0 | PROCESS_INSTANCE_ID=3 | ROOT_PROCESS_INSTANCE_ID=3 | FLOW_NODE_DEFINITION_ID=8533947796320219787 | FLOW_NODE_INSTANCE_ID=12 | FLOW_NODE_NAME=Calculer | CONNECTOR_DEFINITION_IMPLEMENTATION_CLASS_NAME=WS | CONNECTOR_INSTANCE_ID=5 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: Tentative d'insertion d'un noeud à un emplacement non autorisé.
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:327)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:145)
at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:111)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:131)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.failurewrapping.TxInHandleFailureWrappingWork.work(TxInHandleFailureWrappingWork.java:42)
at org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork.work(FailureHandlingBonitaWork.java:66)
at org.bonitasoft.engine.work.BonitaWork.run(BonitaWork.java:56)
at org.bonitasoft.engine.work.SequenceRunnableExecutor.innerRun(SequenceRunnableExecutor.java:47)
at org.bonitasoft.engine.work.BonitaRunnable.run(BonitaRunnable.java:35)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: Tentative d'insertion d'un noeud à un emplacement non autorisé.
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:128)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:319)
... 14 more
Caused by: java.util.concurrent.ExecutionException: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: Tentative d'insertion d'un noeud à un emplacement non autorisé.
at java.util.concurrent.FutureTask.report(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.getValue(ConnectorExecutorImpl.java:152)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:122)
... 15 more
Caused by: org.w3c.dom.DOMException: HIERARCHY_REQUEST_ERR: Tentative d'insertion d'un noeud à un emplacement non autorisé.
at com.sun.org.apache.xerces.internal.dom.ParentNode.internalInsertBefore(Unknown Source)
at com.sun.org.apache.xerces.internal.dom.ParentNode.insertBefore(Unknown Source)
at com.sun.org.apache.xerces.internal.dom.CoreDocumentImpl.insertBefore(Unknown Source)
at com.sun.org.apache.xerces.internal.dom.NodeImpl.appendChild(Unknown Source)
at org.bonitasoft.connectors.ws.cxf.SecureWSConnector.buildResponseDocumentBody(SecureWSConnector.java:246)
at org.bonitasoft.connectors.ws.cxf.SecureWSConnector.executeBusinessLogic(SecureWSConnector.java:197)
at org.bonitasoft.engine.connector.AbstractConnector.execute(AbstractConnector.java:77)
at org.bonitasoft.engine.core.connector.impl.SConnectorAdapter.execute(SConnectorAdapter.java:69)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:208)
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl$ExecuteConnectorCallable.call(ConnectorExecutorImpl.java:179)
at java.util.concurrent.FutureTask.run(Unknown Source)
... 3 more
I’ve triedto change some things in my connector, but no effect…
Any idea ?
Thanks again !
Regards.