adam bien's blog

When JAX-WS Passes And Returns NULL 📎

When a JAX-WS SOAP service ignores all parameters (sends null) and only returns null-values, there is problem with JAXB-mappings and/or WSDL-settings. If you see the payload (you have to activate the debug-setting: -Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true), but always get a null-result, compare your WSDL with @WebMethod, @WebParam and @WebService annotations. You can also activate JAXB-output with -Djaxb.debug=true

[Disclaimer: I do not consider JAX-WS as a best practice in Java EE 6. In the vast majority of all cases JAX-RS is the way to go. But sometimes I'm forced by my customers to do strange things :-)]