[jboss-user] [JBossWS] - Re: ArrayList or Set as return type in a web method ?

shoeb1981 do-not-reply at jboss.com
Thu Dec 6 06:24:12 EST 2007


          You can return any object of any complex data structure, as long as you can write an xml schema for that.
         However, rather than returning the Set object, you could return an array, which could further be cast down to a set by the client application.
         The purpose of web services is to have a standard interface that both parties agree with (the provider of the service and the client).  You should keep your interface simple so that you can write a simple schema for that. That will be easier for you to manage and simple for your client to understand.
           If you want to re-use the component in your application that you want to expose as web service, you can write an adapter class to your business method. And expose that adapter's interface to client. So in future if you change the original method's signature your clients will still get benefit.

Hope that helps.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4110802#4110802

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4110802



More information about the jboss-user mailing list