Service Virtualization

Expand all | Collapse all

Multi-field Tibco randezvous publisher

Jump to Best Answer
  • 1.  Multi-field Tibco randezvous publisher

    Posted 04-26-2018 09:17 AM

    Hi Team,

    in my test case i need to publish a rendezvous message composed by two fields: ENVELOPE and PAYLOAD.

    The PAYLOAD type is String (it is an XML), but the ENVELOPE has to be a com.tibco.tibrv.tibrvmsg object (the customer tibco adapter is expecting to receive a message like that....).

    If a try to set up a tibco publisher using Mapped (Extended) option, i have the following type options to select:

    Is it possible to define a custom type for my tibrvmsg field?


    Thanks in advance.


  • 2.  Re: Multi-field Tibco randezvous publisher

    Posted 04-26-2018 01:06 PM

    I don't understand the question.  The TIBCO RV step always sends messages wrapped in a com.tibco.tibrv.TibrvMsg object.  That's how the TIBCO RV client API works. 


    I don't know what "ENVELOPE" is supposed to mean, but I don't see anything with that name in the API or documentation.

  • 3.  Re: Multi-field Tibco randezvous publisher

    Posted 04-27-2018 06:53 AM

    Kevin i know, it looks strange, but the customer is using a nested message format, with a tibrvmsg inside a parent tibrvsmg.....I don't know why, but that's it . I'll be at customer side next week; i'll try to collect more info.


    Thanks again,


  • 4.  Re: Multi-field Tibco randezvous publisher
    Best Answer

    Posted 04-27-2018 12:49 PM

    Sigh.  Okay, so after digging into the TIBCO code itself a bit more I found something called an "Envelope".  TibrvMsg.setEnvelope() and TibrvMsg.getEnvelope(), and it's value is another TibrvMsg object.  Assuming this is what they're talkign about, it's not a mapped message field.  It's a completely separate, apparently optional part of TibrvMsg.


    The short answer is we don't support this.  The feature is so obscure and weird that the first relevant hit on Google is the CA Communities forum thread you are reading right now. 


    The long answer is that they can use a Script step to construct a TibrvMsg object however they want, save it into a testExec property, select "Object" for Publisher Info -> Message, and finally enter the testExec property name in the Send Message Data tab.  This means the *entire* message, the "outer" TibrvMsg along with the "envelope" TibrvMsg, must be constructed by hand in the script step, but it's at least possible.

  • 5.  Re: Multi-field Tibco randezvous publisher

    Posted 05-07-2018 05:10 AM

    Thank you Kevin. 

    I'm trying to construct the message using a script, but i don't see any setEnvelope method for TibrvMsg class; can you please share where did you find Envelope setter and getter?

    I can see just a getEnvelope method that is "protected", so in theory not accessible from our script.


    Really thanks again for your support.



  • 6.  Re: Multi-field Tibco randezvous publisher

    Posted 05-07-2018 12:01 PM

    Oh, you're right, it is protected.  And a cursory sweep through that package with a decompiler doesn't turn up any obvious way to access it from outside the com.tibco.tibrv package.


    Look, I still can't find anything anywhere on the internet about TibrvMsg and "envelopes" besides this forum thread itself. There is no publicly available documentation, and every other hit for "envelope" is about SOAP Envelopes, which I don't believe are what you're talking about.  I've tried very hard to figure out what's going on, but it's clear I can't do it without your help.


    If you are trying to emulate something your application is doing, then we're going to have to see how your application does it.  Is it possible for you to share the actual code from your application that handles putting an "envelope" into a TibrvMsg object?

  • 7.  Re: Multi-field Tibco randezvous publisher

    Posted 05-10-2018 12:54 PM

    Hi Kevin,

    i don't know if it is formally correct (maybe it isn't..) but the following script seems to solve the issue (the message is processed correctly by the consumer adapter):


    import com.tibco.tibrv.TibrvMsg;
    //String myMessage = testExec.getStateValue("rv_request");
    String myMessage = "<StdIntervalBusinessSvcRequest xmlns:qb=\"\" xmlns=\"\"><qb:RequestId>B0105887-D</qb:RequestId><qb:MessageSrcSystem>MOB</qb:MessageSrcSystem><RequestType>D</RequestType><IntervalCriteria><SIBSProductType>DS0</SIBSProductType><Activity>N</Activity><BusinessSegCode>E</BusinessSegCode><ExpediteInd>Y</ExpediteInd></IntervalCriteria><DueDateCriteria><SentDate>2017-11-28</SentDate><SentTime>06:15:00.0</SentTime><DesiredDueDate>2017-12-05</DesiredDueDate></DueDateCriteria></StdIntervalBusinessSvcRequest>";
    TibrvMsg msg = new TibrvMsg();
    TibrvMsg envelope = new TibrvMsg();
    msg.add( "PAYLOAD", myMessage);
    testExec.setStateValue("rvMsg", msg);

    return msg.toString();


    So far it is the best workaround i found.


    Thank you for your support!



  • 8.  Re: Multi-field Tibco randezvous publisher

    Posted 05-11-2018 05:02 AM

    Hi Domenico --


    From your latest update, it looks like your problem was that a TibrvMsg message includes many name-value pairs of different types, and one of the types can be a TibrvMsg.


    If this is the case, I covered that by using recursion in my blog entry Service Virtualization using half-bridging (TIBCO Rendezvous)  where my response scriptable DPHs serialize TibrvMsg fields during generation and deserialize them during replay - I don't recall having the need to do it in requests, but it would be a small extension of the request-side scriptable DPH to add recursion for serializing embedded TibrvMsg fields.