The actual spin documentation does not show any implementation like that shown in the SOAP examples. It shows the use of spin only within Java code or scripting languages, while the examples embed the processing of the SOAP in the bpmn source code:
<camunda:outputParameter name="forecast"><![CDATA[
${S(response)
.childElement("Body")
.childElement("http://www.webservicex.net", "GetWeatherResponse")
.childElement("GetWeatherResult")
.textContent()}
]]></camunda:outputParameter>
I have yet to see one post where someone actually claims to have made this work.
The SPIN implementation shown in several examples (most notably the loan-approval-fixed example provide to Sherry Koontz in a different post) does not work.
At this point, I wish I could go back to ActiveVOS, whose tooling is light-years ahead of Camunda's, but my company appears to have committed to Camunda long-term, so I'm stuck.
If anyone has actual example of a fully operation Eclipse project that demonstrates posting a SOAP message to a SOAP interface on an externally available web service (not one where you have to spend half a day trying to figure out how to set one up locally, but rather something like the weather example on www.webservicex.net), I would be so grateful.
Thank you.
do you have problems with the SOAP example [1]? Can you share your test project which isn't working? Maybe we can spot the problem.
Cheers,
Sebastian
[1] https://github.com/camunda/camunda-bpm-examples/tree/master/servicetask/soap-service
I should note that I am very new to all this, so assume that I know almost nothing about it (that's not actually true, but for this purpose, assume it).
The "fixed" project I was referencing is found in the following post:
https://groups.google.com/forum/#!topic/camunda-bpm-users/dEIG6qbMEUk
There appears to be a problem identifying the "S" data format. If you look in the Spin documentation, it indicates that certain dependencies should be present in the project to support Spin (e.g. camunda-spin-core, camunda-spin-dataformat-all), but these are not present in the pom.xml of the "fixed" example I tried nor the Camunda service task SOAP example.
Here's the stack trace:
C:\Users\mp4783\Downloads\camunda-bpm-examples-master\camunda-bpm-examples-master\servicetask\soap-service>C:\Progra~1\apache-maven-2.2.1\bin\mvn.bat clean install
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Service Invocation - Soap
[INFO] task-segment: [clean, install]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory C:\Users\mp4783\Downloads\camunda-bpm-examples-master\camunda-bpm-examples-master\servicetask\soap-service\target
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO] [compiler:compile {execution: default-compile}]
[INFO] No sources to compile
[INFO] [resources:testResources {execution: default-testResources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] [compiler:testCompile {execution: default-testCompile}]
[INFO] Compiling 1 source file to C:\Users\mp4783\Downloads\camunda-bpm-examples-master\camunda-bpm-examples-master\servicetask\soap-service\target\test-classes
[INFO] [surefire:test {execution: default-test}]
[INFO] Surefire report directory: C:\Users\mp4783\Downloads\camunda-bpm-examples-master\camunda-bpm-examples-master\servicetask\soap-service\target\surefire-reports
-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running org.camunda.bpm.example.servicetask.soap.ServiceTaskSoapTest
Nov 11, 2015 9:21:33 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [camunda.cfg.xml]
Nov 11, 2015 9:21:33 AM org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl invokePreInit
INFO: PLUGIN ConnectProcessEnginePlugin activated on process engine default
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Nov 11, 2015 9:21:33 AM org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl invokePreInit
INFO: PLUGIN SpinProcessEnginePlugin activated on process engine default
Nov 11, 2015 9:21:35 AM org.camunda.bpm.engine.impl.db.sql.DbSqlSession executeSchemaResource
INFO: performing create on engine with resource org/camunda/bpm/engine/db/create/activiti.h2.create.engine.sql
Nov 11, 2015 9:21:35 AM org.camunda.bpm.engine.impl.db.sql.DbSqlSession executeSchemaResource
INFO: performing create on history with resource org/camunda/bpm/engine/db/create/activiti.h2.create.history.sql
Nov 11, 2015 9:21:35 AM org.camunda.bpm.engine.impl.db.sql.DbSqlSession executeSchemaResource
INFO: performing create on identity with resource org/camunda/bpm/engine/db/create/activiti.h2.create.identity.sql
Nov 11, 2015 9:21:35 AM org.camunda.bpm.engine.impl.db.sql.DbSqlSession executeSchemaResource
INFO: performing create on case.engine with resource org/camunda/bpm/engine/db/create/activiti.h2.create.case.engine.sql
Nov 11, 2015 9:21:35 AM org.camunda.bpm.engine.impl.db.sql.DbSqlSession executeSchemaResource
INFO: performing create on case.history with resource org/camunda/bpm/engine/db/create/activiti.h2.create.case.history.sql
Nov 11, 2015 9:21:35 AM org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild checkHistoryLevel
INFO: No historyLevel property found in database.
Nov 11, 2015 9:21:35 AM org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild dbCreateHistoryLevel
INFO: Creating historyLevel property in database with value: audit
Nov 11, 2015 9:21:35 AM org.camunda.bpm.engine.impl.ProcessEngineImpl <init>
INFO: ProcessEngine default created
Nov 11, 2015 9:21:36 AM org.camunda.bpm.engine.impl.interceptor.CommandContext close
SEVERE: Error while closing command context
org.camunda.bpm.engine.ProcessEngineException: Error while evaluating expression: ${S(response)
.childElement("Body")
.childElement("http://www.webserviceX.NET", "GetWeatherResponse")
.childElement("GetWeatherResult")
.textContent()}. Cause: Error invoking function 'S'
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:59)
at org.camunda.bpm.engine.impl.el.ElValueProvider.getValue(ElValueProvider.java:35)
at org.camunda.bpm.engine.impl.core.variable.mapping.OutputParameter.execute(OutputParameter.java:45)
at org.camunda.bpm.engine.impl.core.variable.mapping.IoParameter.execute(IoParameter.java:47)
at org.camunda.bpm.engine.impl.core.variable.mapping.IoMapping.executeOutputParameters(IoMapping.java:41)
at org.camunda.connect.plugin.impl.ServiceTaskConnectorActivityBehavior.applyOutputParameters(ServiceTaskConnectorActivityBehavior.java:85)
at org.camunda.connect.plugin.impl.ServiceTaskConnectorActivityBehavior.execute(ServiceTaskConnectorActivityBehavior.java:56)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:42)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:27)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerStart.java:56)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerStart.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerStart.java:26)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:473)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:473)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionCreateScope.scopeCreated(PvmAtomicOperationTransitionCreateScope.java:34)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope.execute(PvmAtomicOperationCreateScope.java:50)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope.execute(PvmAtomicOperationCreateScope.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmAtomicOperationTransitionNotifyListenerTake.eventNotificationsCompleted(AbstractPvmAtomicOperationTransitionNotifyListenerTake.java:37)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.AbstractPvmAtomicOperationTransitionNotifyListenerTake.eventNotificationsCompleted(AbstractPvmAtomicOperationTransitionNotifyListenerTake.java:28)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.take(PvmExecutionImpl.java:573)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope.execute(PvmAtomicOperationTransitionDestroyScope.java:80)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionDestroyScope.execute(PvmAtomicOperationTransitionDestroyScope.java:33)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerEnd.java:37)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationTransitionNotifyListenerEnd.eventNotificationsCompleted(PvmAtomicOperationTransitionNotifyListenerEnd.java:23)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:473)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.leaveActivityViaTransitions(PvmExecutionImpl.java:771)
at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.leaveActivityViaTransition(PvmExecutionImpl.java:746)
at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performOutgoingBehavior(BpmnActivityBehavior.java:103)
at org.camunda.bpm.engine.impl.bpmn.behavior.BpmnActivityBehavior.performDefaultOutgoingBehavior(BpmnActivityBehavior.java:52)
at org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.leave(FlowNodeActivityBehavior.java:44)
at org.camunda.bpm.engine.impl.bpmn.behavior.FlowNodeActivityBehavior.execute(FlowNodeActivityBehavior.java:36)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:42)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityExecute.execute(PvmAtomicOperationActivityExecute.java:27)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStart.eventNotificationsCompleted(PvmAtomicOperationActivityStart.java:37)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStart.eventNotificationsCompleted(PvmAtomicOperationActivityStart.java:25)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:473)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:473)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:58)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationActivityStartCreateScope.scopeCreated(PvmAtomicOperationActivityStartCreateScope.java:35)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope.execute(PvmAtomicOperationCreateScope.java:50)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationCreateScope.execute(PvmAtomicOperationCreateScope.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart.eventNotificationsCompleted(PvmAtomicOperationProcessStart.java:56)
at org.camunda.bpm.engine.impl.pvm.runtime.operation.PvmAtomicOperationProcessStart.eventNotificationsCompleted(PvmAtomicOperationProcessStart.java:27)
at org.camunda.bpm.engine.impl.core.operation.AbstractEventAtomicOperation.execute(AbstractEventAtomicOperation.java:65)
at org.camunda.bpm.engine.impl.interceptor.CommandContext.performOperation(CommandContext.java:134)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperationSync(ExecutionEntity.java:494)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:484)
at org.camunda.bpm.engine.impl.persistence.entity.ExecutionEntity.performOperation(ExecutionEntity.java:464)
at org.camunda.bpm.engine.impl.pvm.runtime.PvmExecutionImpl.start(PvmExecutionImpl.java:213)
at org.camunda.bpm.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:75)
at org.camunda.bpm.engine.impl.cmd.StartProcessInstanceCmd.execute(StartProcessInstanceCmd.java:35)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 3.145 sec <<< FAILURE!
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:97)
at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
at org.camunda.bpm.engine.impl.RuntimeServiceImpl.startProcessInstanceByKey(RuntimeServiceImpl.java:78)
at org.camunda.bpm.example.servicetask.soap.ServiceTaskSoapTest.shouldInvokeService(ServiceTaskSoapTest.java:45)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
Caused by: org.camunda.bpm.engine.impl.javax.el.ELException: Error invoking function 'S'
at org.camunda.bpm.engine.impl.juel.AstFunction.eval(AstFunction.java:121)
at org.camunda.bpm.engine.impl.juel.AstMethod.invoke(AstMethod.java:79)
at org.camunda.bpm.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
at org.camunda.bpm.engine.impl.juel.AstMethod.invoke(AstMethod.java:79)
Results :
at org.camunda.bpm.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
Tests in error:
shouldInvokeService(org.camunda.bpm.example.servicetask.soap.ServiceTaskSoapTest)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
at org.camunda.bpm.engine.impl.juel.AstMethod.invoke(AstMethod.java:79)
at org.camunda.bpm.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
at org.camunda.bpm.engine.impl.juel.AstMethod.invoke(AstMethod.java:79)
at org.camunda.bpm.engine.impl.juel.AstMethod.eval(AstMethod.java:75)
at org.camunda.bpm.engine.impl.juel.AstEval.eval(AstEval.java:50)
at org.camunda.bpm.engine.impl.juel.AstNode.getValue(AstNode.java:26)
at org.camunda.bpm.engine.impl.juel.TreeValueExpression.getValue(TreeValueExpression.java:114)
at org.camunda.bpm.engine.impl.delegate.ExpressionGetInvocation.invoke(ExpressionGetInvocation.java:33)
at org.camunda.bpm.engine.impl.delegate.DelegateInvocation.proceed(DelegateInvocation.java:39)
at org.camunda.bpm.engine.impl.delegate.DefaultDelegateInterceptor.handleInvocation(DefaultDelegateInterceptor.java:59)
at org.camunda.bpm.engine.impl.el.JuelExpression.getValue(JuelExpression.java:50)
... 137 more
Caused by: org.camunda.spin.spi.SpinDataFormatException: SPIN-01004 No matching data format detected
at org.camunda.spin.impl.logging.SpinCoreLogger.unrecognizableDataFormatException(SpinCoreLogger.java:55)
at org.camunda.spin.impl.SpinFactoryImpl.createSpinFromReader(SpinFactoryImpl.java:127)
at org.camunda.spin.impl.SpinFactoryImpl.createSpin(SpinFactoryImpl.java:50)
at org.camunda.spin.impl.SpinFactoryImpl.createSpinFromString(SpinFactoryImpl.java:103)
at org.camunda.spin.impl.SpinFactoryImpl.createSpin(SpinFactoryImpl.java:47)
at org.camunda.spin.Spin.S(Spin.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.camunda.bpm.engine.impl.juel.AstFunction.invoke(AstFunction.java:110)
at org.camunda.bpm.engine.impl.juel.AstFunction.eval(AstFunction.java:117)
... 152 more
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.
Please refer to C:\Users\mp4783\Downloads\camunda-bpm-examples-master\camunda-bpm-examples-master\servicetask\soap-service\target\surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5 seconds
[INFO] Finished at: Wed Nov 11 09:21:36 EST 2015
[INFO] Final Memory: 21M/219M
[INFO] ------------------------------------------------------------------------
C:\Users\mp4783\Downloads\camunda-bpm-examples-master\camunda-bpm-examples-master\servicetask\soap-service>
I can successfully build a war file and deploy it to the Camunda server. But when it is executed, you get errors similar to those see above.
mvn clean install -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.showdatetime=true -Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG -Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=DEBUG
The error message in the stack trace is misleading if this is the case. It's not the "S" function that is the problem, it is the response received from the outbound SOAP message. This problem has been suggested as one cause of this error in another post.
The call to the www.webservicex.net site works in our browsers because they are set up to go through the proxy server, while this example is not. So, in theory, this is actually sending out a SOAP message, which is all I asked it to do. It is just not handling an unexpected response gracefully.
When I substituted a SOAP message and endpoint URL for an internal system (one that would not require a proxy) and deployed it to the Camunda server, the process just hung and timed out. This is most likely because the WSSE security header wasn't in place or something.
Modeler provides no easy way to debug these situations.
I'll try to figure out how to make a proxy work so that I can at least see if this will actually work.
It took WireShark to figure this out.
POST /globalweather.asmx HTTP/1.1
Content-Type: application/soap+xml;charset=UTF-8;action="http://www.webserviceX.NET/GetWeather"
Transfer-Encoding: chunked
Host: www.webservicex.net
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.3.3 (java 1.5)
Accept-Encoding: gzip,deflate
15f
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:web="http://www.webserviceX.NET">
<soap:Header/>
<soap:Body>
<web:GetWeather>
<!--Optional:-->
<web:CityName>Berlin</web:CityName>
<!--Optional:-->
<web:CountryName>Germany</web:CountryName>
</web:GetWeather>
</soap:Body>
</soap:Envelope>
0
HTTP/1.0 302 Not Allowed
Location: http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html
Content-Type: text/html
Content-Length: 113
Your request is being redirected to :<a href="http://cso.att.com/FAQs/URLFiltering/ProxyWarning.html">here</a>.
mvn clean install -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.showdatetime=true -Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG -Dorg.apache.commons.logging.simplelog.log.org.apache.http.wire=DEBUG
I'm satisfied that it is at least trying to send and receive the SOAP messages and that the problem is with our proxy server. Because I'm not actually trying to reach an external web service, actually making the example work isn't as critical as porting my ActiveVOS workflow to Camunda.
If someone is inclined to help me, this workflow must do the following:
- The process on the Camunda server must "listen" as a web service with a SOAP interface (I even have a WSDL for what that interface should look like from ActiveVOS). It should be able to accept multiple requests, creating a separate process/task/instance for each. In other words, this process is persistent.
- An external application will POST a SOAP message to the interface's URL where it must be parsed into variables to be used later.
- Based upon the variables received (e.g. a server hostname and a service that needs to be checked), the process must execute an SSH session to a remote server (perhaps using JSch or simply java.io and a shell command (which is essentially what I do in ActiveVOS, although ActiveVOS provides a pre-built function to help).
- The stdout/stderr from that command must be received and parsed for a specific string (e.g. "httpd service is not running") and then go through a gateway to the next step.
- The process must again execute and SSH command to restart the process and parse the stdout/stderr and return code.
- Using the return code, we go through a gateway where if the return code is 0, we issue another SSH command to check the service status, and if it is not 0, we cut a ticket
- If we need to cut a ticket, then we create an appropriate SOAP message to our ticketing system to determine if the host has an existing, open ticket.
- We gateway based upon whether or not we receive a ticket number back. If we get a ticket number, we append the event to the existing ticket. If we don't get a ticket number back, we create a new ticket. These operations are performed by posting a SOAP message to our ticketing system's web service interface (hence my need to make this SOAP stuff work).
- The ticketing engine will send back a response which must be parsed for the transaction ID and/or the ticket number created, or it would send back an error message.
- The process would then be complete.
While I've looked at the soap-connector-with-ws-security example, I'm not sure all that is needed. We just need to POST the contents of soapEnvelope.ftl file to URL: http://ticketsys.inner.domain.com:7080/TktSvc/TktSoapPort
Request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>myuser</wsse:Username>
<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">password</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
<soapenv:Body>
<aotsTmWsUat:listTicketsRequest xmlns:aotsTmWsUat="http://aots.att.com/ticket/v1" xmlns:ns="http://cio.att.com/commonheader/v3" xmlns:tkns="http://tktsvc.aots.att.com/ticket">
<ns:WSHeader>
<ns:WSContext>
<ns:FromAppId>Camunda</ns:FromAppId>
<ns:SourceIPAddress>139.99.99.99</ns:SourceIPAddress>
</ns:WSContext>
</ns:WSHeader>
<aotsTmWsUat:listTicketsInput>
<tkns:FieldsList>
<tkns:String>TicketNum</tkns:String>
</tkns:FieldsList>
<tkns:SortTupleList>
<tkns:SortTuple>
<tkns:Name>TicketNum</tkns:Name>
<tkns:Order>D</tkns:Order>
</tkns:SortTuple>
</tkns:SortTupleList>
.....
Response:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<p620:listTicketsResponse xmlns:p882="http://cio.att.com/commonheader/v3" xmlns:p620="http://aots.att.com/ticket/v1">
<p882:WSResponseHeader/>
<p620:listTicketsOutput xmlns:p735="http://tktsvc.aots.att.com/ticket">
<p735:RequestId>x123456789O</p735:RequestId>
<p735:TicketInfoList>
<p735:TicketInfo>
<p735:TicketNum>000000123456789</p735:TicketNum>
<p735:FieldTupleList>
<p735:FieldTuple>
<p735:Name>TicketNum</p735:Name>
<p735:Value>000000123456789</p735:Value>
</p735:FieldTuple>
</p735:FieldTupleList>
<p735:AssetID>CAMUNDA</p735:AssetID>
However, the parsing of the response is failing. I cannot find any documentation on the syntax you use inside the bpmn file:
<![CDATA[ ${XML(response)
.childElement("Body")
.childElement("http://www.webserviceX.NET", "GetWeatherResponse")
.childElement("GetWeatherResult")
.textContent()}
]]>
Where can I find a reference for how this is supposed to work. The response from our ticketing system is far more complex than that returned by webservicex. We cannot figure out how to use ".childElement" properly as there is no reference to it's use in the Spin documentation.
For example, our ticket system output uses 8 different namespaces. How do we represent that?
Thank you.
I downloaded the ZIP and imported to my Eclipse IDE where i have Camunda modeller.
Thing is Maven install was able to generate a Jar file .But when i placed the jar in deployment folder .deployment file generated.
But if i go to taskList , And click on start process i dont see its listing there.Basically i dont see .bpmn file when start my jboss server.
Please post me update to resolve the issue.
Thanks
Bhanu