You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Santiago Miguel Aranda Rojas <sa...@gmail.com> on 2009/06/23 20:11:53 UTC
Re: Fwd: @XmlTransient
I want to use Annotation @XmlTransient in order to filter an attribute of one class in the client response. I mean my web service is going to return a "Employee" but I dont want return its "department" attribute. Because it is neccesary in order to avoid cyclic references. Have you check if I can use these annotations using tuscany.
https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html
class Department {
String name;
List<Employee> employees;
}
class Employee {
@XmlTransient
Department department; // parent pointer
String name;
public void afterUnmarshal(Unmarshaller u, Object parent) {
this.department = (Department)parent;
}
}
Re: Fwd: @XmlTransient
Posted by Raymond Feng <en...@gmail.com>.
Yes, you can use it.
From: Santiago Miguel Aranda Rojas
Sent: Tuesday, June 23, 2009 11:11 AM
To: user@tuscany.apache.org
Subject: Re: Fwd: @XmlTransient
I want to use Annotation @XmlTransient in order to filter an attribute of one class in the client response. I mean my web service is going to return a "Employee" but I dont want return its "department" attribute. Because it is neccesary in order to avoid cyclic references. Have you check if I can use these annotations using tuscany.
https://jaxb.dev.java.net/guide/Mapping_cyclic_references_to_XML.html
class Department {
String name;
List<Employee> employees;
}
class Employee {
@XmlTransient
Department department; // parent pointer
String name;
public void afterUnmarshal(Unmarshaller u, Object parent) {
this.department = (Department)parent;
}
}