Hi, I use wsimport to generate classes from my wsdl. My webservice has one method called getVersion. I call this webservice and all works fine except when the response is unmarshalled into a java object the return value disappears.
WebService class @WebService(name = "Version", targetNamespace = "mynamespace") @XmlSeeAlso({ ObjectFactory.class }) @SOAPBinding(parameterStyle = ParameterStyle.BARE) public interface Event { ... String getVersion() } Client: VersionService service = new VersionService(); Version version = service.getPort(Version.class); System.out.println(version.getVersion()); --> null The response message: <?xml version='1.0' encoding='utf-8'?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <ns:getVersionResponse xmlns:ns="mynamespace"> <ns:return>VERSION</ns:return> </ns:getVersionResponse> </soapenv:Body> </soapenv:Envelope> The unmarshalled object has a string field response but it is always null. If I change the SOAPBinding annotation parameterStyle.BARE to parameterStyle.WRAPPED I get the correct answer but this I shouldn't do because the elements in my wsdl are not really wrappers (according to the jax-ws spec). If I change the elements to properly wrapped (according to the spec), I still get the null result when calling the getVersion method of the webservice. So no matter what I do I the unmarshalled object's field is always null even though I clearly see that there is stuff in the response. Why is this? Could it be that the ns:return element screws something up in the unmarshalling process. Thank you Pauli -- View this message in context: http://www.nabble.com/Axis2-jax-ws-unmarshal-response-tp21294027p21294027.html Sent from the Axis - User mailing list archive at Nabble.com.