• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem returning a collection from web service

 
Jaydeep Deshmukh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am having problems returning a collection like arraylist from a weblogic java webservice to the client. How can I achieve this?

Thanks in Advance
Jaydeep
 
Harish Madhavan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please be more in detail ? Are you thrown out by exception.Post the trace.

Harish
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What you can do also depends on your WS toolkit.

In general it's much easier to return a Java array (i.e., a MyCustomClass[]) than an ArrayList, since an ArrayList could contain objects of any type.*

I can't help more than this - in Weblogic 8.1, I achieve a similar effect by writing the WSDL and schema first, then generating the Java interface/stubs from these. The Weblogic tools generate methods containing Java arrays rather than ArrayLists.


-Tim

* That is, until Java 5. I've never used Web services with Java 5, so YMMV.
[ August 17, 2005: Message edited by: Tim West ]
 
Jaydeep Deshmukh
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your help Tim. I used the Java array and it worked fine.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!