Announcement

Collapse
No announcement yet.

How can I send a Value Object Array from soap sender to a webservice?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How can I send a Value Object Array from soap sender to a webservice?

    Hi, I need send a array of value objects from soap sender to a webservice. In the transformer, I going to do something how this


    var i = 0;
    var object = new Packages.com.hl7.SoftwareVO();
    var arrayL= new Packages.java.util.ArrayList();

    while(tmp['SFT'][i]!=null) {
    object.setSoftwareName(tmp['SFT'][i]['SFT.3']);
    arrayL.add(object);
    i++;
    }

    var array= arrayL.toArray();
    localMap.put('ARRAY', array);

    How could I pass this array to a webservice? Is it possible in Mirth?

  • #2
    Re: How can I send a Value Object Array from soap sender to a webservice?

    First of all, localMap doesn't copy array values:

    Code:
    localMap.put('ARRAY', array);
    Will not work. You would need to map each value of the array to a local variable.




    Comment


    • #3
      Re: How can I send a Value Object Array from soap sender to a webservice?

      You can also build the XML for the array in the transformer and place that into the localMap.

      -Chris
      Chris Lang

      Comment


      • #4
        Re: How can I send a Value Object Array from soap sender to a webservice?

        Thanks Chris, I will follow this way.

        Comment

        Working...
        X