David,
You are right !!
I found the sample code in http://advantage.webmethods.com and I’m pasting the same here.
For those who want to invoke a remote service using webM Java API
////////////////////////////
String host = “remoteserver:5555”;
String user = “remoteuser”;
String pass = “password”;
String ifc = “folder”;
String svc = “serviceName”;
Context c = null;
try {
c = new Context();
c.connect(host, user, pass);
ValuesEmulator.put(pipeline, “result”, c.invoke(ifc, svc, IDataFactory.create()));
c.disconnect();
} catch (Exception e) {
if (c != null) {
try {
c.disconnect();
} catch (Exception ee) {
// ignore this…
}
}
throw new ServiceException("Error during invoke: " + e.getMessage());
}
///////////////////////////
This code doesn’t fetch output from the remote service.
Hope this helps…
Thanks everybody !!
Venkat
#webMethods#Flow-and-Java-services#Integration-Server-and-ESB