Hi,

I have created a web service that returns a Student object (read from a db) to the client. My question is when I created my client (consumer) the generated Student class does not contain all the fields that the Student class in my web service has.

Here is the beginning of my student class in the web service:
@Entity
@XMLRootElement //I don't know if I need this or not
public class Student implements Serializable {

private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private Long personID; // This field does not show up in my generated class in the web client
private String name;
//Student is the owning side of this many to many relationship
@ManyToMany
private List<Section> aSection = new ArrayList(); // this field does not show up in my generated class in the web client

public Student() {
}

and here is the generated class in my web client:

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "student", propOrder = {
"id",
"name"
})
public class Student {

protected Long id;
protected String name;

// getters and setters follow

How come I only get id and name in my generated class and not the other two fields as well?

Thanks!

Mitch

PS I am very new to Java and web services