title: Passing back Array from Java to ESQL in IIB
body: <p>I am looking to pass back the list of 'Userdefined' configuration list from Java to ESQL in IIB. I can pass back the single value but looking for the complete list. Below is the Java and ESQL code. Any inputs are much appreciated.</p>
  
  <p>ESQL code:</p>
  
  <pre><code>CREATE COMPUTE MODULE SiteCodeValdationRoutine_Compute
  CREATE FUNCTION Main() RETURNS BOOLEAN
  BEGIN
      CALL CopyEntireMessage();           
      CALL getSiteCodeProperties(Environment.MFT.Sitecode);   
      RETURN TRUE;
  END;
  
  CREATE PROCEDURE CopyEntireMessage() BEGIN
      SET OutputRoot = InputRoot;
  END;
  
  CREATE PROCEDURE getSiteCodeProperties( OUT Sitecode CHARACTER)
      LANGUAGE JAVA EXTERNAL NAME "com.nb.iib.util.SiteCodeParameterLookup.getSiteCodeParameters";
  END MODULE;
  </code></pre>
  
  <p>Java Code:</p>
  
  <pre><code>package com.nb.iib.util;
  
  import java.util.Properties;
  import com.ibm.broker.config.proxy.BrokerProxy;
  import com.ibm.broker.config.proxy.ConfigurableService;
  
  public class SiteCodeParameterLookup {
  
      public static void getSiteCodeParameters(String siteCodeArray[]) {
  
          siteCodeArray = new String[10];
          BrokerProxy bp = null;
          try {
              // Grab Local Broker Proxy
              bp = BrokerProxy.getLocalInstance();
              if (bp == null) {
                  throw new IllegalStateException("Could not obtain Broker Proxy Connection");
              }
              // Search up
              ConfigurableService[] ud_set = bp.getConfigurableServices("UserDefined");
              if (ud_set == null) {
                  throw new IllegalStateException("Could not find Site Code value under User Defined Properties: ");
              }
  
              // Add
              System.out.println("Configurable Service Name :" + ud_set[0].getName());
  
              for (int i = 0; i &lt; 1; i++) {
                  siteCodeArray[i] = ud_set[i].getName();
              }
          } catch (Throwable t) {
              throw new IllegalStateException(
                      "SiteCodeNotConfigured. Sitecode configuration missing in User Definied Properties", t);
          } finally {
              // Disconnect Broker Proxy when use is complete
              if (bp != null)
                  bp.disconnect();
          }
      }
  }
  </code></pre>
  
  <p>I need to pass back the <code>siteCodeArray</code> to ESQL.</p>