XML & Web services: Multiple output params

  1. Multiple output params (1 messages)

    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 clientId, @WebParam(name = "client_request_id", mode = WebParam.Mode.INOUT) Holder 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
  2. Re: Multiple output params[ Go to top ]

    AFAIK we can return only one value from a method and same applies to web services too. If you need multiple values then create a complexType aka. Object and return that from web method. Thanks, Vinod http://blog.vinodsingh.com/