Reading webMethods Flow/Java Service Signature from Stand Alone Client

Hello,
I have a need to read webMethods service (Java, Flow, etc…) signature (Input/Output) from a stand alone java program. This program can’t run on IS and has to be executed independently on a different machine/JVM.
I tried using NSService, Namespace, etc… API but all demand to be executed on the IS where the service exists.
Can anyone suggest some way/steps on how to go about achieving it.
Please feel free to ask for details if need is not clear.

Regards,
Manoj

Create a service which does all you need (e.g takes a service name as the input and delivers the information about the service signature) and call the service from the standalone program. In the service (which is executed on IS), you can use all the mentioned classes.

Thanks for the feedback, requirement is read the service signature from a remote IS, on which there is no access to carry out any kind of development.
So, need to write a client that connects to IS (Using provided credentials) and invoke the service. For that need to parse the service signature to form input and process output.

Regards,
Manoj

Then I think your best bet is to investigate services in WmRoot and try to find the service(s) giving you that data. I don’t know whether such services exist. But I think they should since some clients (e.g. the designer) do display service signatures somehow.

Found the solution…Code snippet…

import com.wm.lang.ns.Namespace;
import com.wm.lang.ns.*

Context context = new Context();
context.connect(host, port, user, pass);
NSNode nsNode = context.getNamespace().getNode(NSName.create(serviceName));
if (nsNode instanceof NSService){
NSService serviceNode = (NSService)nsNode;
NSSignature serviceSignature = serviceNode.getSignature();
if (serviceSignature != null){
IDataUtil.put(pipelineInputCursor, “serviceInput”, serviceSignature.getInput().getValues());
IDataUtil.put(pipelineInputCursor, “serviceOutput”, serviceSignature.getOutput().getValues());
}
}

Regards,
Manoj

Glad to hear you found the resoution self :slight_smile: and thanks for update the thread back:

HTH,
RMG

Cool! This method is not even documented in the official IS Java API (I mean the class com.wm.app.b2b.client.Context)!