SOAP
class Employee{ protected String firstName; protected String lastName; protected String title = "Worker Bee"; protected Employee manager; public Employee (String first, String last, Employee mgr){ firstName = first; lastName = last; manager = mgr;} public String getTitle() { return title; } public void setTitle(String newTitle) { title = newTitle; } public String getFirstName() { return firstName; } public String getLastName() { return lastName; } public String getManager() { return manager; } } Employee rob = new Employee("rob", "englanger", null); rob.setTitle("Slave Driver"); Employee ben = new Employee("ben", "jones", rob); Employee andrew = new Employee("andrew", "smith", rob); Employee lorraine = new Employee("lorraine", "white", rob);
<rob id="rob"> <firstName>rob</firstName> <lastName>englander</lastName> <title>slave driver</title> </rob> <ben> <firstName>ben</firstName> <lastName>jones</lastName> <title>worker bee</title> <manager href="#rob"></manager> </ben> <andrew> <firstName>andrew</firstName> <lastName>smith</lastName> <title>worker bee</title> <manager href="#rob"></manager> </andrew> <lorraine> <firstName>lorraine</firstName> <lastName>white</lastName> <title>worker bee</title> <manager href="#rob"></manager> </lorraine>
15 of 29