I am not sure I follow. You have created a web service e.g. using annotations? Create the class you want and declare it as a parameter in your web service. Then use the wsgen tool to generate the wsdl and the required artifacts.
by reading your information, if you are following code first approch, jax-ws supports complex data type and you can use collection class there. you also need to use annotation to define them.
By sugession is keep your DTO objects aside and create "beans" which will input/output of your message/method that way you will be able to split the layers. and have some code to map these dto to beans and viseversa. Having the beans will help you creating versions also.
can you please as what are the annotations are there to define on Collection classes ??
and have some code to map these dto to beans and viseversa.
I assume that Bean and DTO are same , please tell me what is the difference between them ??
Thanks in advance .
Joined: Sep 21, 2010
I refere annotation like : this will help not to create xml tag when there is no values/empty. When you use Collection class, you dont need to have setter method insead you getter to get collection object and add values to that. but for that you need initialize collection object at declaration. see below code.