It's not a secret anymore!
The moose likes Web Services and the fly likes Multiple output params Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Multiple output params" Watch "Multiple output params" New topic

Multiple output params

Nitin Gaur

Joined: Sep 06, 2003
Posts: 27
Here is my code snippet

@RequestWrapper(localName = "recoverPassword", targetNamespace = "", className = "mypkg.RecoverPassword")
@ResponseWrapper(localName = "recoverPasswordResponse", targetNamespace = "", className = "mypkg.RecoverPasswordResponse")
public String recoverPassword(
@WebParam(name = "client_id", mode = WebParam.Mode.INOUT)
Holder<String> clientId,
@WebParam(name = "client_request_id", mode = WebParam.Mode.INOUT)
Holder<String> clientRequestId,
@WebParam(name = "unique_id")
String uniqueId)

My question is how to provide multiple @WebResult annotations to map multiple attributes in response wrapper bean? I could not find any example or valid syntax to do it.
If I specify multiple @WebResult annotations, compiler gives error. Can we provide only single @WebResult attribute?

Thanks in advance

If you don't like something, change it. If you can't change it, change your attitude. Don't complain.
Taariq San
Ranch Hand

Joined: Nov 20, 2007
Posts: 192
I have good news & bad news.

Bad news, a method can only produce a single result.
Good news, a single result can contain many values.

Your response could be an array, it could be a collection, it could be a POJO with a bunch of variables.
[ September 24, 2008: Message edited by: Taariq San ]
I agree. Here's the link:
subject: Multiple output params
It's not a secret anymore!