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.

 View Only
  • 1.  Reading webMethods Flow/Java Service Signature from Stand Alone Client

    Posted Sat January 03, 2015 10:29 AM

    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


    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Reading webMethods Flow/Java Service Signature from Stand Alone Client

    Posted Sat January 03, 2015 05:55 PM

    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.


    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Reading webMethods Flow/Java Service Signature from Stand Alone Client

    Posted Sun January 04, 2015 01:39 PM

    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


    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Reading webMethods Flow/Java Service Signature from Stand Alone Client

    Posted Sun January 04, 2015 03:25 PM

    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.


    #Integration-Server-and-ESB
    #webMethods


  • 5.  RE: Reading webMethods Flow/Java Service Signature from Stand Alone Client

    Posted Mon January 05, 2015 06:14 AM

    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


    #Integration-Server-and-ESB
    #webMethods


  • 6.  RE: Reading webMethods Flow/Java Service Signature from Stand Alone Client

    Posted Mon January 05, 2015 10:24 AM

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

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods


  • 7.  RE: Reading webMethods Flow/Java Service Signature from Stand Alone Client

    Posted Mon January 05, 2015 11:14 AM

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


    #Integration-Server-and-ESB
    #webMethods