IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only
  • 1.  Check license programmatically

    Posted Tue June 18, 2019 08:51 AM

    Hey Guys
    I’m looking for way to check license by script, I need to check a license of 200 IS so do it by hand is a quite an issue

    Many Thanks for any sugestion


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Check license programmatically

    Posted Tue June 18, 2019 09:53 AM

    Hi Marcin,

    Can you please provide more information on what exactly you want to check through license file?

    Thanks,
    -Kalpesh.


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Check license programmatically

    Posted Tue June 18, 2019 10:15 AM

    just an expidation date and license key


    #Integration-Server-and-ESB
    #webMethods


  • 4.  RE: Check license programmatically

    Posted Tue June 18, 2019 04:00 PM

    You could use wm.server.query:getLicenseSettings, wm.server.query:getLicenseDetails services. Please note that standard caveat about utilizing WmRoot services applies here as well.


    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Check license programmatically

    Posted Wed June 19, 2019 05:51 AM

    Could you please send more details how to use this services ?


    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: Check license programmatically

    Posted Thu June 20, 2019 07:37 PM

    You would invoke these services as any other IS services. Please try invoking these service from Designer or Admin UI and you would get the details about the information that these services provides.

    Regards,
    -Kalpesh.


    #webMethods
    #Integration-Server-and-ESB


  • 7.  RE: Check license programmatically

    Posted Sat June 22, 2019 03:15 AM

    To make WmRoot visible on your Desinger package navigator, add the below setting on “Settings > Extended” (refersh designer) and use the serivce as suggested by other experts. Note, this is a internal service and might change anytime without prior notice or documentation hence use it at your own risk.

    watt.server.ns.hideWmRoot=false

    Any questions?


    #webMethods
    #Integration-Server-and-ESB


  • 8.  RE: Check license programmatically

    Posted Sat June 22, 2019 07:20 PM

    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