Advertisement

Responsive Advertisement

Java Service to Reset the Service Cache - webMethods Integration Server

Hi Everybody , I am going to present you the java service which you can use to reset the service cache of any particular service . This java service uses the WmRoot services to reset the service cache.The java service uses the following WmRoot service "wm.server.cache:resetCache" to reset the service cache.

The java code is mentioned below :-

public static final void resetCache(IData pipeline) throws ServiceException {
try{
String serviceToReset="GIVE THE SERVICE NAME";
                        //WmRoot service which should be invoked to reset the service cache
String serviceToInvoke="wm.server.cache:resetCache";
String resetSuccess="false";

IData input=IDataFactory.create();
IDataCursor inputCursor=input.getCursor();
IDataUtil.put(inputCursor,"serviceName", serviceToReset);

NSName serviceToInvokeName=NSName.create(serviceToInvoke);

Service.doInvoke(serviceToInvokeName, input);
resetSuccess="true";

// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
IDataUtil.put( pipelineCursor, "resetSuccess", resetSuccess );
pipelineCursor.destroy();

}
catch(Exception e)
{
e.printStackTrace();
}

}




Enjoy Reading , If you have any Question related to webMethods please comment below , I will try to answer the questions.Please Subscribe for latest update on the blogs

Post a Comment

0 Comments