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
Expand all | Collapse all

Copy Java Source to an another Package

  • 1.  Copy Java Source to an another Package

    Posted Mon June 19, 2006 01:37 PM

    Hello everyone,

    I would like to know the steps to copy a Java Service (Package A)to an another Package (Package B).
    The problem is that I don’t know where to put the classe of my Java Service in the destination folder. I know that it’s in “packages\myPackageName\code\classes” but when I compile my service that uses this java service, it doesn’t find. I’ve got the following alert:

    symbol : variable NSNodeHelper

    location: class Capgemini_Test_Module

        IData data = NSNodeHelper.getNodeInfo(nsname);
    
    ^
    

    1 error

    Thank you for your answers. If you want more explanations, tell me, I’ll try to explain my problem clearer.


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


  • 2.  RE: Copy Java Source to an another Package

    Posted Mon June 19, 2006 02:15 PM

    Hi Chacha,
    After copying the NSNodeHelper.class to the destination packages\myPackageName\code\classes" , did you reload the package myPackageName?

    On a side note: You can directly invoke the Java service getNodeInfo in PkgA from any other Java service in other packageB without moving the class file to PackageB.

    HTH,
    Bhawesh.


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


  • 3.  RE: Copy Java Source to an another Package

    Posted Mon June 19, 2006 02:20 PM

    Hi bsingh,
    Thank you for your answer. Yes I’ve already reload the package with the java class added. In fact I want this class in a specific package because this one will be loaded in different IS Server. In this way I will have to load one package instead of loading different packages.


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


  • 4.  RE: Copy Java Source to an another Package

    Posted Mon June 19, 2006 02:23 PM

    Hi Chacha,
    Did you also import this class NSNodeHelper in the java serviceB in PkgB?


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


  • 5.  RE: Copy Java Source to an another Package

    Posted Mon June 19, 2006 02:34 PM

    No that’s the problem. If you want, I’ve added the link to the package that contains the service that I want to copy:
    [URL=“http://advantagebv.webmethods.com/servicepacks/SAMPLE-20051201-143934/WmDoc.zip”]http://advantagebv.webmethods.com/servicepacks/SAMPLE-20051201-143934/WmDoc.zip[/URL]
    It’s a WM package: WM Doc. I want the copy of java service ‘getNodeData’ in a different package. In its java source, the imports don’t indicate a link to NSNodeHelper that’s my problem. I don’t know how WM do the link.


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


  • 6.  RE: Copy Java Source to an another Package

    Posted Mon June 19, 2006 02:52 PM

    In this WmDoc.zip I see that the NSNodeHelper.class exists in packages\WmDoc\code\classes\pub\doc


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


  • 7.  RE: Copy Java Source to an another Package

    Posted Mon June 19, 2006 03:00 PM

    That’s right but this class is not in the “imports” of the java service “pub.doc.ui.getNodeData”

    Do you know how WM find this class. Is there a WM class loader specific?


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


  • 8.  RE: Copy Java Source to an another Package

    Posted Mon June 19, 2006 04:11 PM

    I found the solution.
    Tips: Put the source code of the selected service in a jar and save it in the folder:
    packages\namePackage\code\jars

    Thank you bsingh for your answers. :wink:


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


  • 9.  RE: Copy Java Source to an another Package

    Posted Mon June 19, 2006 04:48 PM

    That’s certainly an answer but not the greatest. Everyone gets so wrapped up in Java code that they forget that Integration Server uses other files to define services. The easiest way to move a service from one package to another is to use Developer to copy/paste or drag/drop the service. This will move all the files, including the node.ndf file (which defines the service) that you apparently have been missing.

    If you must move things at the file level by hand, you’ll want a better understanding of the files involved before doing so.


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