Calling a Java service

Hi

How to call a my own java service with in another java service? :confused:

Thanks in advance

How do you invoke a built-in service within your Java service?

Same answer applies to your question.

http://techcommunity.softwareag.com/ecosystem/documentation/webmethods/wmsuite8_ga/Developer/8-0-SP1_Integration_Server_Java_API_Reference/com/wm/app/b2b/client/Context.html#invoke(com.wm.lang.ns.NSName, com.wm.data.IData)

If your java services are in the same directory you can call them directly with their name and with an iData in parameter.

ex:
with a java service named java1
with a java service named java2

inside java1 just call

java2(pipeline);

but not sure it’s a good practice.

Service.doInvoke() which is present in the package com.wm.app.b2b.server.Service
please see the api to use this method doInvoke()

wM pros please correct me if I am wrong

Yes, you are correct, doInvoke() will invoke any service with the given input parameaters, which is published to the server.