While building servicetask\soap-service getting below error.Code downloaded from github.Appricaite your help


#21

Hi Kristin,

Using same script,

var table = execution.getVariable(‘Table’);
// remove the process variable because after finishing the service task
// “Get Weather Forecast” the engine tries to write the “table” variable in the history
// but the history field is to small for the big XML result
execution.removeVariable(‘Table’)
//print('TABLE: ’ + table);
S(table).xPath(‘string(/NewDataSet/Table[1]/City[1])’).string();


#22

Hi @kedarik,

when do you get this exception? What are the steps to reproduce it?

Cheers
kristin


#23

Hi Kristin,

Thanks for prompt response.

  1. Created one user task to enter country.
  2. Once enter country and submisssion of usertask, —>Service Task. Here Only calling service task and strucked in the same user task.
  3. All are in war file.
    Regards,
    Kedari

#24

Hi @kedarik,

it should be the same like before. Could you please share the process with the new user task? Do you use the same process variable names?

Cheers
kristin


#25

Hi Kristin,

PFA process.

invokeSoapService.bpmn (9.3 KB)

And usertask html is…

City Name
Country

Regards,
kedari


#26

Hi @kedarik,

I can’t see the problem. Could you please provide your HTML form? On which application server do you make the deployment of this app?

Cheers
kristin


#27

Hi Kristin,

Application: camunda-bpm-tomcat-7.8.0-alpha6 for windows

And html is

<form name="approveLoan">
 <div class="form-group">
    <label for="cityName">City Name</label>
    <input class="form-control" cam-variable-type="String" cam-variable-name="cityName" name ="cityName" />
  </div>
  <div class="form-group">
    <label for="country">Country</label>
   	<input class="form-control" cam-variable-type="String" cam-variable-name="country" name="country"/>
  </div>
   
</form>

#28

Hi @kedarik,

I could find the problem in the process. The response of the service task is saved in the process variable “Table”. After that, the engine would like write this variable in the history. But the “Table” variable contains the whole response of the soap call and this is to much for the defined database column.

The solution is to change the output parameter of the service task. For that, I renamed the output parameter from “Table” to “City”, changed the type to “Script” and call the external script “parseTemperature.js”.
It is necessary to change a bit the “parseTemperature.js”. It contains now the following code.

var table = S(response)
    .childElement("Body")
    .childElement("http://www.webserviceX.NET", "GetCitiesByCountryResponse")
    .childElement("GetCitiesByCountryResult")
    .textContent();

print('TABLE:' + table);

S(table).xPath('string(/NewDataSet/Table[1]/City[1])').string();

With these changes, you can set the “City” process variable directly from the script to the output parameter of the connector.
At least, delete the output parameter which is configured in the “Input/Output” tab.

To be sure, you can understand what I mean, look into the process file.
invokeSoapService_1.bpmn (8.9 KB)

Cheers
kristin


#29

Hi Kristin,

Thanks for your support

regards,
kedari


#30

Hi Kristin,

FYI

I just played around a little bit and it looks like this error is possible also when not all dependecies are present.

I use custom spring boot runtime, javascript for response handling - and I did forgot to import some Spin dependencies (Art.Id camunda-spin-dataformat-all). Comiple and deploy phases were good but rutime failed at certain point - Spin plugin dependencies were not completely present.

Cheers
jurica


#31

Hi Kedarik,

Could you please share the source code for weather soap service.

Thanks and Regards,
muru.


#32

Hi Kedarik,

Could you please share the source file for this sample

Thanks
Muru


#33

Hi Kristin,

I am facing issues with Soap Service example. I am facing the error as below.

shouldInvokeService(org.camunda.bpm.example.servicetask.soap.ServiceTaskSoapTest): Error while evaluating expression: ${S(response)(…)

Thanks and Regards,
Murugesan