[jboss-user] [JBossWS] - How to return an array of class ?

ericmacau do-not-reply at jboss.com
Tue Jul 25 04:59:56 EDT 2006


Hello,

how can I return an array of object in web service?
Please look at the following example, if I want to return a set of User, what SoapBinding should I use?

If I use RPC, it seems not work.

Please help?


for example:


  | class User {
  |    String name;
  |    int age;
  |    Date birth;
  |    ...
  |    ...
  | }
  | 
  | 
  | @WebService(name = "UserInterface", targetNamespace = "http://mytest.mywebservice.com", serviceName = "UserService ")
  | @SOAPBinding( ..... )
  | @Stateless
  | @Remote(UserServiceRemote.class)
  | @RemoteBinding(jndiBinding = "UserServiceBean/remote")
  | public class UserService implements UserRemote {
  |    public User[] getUsers() {
  | 
  |     .....
  |    }
  | 
  | }
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960615#3960615

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960615



More information about the jboss-user mailing list