Example: Java classes in the schema

An example class illustrates how members of a class are translated into fields in the schema.

Note in the resulting schema, "lastName" is a String rather than an int, as the property was used rather than the public field of the same name.

Code

package beans;

public class Name implements java.io.Serializable {

   private static final long serialVersionUID = 
2838957914515043754L;
   
   private String m_firstName;
   private String m_lastName;
   public int lastName; // This will not appear in the schema.
   public String middleName; // This will appear in the schema.
   
   public String getFirstName() {
      return m_firstName;
   }

   public void setFirstName(String firstName) {
      m_firstName = firstName;
   }

   public String getLastName() {
      return m_lastName;
   }

   public void setLastName(String lastName) {
      m_lastName = lastName;
   }
}

Schema library

Config tab

Message

Java Object Message