[activiti6]調用WebService幾個坑

[activiti6]幾個報錯解決java

運行test webservice

org.activiti.engine.ActivitiException: no default process engine available
	at org.activiti.engine.impl.test.PluggableActivitiTestCase.initializeProcessEngine

先不使用PluggableActivitiTestCase,仍是直接用srpingboot的test(原來放在test裏不行,放src)。web

Item reference is invalid: not found

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': 
FactoryBean threw exception on object creation; nested exception is org.activiti.engine.ActivitiException: Errors while parsing:
[Validation set: 'activiti-executable-process' | Problem: 'activiti-message-invalid-item-ref'] : 
Item reference is invalid: not found - [Extra info : ] ( line: 72, column: 54)

看官網有tns:,直接增長看看:不行。spring

Caused by: org.xml.sax.SAXParseException; lineNumber: 50; columnNumber: 57; UndeclaredPrefix: 沒法將 'tns:createMpcItem' 解析爲限定名: 未聲明前綴 'tns'。maven

Could not find importer for type http://schemas.xmlsoap.org/wsdl/

org.activiti.engine.ActivitiException: Could not find importer for type http://schemas.xmlsoap.org/wsdl/
	at org.activiti.engine.impl.bpmn.behavior.WebServiceActivityBehavior.fillImporterInfo
  • 看源代碼fillImporterInfo。
  • 必須寫http://schemas.xmlsoap.org/wsdl/,把異常隱藏了,暈。
  • CxfWSDLImporter.java是cxf的,難道沒引入jar的緣故???
  • wsdlImporterClass = Class.forName("org.activiti.engine.impl.webservice.CxfWSDLImporter", true, Thread.currentThread().getContextClassLoader());
  • 知道了,是的。
  • activiti-cxf,maven庫裏是unknown,要指定版本!
  • 解決了!!!個人天,搞了一下午。
相關文章
相關標籤/搜索