Accessing Holder<T> in JAX-WS is rocket science?!?
When I have a @WebParam with mode = Mode.OUT as a Holder<T> like:
@WebParam(name = "Status", mode = Mode.OUT, partName = "Status")
Holder<BigInteger> 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:
...
<S:Body>
<ns2:ExistsUser xmlns:ns2="http://myserver/my.wsdl">
<SubsystemID>0</SubsystemID>
<UserNumber>1234567</UserNumber>
</ns2:ExistsUser>
</S:Body>
...
and the response I get look fine:
...
<SOAP-ENV:Body>
<ExistsUserResponse xmlns="http://myserver/my">
<Status>1</Status>
<ErrorMessage></ErrorMessage>
<UserName>john</UserName>
</ExistsUserResponse>
</SOAP-ENV:Body>
...
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";
javax.xml.ws.Holder<java.math.BigInteger> status = null;
javax.xml.ws.Holder<java.lang.String> errorMessage = null;
javax.xml.ws.Holder<java.lang.String> 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)
|