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.  Convert IData into BrokerEvent

    Posted Fri July 17, 2009 02:52 PM

    Hi all,

    I want to publish a document using an external java client without going throught an IS, by that I mean I want to use the BrokerClient class in order to directly connect to the Broker.

    The publish methods signature of the BrokerClient class is “void publish(BrokerEvent event)”. The problem that I am facing is that I have built an IData and not an Event and I cannot find how to build an Event from using my IData.

    Do you have a piece of code that I can use as an example?

    In advance, thank you.


    #webMethods
    #Universal-Messaging-Broker
    #broker
    #Integration-Server-and-ESB


  • 2.  RE: Convert IData into BrokerEvent

    Posted Fri July 17, 2009 03:28 PM

    Have you investigated changing the code to build a BrokerEvent instead of IData? The steps are very similar.


    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #broker
    #webMethods


  • 3.  RE: Convert IData into BrokerEvent

    Posted Fri July 17, 2009 04:04 PM

    yes it is possible, so my event should have the same structure as the Document Type so that the existing Broker client pick it up form its queue.

    I am not really familiar with the Broker API, that’s why I started working with IData, and than noticed that I need to build an event for the publish method.

    Can you please point me on the appropriate methods, or maybe do you have a piece of code I can use as an example to build an event that will contain a String field and a Document that contains 2 String fields for example ?

    In advance, thaks for your help on this.


    #Integration-Server-and-ESB
    #webMethods
    #Universal-Messaging-Broker
    #broker


  • 4.  RE: Convert IData into BrokerEvent

    Posted Fri September 18, 2009 03:04 PM

    Documentation and examples for the Broker API are delivered together with the Broker installation and can be found in the Broker installation directory. I used the examples there myself and think they are sufficient for creating broker clients in C or Java.


    #webMethods
    #broker
    #Universal-Messaging-Broker
    #Integration-Server-and-ESB


  • 5.  RE: Convert IData into BrokerEvent

    Posted Wed March 10, 2010 12:59 AM

    Hello,

    I am facing the similar issue. I have a broker event containts structure type.I need to use the BrokerEvent.setStructFieldFromEvent method to convert the IDATA to broker event. Does any one know? earlier we have the methods fromObject but it is deprecated. If any one has sample code can you please post?

    -Sai


    #webMethods
    #Universal-Messaging-Broker
    #broker
    #Integration-Server-and-ESB


  • 6.  RE: Convert IData into BrokerEvent

    Posted Mon July 19, 2010 06:53 PM

    Hi,

    I have written the attached code sometime back. Hope its useful for you.

    P.S.: To be able to attach the file, I have changed its extension to ‘txt’. Please change it to ‘java’.

    Regards,
    Hemanth
    CanonicalToBrokerEvent.txt (2.47 KB)


    #webMethods
    #Universal-Messaging-Broker
    #broker
    #Integration-Server-and-ESB


  • 7.  RE: Convert IData into BrokerEvent

    Posted Mon June 22, 2015 11:51 AM

    Thanks a lot Hemanth for code to convert IData to BrokerEvent. Its working perfectly and I have updated only few things in same code.
    Updated not to use “Class ValuesEmulator” and updated code to handle String List and String separately.

    Best Regards,
    Uday
    IDataToBrokerEvent.txt (3.32 KB)


    #webMethods
    #Universal-Messaging-Broker
    #Integration-Server-and-ESB
    #broker