[jboss-user] [JBossWS] - Re: returning array undefined in web service

mckeno do-not-reply at jboss.com
Mon Nov 26 23:43:16 EST 2007


The code looks messy, but I can't find the edit functionality in this forum ??!!?? so I did a re post....
-------------
Hi all I am having this problem, not sure whether it is related to jboss web service or the client site application:

I am writing a web service inside EJB container:

  | @Stateless
  | @WebService(name = "Mojo", targetNamespace = "http://myservice.com/services", serviceName = "CoolService")
  | @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
  | public class MyWebService {
  | 
  | @WebMethod
  | @WebResult
  | public int[] getNumber(@WebParam(name = "userName") String sth) {
  | int[] number = new int[3];
  | number[0] = 7;
  | number[1] = 2;
  | number[2] = 3;
  | 
  | log.info("ARRAY METHOD CALLED " + number.length);
  | return number;
  | }
  | 
  | @WebMethod
  | @WebResult
  | public int getNum(int param) {
  | int result = param + 2;
  | return result ;
  | }
  | 
  | }

The getNum() method works fine, but the getNumber() always return undefined result(I am calling the web service using Web Sevice Connector in Flash application). So I am wondering whether I need any specific annotation for the array returning methods?

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

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



More information about the jboss-user mailing list