• Post Reply Bookmark Topic Watch Topic
  • New Topic

Axis2 client: retrieving array returned from server

 
Doug Slattery
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I'm missing something regarding this. I've created and deployed a web service with a method that returns an array (not Array). This is my first attempt at accessing complex data types with Axis2. Take this simple example (don't scrutinize the code, I'm winging it just to make the point):

Class to be returned by service as an array:

And the service:

Now create the service, deploy and create the client. This is the way I've been using the stubs:

I've been using this style to access primitives and the default basic data type objects. When I try the above example I'm getting Cannot cast from OMElement to People[].

This error makes sense to me, but I'm searching for the missing link to retrieve the array.

Any ideas?

Aloha,
Doug

-- Nothing is impossible if I'mPossible
[ April 04, 2008: Message edited by: Doug Slattery ]
 
Doug Slattery
Ranch Hand
Posts: 294
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured it out...

It wasn't res.get_return();

It was public List PeopleMenu() instead of public People [] PeopleMenu() :roll:

Sometimes google can be evil by leading you down the wrong path

Aloha,
Doug

-- Nothing is impossible if I'mPossible
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!