on 07-15-2010 5:45 PM
Hi,
I use both EJB 3.0 and web services in my project. In one method of a web service, I use an EJB class as the type of the parameter. In that parameter object, I would like to exclude one field.
...
@Entity
public class NtfConcrete implements Serializable {
...
@ManyToOne
@JoinColumn(name="NTF_TYPE_ID", referencedColumnName="ID")
private NtfGenType notificationType;
...
@XmlTransient
public NtfGenType getNotificationType() {
return notificationType;
}
public void setNotificationType(NtfGenType notificationType) {
this.notificationType = notificationType;
}
}
...
@WebService
@Stateless
public class ObjectsService implements
ObjectsServiceLocal, ObjectsServiceRemote {
...
public void createConcreteNotifcation(NtfConcrete concreteNotification,
String notificationTypeName) {
...
}
}
In previous versions of NW, this worked by putting the annotation "@XMLTransient" before the getter of the field in the entity class and it would be avoided in the web service.
You can see this in the above example, I wanted to exclude the attribute notificationType and added the annotation to the getter.
Has this changed?
Regards,
Patrik
Hi,
Are you using NW 7.3?
So, have you tried to annotate the property instead the get Mehod?
Best regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.