I can return Strings and even String[] no problem, but not my custom type which after all only contains strings?
Is it at all possible to return custom types from a java/axis2 webservice? I have found numerous other questions on the web regarding this, but no definitive answer yet. /Peter -----Oprindelig meddelelse----- Fra: Peter A. Kirk [mailto:[EMAIL PROTECTED] Sendt: 26. oktober 2007 11:43 Til: [email protected] Emne: [Axis2] Custom object not returned correctly from webservice Hi, I have made a webservice with the following classes. I try to call this webservice from a c#/.net application, but the returned object is filled with nulls - can anyone help me find out why? As far as I can see I set the values in the return object. Do I need to do something to tell Axis2 that the class Employees_WS_ReturnData should be available over a webservice? The c# application does indeed know about this type, and does get an object from the "easyData" method - this object is just not filled with data. Thanks, Peter // package dk.alphasolutions.niws.employees; import javax.jws.*; @WebService public class Employees_WS { @WebMethod public Employees_WS_ReturnData easyData() { System.out.println("Easy Data"); Employees_WS_ReturnData o = new Employees_WS_ReturnData(); o.setEmail("peter"); return o; } } // package dk.alphasolutions.niws.employees; public class Employees_WS_ReturnData { private String lastname = "a lastname"; private String firstname; private String email; private String id; public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getId() { return id; } public void setId(String id) { this.id = id; } } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
