Try this Java service to retrieve license key and expiration date.
import com.wm.app.b2b.server.lic.ComponentInfo;
import com.wm.app.b2b.server.lic.KeyInfo;
String licenseKey = null;
String expirationDate = null;
for (ComponentInfo componentInfo : KeyInfo.getComponentInfo()){
if (componentInfo.getComponentName().equals("SalesInfo")){
IDataCursor componentInfoCursor = componentInfo.getComponentInfo().getCursor();
IData salesInfo = IDataUtil.getIData(componentInfoCursor, "Sales Information");
componentInfoCursor.destroy();
IDataCursor salesInfoCursor = salesInfo.getCursor();
licenseKey = IDataUtil.getString(salesInfoCursor, "License Key");
salesInfoCursor.destroy();
}
if (componentInfo.getComponentName().equals("ProductInfo")){
IDataCursor componentInfoCursor = componentInfo.getComponentInfo().getCursor();
IData productInfo = IDataUtil.getIData(componentInfoCursor, "Product Information");
componentInfoCursor.destroy();
IDataCursor productInfoCursor = productInfo.getCursor();
expirationDate = IDataUtil.getString(productInfoCursor, "Expiration Date");
productInfoCursor.destroy();
}
}
IDataCursor pipelineCursor = pipeline.getCursor();
IDataUtil.put(pipelineCursor, "licenseKey", licenseKey);
IDataUtil.put(pipelineCursor, "expirationDate", expirationDate);
pipelineCursor.destroy();
#Integration-Server-and-ESB#webMethods