开发者

How can I send ArrayList over Web Service?

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?

  1. Serializable (Because everything converts to XML before adding them to SOAP Message)
  2. ? (What should i do for generic class)
  3. ?? (How can i put every开发者_开发问答thing (which are serializable classes) to one return type like Object type)
  4. ??? (How can i pass exceptions over Web Services?)

alt text http://docs.sun.com/source/819-3669/images/saaj-noAttach.gif

How can I send ArrayList over Web Service?

How can I send ArrayList over Web Service?


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜