• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

Multiple output params  RSS feed

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is my code snippet

@WebMethod
@RequestWrapper(localName = "recoverPassword", targetNamespace = "http://www.mysite.com/", className = "mypkg.RecoverPassword")
@ResponseWrapper(localName = "recoverPasswordResponse", targetNamespace = "http://www.mysite.com/", className = "mypkg.RecoverPasswordResponse")
@WebResult(name="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
-Nitin
 
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!