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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Setting up Java broker client

    Posted 09/15/15 06:17 AM

    Hi,

    I’m trying to create a Broker Client for subscribing to documents in the Dead Letter Queue.
    However, my packages are not being recognized.

    import COM.activesw.API.client.BrokerAdminClient;
    import COM.activesw.API.client.BrokerClient;
    import COM.activesw.API.client.BrokerException;
    import COM.activesw.API.client.BrokerEvent;
    (These are not recognized)

    I have the wm-brokerclient.jar file in the following paths:
    C:\SoftwareAG\common\lib
    I also tried adding it to my IS instance jar
    C:\SoftwareAG\IntegrationServer\instances\default\lib\jars

    It is not recognizing.

    What Am I missing ?

    I’m using wM 9.6


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Setting up Java broker client

    Posted 09/15/15 07:01 AM

    Also try here \IntegrationServer\lib\jars\

    And restart the IS.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 3.  RE: Setting up Java broker client

    Posted 09/15/15 07:05 AM

    Sorry the jar wm-brokerclient.jar must be already in the server class path. Can you check here http://localhost:5555/WmRoot/server-environment.dsp

    You must add this to your designer locally in package explorer… Read “To add classes and jar files to the Service Development Project”

    Page 318 from 9-8_Service_Development_Help


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 4.  RE: Setting up Java broker client

    Posted 09/15/15 09:17 AM

    Hi Mahesh,
    Thanks for the reply.
    I actually can’t see the broker client the jar in http://localhost:5555/WmRoot/server-environment.dsp
    So I must add it as per the docs.

    The docs says I must create a project with Package_name[Server_Name_PortName] in the service development perspective. I’m not able to follow. Should create a new structure in my package explorer ?

    Any help is appreciated!


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 5.  RE: Setting up Java broker client

    Posted 09/15/15 09:42 AM

    Hi Abhilash,

    are you using Local Service Development or are you using the Designer to develop on a remote IS?

    In the later case you can ignore these messages, but the service will still compile successfully on the IS.

    The jar needs to be loaded together with IS as otherwise it will not be able to connect to broker itself.

    Regards,
    Holger


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 6.  RE: Setting up Java broker client

    Posted 09/15/15 11:35 AM

    Thank you. I was able to add the jars in the JAVA development perspective, if that’s what it’s called.


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods


  • 7.  RE: Setting up Java broker client

    Posted 09/15/15 11:42 AM

    Now I am able to successfully create a client and subscribe to all documents.
    The following code is doing that.

    String broker_host = "localhost:6849";
    String broker_name = null;
    String client_group = "eventLog";
    BrokerClient c;
    try {
    c = new BrokerClient(broker_host, broker_name, null,
    client_group, "Publish Sample #1",null);
    } catch (BrokerException ex) {
    com.wm.util.JournalLogger.log(3,90,3,"LOG111"+ex  );
    return;
    }
    
    /* Create a deadletter subscription for all event types*/
    
    try {
    c.newSubscription("*","{hint:DeadLetterOnly}");
    
    //System.out.println(c);
    } catch (BrokerException e) {
    com.wm.util.JournalLogger.log(3,90,3,"Catch block"+e  );
    // TODO Auto-generated catch block
    e.printStackTrace();
    }
    

    I can see the documents entering the above mentioned client and the client group in MWS.

    Now, my next question is how do I retrieved the published documents back ?
    Any leads are appreciated!


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods