How to call a java service from another java service

I have a setup of


In the code of java_service3 I want to call java_service2. I have existing code that calls this like the following but it lists it as an undefined function (red underline). When I debug this code it highlights the call in green and then errors out on the next step. I am not sure why this is not working but this service when run does run…

Should this be a valid way to call a java service from a java service?

if (expire == 0) {

You can try using Service.doInvoke() to invoke a java service from another java service. For more information, please check the webmethods java API.


In generate code option …select the type2 as select this service for calling from other service and then paste that generated code in the actual or destination service. And pass the arguments as you want.