Accessing OUT parameters in JAX-WS is rocket science?!?


XML & Web services: Accessing OUT parameters in JAX-WS is rocket science?!?

  1. When I have a @WebParam with mode = Mode.OUT as a Holder like: @WebParam(name = "Status", mode = Mode.OUT, partName = "Status") Holder status How can I access it from my client??? I have a small JAX-WS (2.1) client generated from NB 5.5 using an online WSDL. My request is sent ok: ... 0 1234567 ... and the response I get look fine: ... 1 john ... But when I try to access the returned values through the Holders: try { jaxwstest.XPortal_0020Interface service = new jaxwstest.XPortal_0020Interface(); jaxwstest.XPortal_0020InterfacePortType port = service.getXPortal_0020InterfacePort(); BigInteger bi = new BigInteger("0", 10); java.math.BigInteger subsystemID = bi; java.lang.String userNumber = "1234567"; status = null; errorMessage = null; userName = null; port.existsUser(subsystemID, userNumber, status, errorMessage, userName); System.out.println(status.value); } catch (Exception ex) { ex.printStackTrace(); } status is still null :-( (btw I use JAX-WS 2.1)
  2. You need to instantiate your status Holder: status = new Holder(); Seems like you are using JAX-WS 2.1 RI, for quicker response you should post your queries to the Metro forum at: