5 Replies Latest reply: Jan 3, 2008 5:36 AM by Richard Opalka RSS

    Question about webservice returning array with nillable=fals

    Frank Heldt Newbie

      I've got a problem with a webservice and no idea how to solve this. Maybe someone can give me a hint:

      Java Webservice snippet:

      @WebMethod
      public Integer[] GetSteps(String ugid) {
       Session session = (Session) em.getDelegate();
       List<?> list = session.createSQLQuery("SELECT QVZAHL FROM MQVAL WHERE QVUGRP=:ugid AND QVSTAT<>'*'")
       .addScalar("QVZAHL", Hibernate.INTEGER)
       .setString("ugid", ugid)
       .list();
       return list.toArray(new Integer[list.size()]);
      }
      


      Now i want to use this in a C# .NET project, it generates this
      public System.Nullable<int>[] GetSteps(string arg0) {
       object[] results = this.Invoke("GetSteps", new object[] {arg0});
       return ((System.Nullable<int>[])(results[0]));
      }
      


      As you see, it generates a function returning an array of nullable ints.

      The question is: how can i change the Java webservice so that the elemnets of the array are nillable=false. Is there any annotation to do this?

      Thanks in advance for any help.