| Author |
Axis: return null problem
|
alain martin
Ranch Hand
Joined: Apr 11, 2005
Posts: 43
|
|
I have an axis 1.4 web service, It return an object, and sometimes this object is null. In the wsdl file I have: I need it have nillable="true" option for client understand when the return is null. What should I write in my wsdd file for it write automatically nillable="true" atribute? I don't find anything about it in http://ws.apache.org/axis/java/reference.html Thanks in advance [ August 31, 2006: Message edited by: alain martin ]
|
<a href="http://www.hhdirecto.net" target="_blank" rel="nofollow">http://www.hhdirecto.net</a>
|
 |
Watsh Rajneesh
Ranch Hand
Joined: Apr 17, 2006
Posts: 109
|
|
Probably you should try the wsdl2java approach which is more flexible and nillable=true can be for sure translated to the corresponding wrapper class version (eg java.lang.Integer) for the xsd type (xsd:int). As an aside, the JAX-RPC mapping file does not identify a way to identify this attribute in its <java-to-xml-mapping> element.
|
SCJP 5.0 (90%), SCDJWS 1.4 (88%), SCWCD 1.4 (82%), SCBCD 1.3 (85%)
|
 |
alain martin
Ranch Hand
Joined: Apr 11, 2005
Posts: 43
|
|
Hi, the returned object is developed by me, it isn't basic type. I have test to write manually nillable="true" in the wsdl and it run successfull, but I want it put nillable="true" automatically in al rebuild of wsdl file. Thanks
|
 |
Watsh Rajneesh
Ranch Hand
Joined: Apr 17, 2006
Posts: 109
|
|
|
You can tell axis not to auto-generate the wsdl but rather use your custom wsdl file (with the nillable=true change). To do this, you add <wsdlFile>[your custom wsdl resource url]</wsdlFile> (read here).
|
 |
Watsh Rajneesh
Ranch Hand
Joined: Apr 17, 2006
Posts: 109
|
|
|
You can tell axis not to auto-generate the wsdl but rather use your custom wsdl file (with the nillable=true change). To do this, you add <wsdlFile>[your custom wsdl resource url]</wsdlFile> (read here) to the wsdd.
|
 |
alain martin
Ranch Hand
Joined: Apr 11, 2005
Posts: 43
|
|
Thanks, I know this wsdlfile option, but while I'm developing and adding new web services everyday, it is very boring write manually nillable="true" for each test. I thought will be some wsdd attribute...
|
 |
 |
|
|
subject: Axis: return null problem
|
|
|