JAX-WS returning a complex object?

Posted by occhiso on Stack Overflow See other posts from Stack Overflow or by occhiso
Published on 2009-08-22T11:30:15Z Indexed on 2010/05/16 1:40 UTC
Read the original article Hit count: 354

Filed under:
|
|

Hi, Im pretty new to Java Web Services, but I cant find a good explanation anywhere.

I have 2 Java web projects within NetBeans.
One as a web service and one as a client for that web service.
I have also created my own class called "Person", which has what you'd expect: name, dob, etc.

I would like to have a web service method called "ListPeople()" that would return an array of "Person" objects.

Do I need to have that class in both projects?
Should I be serializing the object first?
Should I be using JAXB, if so, where do I start?

Sorry for the n00b questions, but im confused.
What is the normal way of accomplishing this?

Thanks in advance

© Stack Overflow or respective owner

Related posts about java

Related posts about jax-ws