Subject is my real question but i wonder that another issue about web services.
What is the key points of web services to return something?
- Serializable (Because everything converts to XML before adding them to SOAP Message)
- ? (What should i do for generic class)
- ?? (How can i put every开发者_开发问答thing (which are serializable classes) to one return type like Object type)
- ??? (How can i pass exceptions over Web Services?)
alt text http://docs.sun.com/source/819-3669/images/saaj-noAttach.gif
You will have to return complex type messages to return ArrayList.
To do this, you will have to define this message in your WSDL file.
Check http://fusesource.com/docs/framework/2.2/wsdl/WSDLDefiningArrays.html
Similarly, you will have to return SOAP Fault messages, in case of exception.
Here are few links with details and examples which will help. (little old ones but good):
http://www.ibm.com/developerworks/xml/library/ws-tip-j2eenet2.html
http://download-uk.oracle.com/docs/cd/B25221_04/web.1013/b25603/apptypemapping.htm
精彩评论