title: Java - Convert an entity to an wsimport object
body: <p>On a SOAP server, I try to convert Entities class to objects generated by <code>wsimport</code>.
  The objects have the same getters and setters, but I don't now how to inject model's getters into <code>wsimport</code> object setters</p>
  
  <p>For exemple I need convert this model:</p>
  
  <pre><code>package org.library.webservice.model;
  
  public class User {
  
      private int id;
      private String firstname;
      private String lastname;
      private String email;
      private String password;
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      public String getFirstname() {
          return firstname;
      }
  
      public void setFirstname(String firstname) {
          this.firstname = firstname;
      }
  
      public String getLastname() {
          return lastname;
      }
  
      public void setLastname(String lastname) {
          this.lastname = lastname;
      }
  
      public String getEmail() {
          return email;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }
  
      public String getPassword() {
          return password;
      }
  
  }
  </code></pre>
  
  <p>to this object :</p>
  
  <pre><code>package org.library.webservice.service.generated.user;
  
  @XmlAccessorType(XmlAccessType.FIELD)
  @XmlType(name = "user", propOrder = {
          "email",
          "firstname",
          "id",
          "lastname",
          "password"
  })
  public class User {
  
  
      protected int id;
      protected String firstname;
      protected String lastname;
      protected String email;
      protected String password;
  
      /**
       * Obtient la valeur de la propriete email.
       *
       * @return possible object is
       * {@link String }
       */
      public String getEmail() {
          return email;
      }
  
      /**
       * Definit la valeur de la propriete email.
       *
       * @param value allowed object is
       *              {@link String }
       */
      public void setEmail(String value) {
          this.email = value;
      }
  
      /**
       * Obtient la valeur de la propriete firstname.
       *
       * @return possible object is
       * {@link String }
       */
      public String getFirstname() {
          return firstname;
      }
  
      /**
       * Definit la valeur de la propriete firstname.
       *
       * @param value allowed object is
       *              {@link String }
       */
      public void setFirstname(String value) {
          this.firstname = value;
      }
  
      /**
       * Obtient la valeur de la propriete id.
       */
      public int getId() {
          return id;
      }
  
      /**
       * Definit la valeur de la propriete id.
       */
      public void setId(int value) {
          this.id = value;
      }
  
      /**
       * Obtient la valeur de la propriete lastname.
       *
       * @return possible object is
       * {@link String }
       */
      public String getLastname() {
          return lastname;
      }
  
      /**
       * Definit la valeur de la propriete lastname.
       *
       * @param value allowed object is
       *              {@link String }
       */
      public void setLastname(String value) {
          this.lastname = value;
      }
  
      /**
       * Obtient la valeur de la propriete password.
       *
       * @return possible object is
       * {@link String }
       */
      public String getPassword() {
          return password;
      }
  
      /**
       * Definit la valeur de la propriete password.
       *
       * @param value allowed object is
       *              {@link String }
       */
      public void setPassword(String value) {
          this.password = value;
      }
  
  
  }
  </code></pre>
  
  <p>I think that it's possible with genericity and reflexivity but I do not know how to do.</p>