title: How to implement one to many mapping in jax-ws
body: <p>I have a situation.
  I'm using hibernate for my project and made the same a webservice.
  I have one to many mapping between Enquiry and Branch. Mean an enquiry can have one branch and one branch can have many enquiries. Pojos are as below.</p>
  
  <p>Branch</p>
  
  <pre><code>public class Branch {
  private int branchID;
  private String branchName;
  Set&lt;Login&gt; users;
  Set&lt;Enquiry&gt; enquiries;
  //Getter Setter
  }
  </code></pre>
  
  <p>Enquiry</p>
  
  <pre><code>public class Enquiry {
  private long enquiryID;
  private String name;
  private String email;
  private String mobile;
  private Date dob;
  private Date date;
  private String address;
  private String other;
  private Set&lt;EnquiryResponse&gt; responses;
  private Set&lt;Course&gt; courses;
  private Set&lt;Source&gt; sources;
  private Branch branch;
  private boolean hasHistory;
  }
  </code></pre>
  
  <p>The system is working. But when I made my service a web-service then while converting the response to soap-response jax-ws is throwing an error saying there exists an infinite loop (which is there, branch has enquiry and enquiry has branch)
  This case appears in many pojos of my project. Please suggest how can i overcome this</p>