Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Unable to return a two dimensional object array.

 
Ranch Hand
Posts: 558
2
Hibernate Spring Java
  • 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: 558
2
Hibernate Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any advice on this.
 
Greenhorn
Posts: 2
  • 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.
 
I found a beautiful pie. And a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic