users@glassfish.java.net

WS complex data return - bind.MarshalException

From: <glassfish_at_javadesktop.org>
Date: Mon, 29 Oct 2007 10:16:25 PST

Hi!

Fresh install Glassfish v2 (SJAS9.1) on Sparc Solaris 10, 0807.

Having a heck of a time getting WS to return complex data.

- Successfully get single dimension ArrayList of Strings, no problem.
- Try to use ArrayList<JobListBean> get:

javax.xml.ws.WebServiceException: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException: class JobListBean nor any of its super class is known to this context.]

- Have tried both as package and no package
- tried @XmlSeeAlso({JobListBean.class})

Thought for sure @XmlSeeAlso would solve problem. No effect.

Appreciate any help. I've been stuck on this for awhile now. As usual, behind schedule.

Thanks!
Dan


@WebService
@XmlSeeAlso({JobListBean.class})
public class JobControl
{
  @WebMethod
  public List get_list (long client_id, String proc_id, Date date_beg, Date date_end )
  {
    ArrayList<JobListBean> job_ids = new ArrayList<JobListBean>();
    try {
      ...sql select stuff...

      ResultSet rs = stmt.executeQuery(sql);
      while(rs.next())
        job_ids.add(new JobListBean(rs.getString(1),rs.getString(2)));

      ...closes...
    } catch (Exception e) { ; }

    return job_ids;
  }
}
[Message sent by forum member 'htsguru' (htsguru)]

http://forums.java.net/jive/thread.jspa?messageID=242735