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

How to test if a XopObject is set?

  • 1.  How to test if a XopObject is set?

    Posted Thu October 18, 2018 01:58 PM

    Hi,

    Could you tell me how to verify with a simple java service if an input Xop Object var is set and not null please?

    I’ve tried this :

    
    byte[] bytes = null;
    try {
    if (idcPipeline.first("bytes")) {
    bytes = (byte[]) idcPipeline.getValue();
    if (xop == null) {
    ... 

    and this :

     
    Xop Object xop = null;
    try {
    if (idcPipeline.first("bytes")) {
    XOPObject xop = (XOPObject) idcPipeline.getValue();
    if (xop == null) {
    ... 

    But each time that says that the tested var is null.
    Do I need to read the stream?

    I would be grateful for any suggestion or code example please.

    Regards


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


  • 2.  RE: How to test if a XopObject is set?

    Posted Thu October 18, 2018 04:32 PM

    I’ve found by myself… it works.

    Sorry I probaby missed my initial test.

    
    if (idcPipeline.first("xop")) {

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