cancel
Showing results for 
Search instead for 
Did you mean: 

@XMLTransient not working in NW 7.3?

patrik_spiess
Participant
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Are you using NW 7.3?

So, have you tried to annotate the property instead the get Mehod?

Best regards