on 06-15-2010 8:06 AM
Hi,
I modeled a one to may relationship like this:
Parent Class WFData:
@OneToMany(mappedBy = "wfData", targetEntity = Positionen.class)
private Set<Positionen> positionen;
Child Class Positionen
@ManyToOne
@JoinColumn(name = "WF_REF_ID", referencedColumnName = "ID")
private WFData wfData;
Now I want to create an EJB session bean with a method which returns an object of type WFData (parent) published as web service . When I try to deploy the web service I get the following error message: Unable to generate serialization framework for web service
Does anyone know how to serialize a one-to-many relationship so I can use these objects in a web service?
Best regards,
Kevin
I found the solution to get serialization correctly working and enable the service to be used in Visual Composer.
You need to add the tag @XmlTransient to the getter method of the attribute in the child class that references the parent.
@XmlTransient
public WFData getWfData() {
return wfData;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.