I’m following the web service tutorial for version 7.3 here
The main problem as I see it is that the tutorial is for the pre-version 7 of bonitasoft before UI/Contracts etc. So I’ve tried to develop an example to use by building a contract first etc.
However this then comes up against the 2nd problem which is that the GetWeather webservice on webservicex.net doesn’t seem to be working. I tried using “Grenoble/France” directly on the page here and it came back saying that “Data Not Found”.
So I decided to change the example to another web service which was working, I found the ChangeLengthUnit example for changing measurements to other measurement units.
The pre-version 7 example passes the data into the SOAP envelope using process variables, I think that this is different to how it should be in 7 but I followed it anyway by assigning the variables from the instantiation contract to process variables and then referencing these in the soap envelope. However it didn’t work, whereas when I used the Weather example the values were passed in: -
Just went through the tutorial again and amended the code for the envelope and now it seems to be at least passing through the values so this is better. However looking in the engine log I have the following:
2016-11-14 15:19:40.514 +0000 INFO: org.bonitasoft.connectors.ws.cxf.SecureWSConnector serviceNS ChangeLengthUnit
2016-11-14 15:19:40.514 +0000 INFO: org.bonitasoft.connectors.ws.cxf.SecureWSConnector serviceName http://www.webserviceX.NET
2016-11-14 15:19:40.514 +0000 INFO: org.bonitasoft.connectors.ws.cxf.SecureWSConnector portName ChangeLengthUnitSoap12
2016-11-14 15:19:40.514 +0000 INFO: org.bonitasoft.connectors.ws.cxf.SecureWSConnector binding http://www.w3.org/2003/05/soap/bindings/HTTP/
2016-11-14 15:19:40.514 +0000 INFO: org.bonitasoft.connectors.ws.cxf.SecureWSConnector endpointAddress http://www.webservicex.net/length.asmx
2016-11-14 15:19:40.534 +0000 INFO: org.bonitasoft.connectors.ws.cxf.SecureWSConnector soapAction http://www.webserviceX.NET/ChangeLengthUnit
2016-11-14 15:19:40.534 +0000 INFO: org.bonitasoft.connectors.ws.cxf.SecureWSConnector envelope <?xml version="1.0" encoding="UTF-8"?><env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
<env:Body>
<tns:ChangeLengthUnit xmlns:tns="http://www.webserviceX.NET">
<tns:LengthValue>631.0</tns:LengthValue>
<tns:fromLengthUnit>feet</tns:fromLengthUnit>
<tns:toLengthUnit>meter</tns:toLengthUnit>
</tns:ChangeLengthUnit>
</env:Body>
</env:Envelope>
2016-11-14 15:19:40.534 +0000 SEVERE: org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork THREAD_ID=122 | HOSTNAME=JJEC-laptop | TENANT_ID=1 | The work [ExecuteConnectorOfActivity: flowNodeInstanceId = 100012, connectorDefinitionName = getlengthConversion] failed. The failure will be handled.
2016-11-14 15:19:40.550 +0000 SEVERE: org.bonitasoft.engine.execution.work.FailureHandlingBonitaWork THREAD_ID=122 | HOSTNAME=JJEC-laptop | TENANT_ID=1 | org.bonitasoft.engine.core.connector.exception.SConnectorException : "PROCESS_DEFINITION_ID=8209684801499343137 | PROCESS_NAME=MeasurementConversion | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=5006 | ROOT_PROCESS_INSTANCE_ID=5006 | FLOW_NODE_DEFINITION_ID=6803091207177009552 | FLOW_NODE_INSTANCE_ID=100012 | FLOW_NODE_NAME=Get Calc Result | CONNECTOR_IMPLEMENTATION_CLASS_NAME=getlengthConversion | CONNECTOR_INSTANCE_ID=100006 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: Exception trying to call remote webservice"
org.bonitasoft.engine.core.connector.exception.SConnectorException: PROCESS_DEFINITION_ID=8209684801499343137 | PROCESS_NAME=MeasurementConversion | PROCESS_VERSION=1.0 | PROCESS_INSTANCE_ID=5006 | ROOT_PROCESS_INSTANCE_ID=5006 | FLOW_NODE_DEFINITION_ID=6803091207177009552 | FLOW_NODE_INSTANCE_ID=100012 | FLOW_NODE_NAME=Get Calc Result | CONNECTOR_IMPLEMENTATION_CLASS_NAME=getlengthConversion | CONNECTOR_INSTANCE_ID=100006 | org.bonitasoft.engine.connector.exception.SConnectorException: java.util.concurrent.ExecutionException: org.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: Exception trying to call remote webservice
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:275)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnector(ConnectorServiceImpl.java:148)
at org.bonitasoft.engine.connector.ConnectorServiceDecorator.executeConnector(ConnectorServiceDecorator.java:114)
at org.bonitasoft.engine.execution.work.ExecuteConnectorWork.work(ExecuteConnectorWork.java:138)
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.bonitasoft.engine.connector.exception.SConnectorException: org.bonitasoft.engine.connector.ConnectorException: Exception trying to call remote webservice
at org.bonitasoft.engine.connector.impl.ConnectorExecutorImpl.execute(ConnectorExecutorImpl.java:125)
at org.bonitasoft.engine.core.connector.impl.ConnectorServiceImpl.executeConnectorInClassloader(ConnectorServiceImpl.java:269)
... 14 more
It’s pretty messy, I suspected that you’d pass objects from the BDM in v.7 but I sort of assigned the objects from the input forms to process variables (to be similar to the tutorial) before the out connector.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.