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.  Threaded invoke how to validate service to be invoked

    Posted Tue June 24, 2003 06:48 PM

    I’m working on a java service that uses com.wm.app.b2b.server.Service
    doThreadInvoke(com.wm.app.b2b.server.NSName svc, IData input).

    I want to add error handling to ensure that the requested service exists before I attempt to invoke it.

    The NSName class does not seem to be documented in the API docs. Does anyone have ideas on how to tell if an NSName (folder:serviceName) is valid? Is there a way to look it up in the service registry?

    Mark


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 2.  RE: Threaded invoke how to validate service to be invoked

    Posted Tue June 24, 2003 07:28 PM

    Try this:

    NSName nsname = NSName.create(folderName, serviceName); 
    Namespace namesp = Namepace.current(); 
    if(namesp.nodeExists(nsname)) 
    // service exists

    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 3.  RE: Threaded invoke how to validate service to be invoked

    Posted Tue June 24, 2003 08:17 PM

    Rob,

    Thanks! Makes sense. I’ll give it a shot.

    Where did you find the docs on nodeExists()?

    Mark


    #webMethods
    #Flow-and-Java-services
    #Integration-Server-and-ESB


  • 4.  RE: Threaded invoke how to validate service to be invoked

    Posted Tue June 24, 2003 09:28 PM

    Follow up.

    This worked great, but I did have to import com.wm.app.b2b.server.ns.Namespace rather than com.wm.lang.ns.Namespace to get access to the current() method.

    Mark


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 5.  RE: Threaded invoke how to validate service to be invoked

    Posted Tue July 12, 2005 09:59 PM

    Two years went by, and I forgot I had this solution (thanks to Rob). The attached java fragment works on IS 6.1

    Mark

    Code fragment for isValidService java service
    isValidService_frag.java (1.3 k)


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods