cancel
Showing results for 
Search instead for 
Did you mean: 

How to call a Web Service in Activiti?

zlatan316
Champ on-the-rise
Champ on-the-rise
Hi,

I'm trying to read some data from a Sharepoint and have created a Java class that can do this outside of Activiti.

I am now trying to get this to work within Activiti, but I keep getting the below error:

08:42:27,658 [http-8080-4] INFO  org.activiti.engine.impl.bpmn.deployer.BpmnDeployer  - Processing resource LiveSharepointReader.bpmn20.xml
08:42:27,801 [http-8080-4] ERROR org.activiti.engine.impl.interceptor.CommandContext  - Error while closing command context
org.activiti.engine.ActivitiException: Errors while parsing:
Could not find importer for type http://schemas.xmlsoap.org/wsdl/ | line 3 | column 5
Could not import item of type http://schemas.xmlsoap.org/wsdl/ | line 3 | column 5


The code I added to my BPMN XML is as below

<import importType="http://schemas.xmlsoap.org/wsdl/"
          location="https://sp.kompany.com/sites/Global/_vti_bin/Lists.asmx?wsdl"
          namespace="http://schemas.microsoft.com/sharepoint/soap/" />


Can anyone tell where I am going wrong, or if there is an easy way to run a Web Service in Activiti?

With Regards
2 REPLIES 2

pmsevestre
Champ in-the-making
Champ in-the-making
I don´t think is a good idea to import the wsdl definition directly into the bpm definition. I do a lot of WS calls from my flows, but I´ve always used custom Java classes invoked as aSystem Task or Groovy scripts.

Would you be able to provide a working example of a Web Service being called as a Service Task within Activiti? I've tried doing this but I keep getting a "401 - Unauthroized" error when the code tries to authenticate the Web Service.