Anne
On 2/14/06, Giggle Giggle <[EMAIL PROTECTED]> wrote:
Hi,
after several hours I've solved the probem how to send a java collection over soap ("Wrapper" pattern):
public class CustomerManager {
private Set<Customer> customers = new HashSet<Customer>();
public Set<Customer> getCustomers() {
customers.add(new Customer(21, "Paul"));
customers.add(new Customer(22, "Peter"));
return customers;
}
Wrapper:
-------------
public class CustomerManagerWrapperSoapBindingImpl implements test.CustomerManagerWrapper{
protected CustomerManager cm = new CustomerManager();
public test.Customer [] getCustomers() throws java.rmi.RemoteException {
return (Customer[]) cm.getCustomers().toArray(new Customer[0]);
}
}
Well, works fine, but only when the Customer class has only "primitive" atributes.
But I want to apply this pattern on Customers which includes another collection (I use Hibernate, collections means one-to-many mapping for example):
// for example
private Set kids;
Is there any possible way except creating another wrapper (around Customer class)?
Thanks for any comments
Lucas
