简体   繁体   中英

return java.util.List in webservice using top down approach

I'm trying to implement a simple java webservice in top down approach using Apache Axis2. This webservice shall send list of values as output.

When I tried to configure java.util.List as response output, I did not find any mapping with xml types for this java collection.

How do we setup java collection(List) type to return as output. I'm looking to get some help to resolve this issue.

Thanks!

Standard SOAP does NOT know about Java objects, it only knows about variables such as strings, numbers, etc.

If you really need to send Java objects, you could serialize them to an object stream and send the resulting binary as a SOAP attachment. See SAAJ - the SOAP with Attachments API for Java. This of course would require that your client side have access to the 3rd party library as well as your own custom class library.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM