This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Axis: return null problem

 
alain martin
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Watsh Rajneesh
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
alain martin
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic