• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

long[] class cast exception

 
Markus Schmider
Ranch Hand
Posts: 132
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a webservice deployed on JBoss EAP 6.1


this produces the following wsdl:



For a client I have generated classes with wsimport
Among which is:


First of all I am a bit surprised that
public List<Long> getAllIds();
has been generated instead of returning long[]

Then when I run


I get on the client side


on the server side


Any ideas how to solve this would be greatly appreciated
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like this line is the problem

The call is returning an Object[] and you are trying to cast that into a long[] which is not allowed by Java rules

To make the values get copied to a Long[] you can use
and they would need to all be longs. Note also that you get a Long[] from that not a long[].
 
Markus Schmider
Ranch Hand
Posts: 132
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Grate, Yes this was the problem.

Many Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic