[jboss-user] [JBossWS] - Question about webservice returning array with nillable=fals

fheldt do-not-reply at jboss.com
Wed Nov 21 03:13:31 EST 2007


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.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106634#4106634

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106634



More information about the jboss-user mailing list