[activiti6]调用WebService几个坑

核能气质少年 提交于 2020-03-12 22:21:00

[activiti6]几个报错解决

运行test webservice

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

先不使用PluggableActivitiTestCase,还是直接用srpingboot的test(原来放在test里不行,放src)。

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:,直接增加看看:不行。

Caused by: org.xml.sax.SAXParseException; lineNumber: 50; columnNumber: 57; UndeclaredPrefix: 无法将 'tns:createMpcItem' 解析为限定名: 未声明前缀 'tns'。

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,要指定版本!
  • 解决了!!!我的天,搞了一下午。
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!