Hibernate version: 3
Hibernate Tools version: 3.2 beta8
Web Services : Axis 2
Name and version of the database you are using: MYSQL
Hi,
I'm newbee with hibernate and I have some problems. I try to developp Axis 2 Web Services. The web services are based on MYSQL database.
I use hibernate to have persistent classes and generate POJO code from the database.
Each web service implement a POJO generated class.
Ex: Content.java is mapped to Content table. I created a WSContent with methods like Content GetContentById(int id).
So in this sample the WS method return a POJO Content .
To generate the POJO code I use hibernate tools with Eclipse IDE. All the code generation appended well. But when I invoke the WSContent GetContentById method hosted by Axis 2, I have the following error:
Code:
Exception occurred while trying to invoke service method getContent
org.apache.axiom.om.OMException: java.lang.IllegalArgumentException: null rcl
at org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:199)
I read in the Axis documentation and mailling list than Axis 2 don't support Set object, but it support Array object.
When there is a one2many associassion in the table, hibernate tools generate automatically an HashSet object:
ex:
Code:
public class Content implements java.io.Serializable {
private int idContend = 0;
private Set<String> comments = new HashSet(0);
I read in the documentation that it is possible to use ArrayList instead of HashSet Collection.
I search in the documentation and in the forum, but no results.
So my question is how POJO code generation can automatically generate ArrayList instead of HashSet ?
Regards,