This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to return a two dimensional object array.

 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I was reading through a post given at "http://forums.oracle.com/forums/thread.jspa?threadID=2151051&tstart=0" and tried it my self, but facing the same issue reported in the thread.

My code is as follows


Before trying to deploy this as a webservice, I tried to run this as a standalone and it is working fine. But after deploying and trying to invoke the service, I see an exception as


and when I tried SOAPUi, I see the SOAP response being truncated abrubtly



There is nothing after body.

and in the server logs,


From the server logs, we see that the processing was completed on server side, but while returning back the response, something went wrong and apparently something to do with JAXB marshalling.... but I do not understand the root cause.....

Is it a sin to return an object[] ?

Also, should there be any application exception, I know that it would be nicely wrapped in soap fault. But does this not happen in this kind of situation.
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any advice on this.
 
Justin Rajasekar
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

http://stackoverflow.com/questions/2269494/jaxb-marshalling-objects-with-java-lang-object-field

This should explain the root cause and a solution to get around it.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic