1 Reply Latest reply on Apr 5, 2010 11:41 PM by Tim Eakins

    webmethod and object list return

    Lucas Tiritilli Newbie

      hi, I want to make a webmethod that returns an object list

      for example:

      //class Person has a "name" attribute...
       public ArrayList getPool() {
       ArrayList array=new ArrayList();
       for(int i=0;i<5;i++){
       Person person=new Person("name"+i);
       return array;

      when I run any webservice like this the console server throws an exception as follows:

      ERROR [RequestHandlerImpl] Error processing web service request
      org.jboss.ws.WSException: javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
       - with linked exception:
      [javax.xml.bind.JAXBException: class org.jboss.soa.esb.samples.quickstart.model.
      Person nor any of its super class is known to this context.]
       at org.jboss.ws.WSException.rethrow(WSException.java:68)
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:310)
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
       at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
       at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)

      Can anybody help me?
      thanks in advance,