Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

wscompile/xrpcc (Was: Newbie: Returning objects via JAX-RPC? )  RSS feed

Tina Coleman
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Think I discovered why I can't happily return objects at the moment. It looks as if wscompile and xrpcc assume that any value object returned from a method exists in the same package (or possibly a subpackage) as the webservice. The generated stub code specifies[webservicepackage].ValueObjectClass. And since my value object _doesn't_ exist in the same package, I get a runtime error. (I had been casting my object to an Object on the client-side, so didn't end up hitting this as a compile-time error.)
My TestDataBean class exists in package servletconnect. My webservice exists in package servletconnect.webservice. The reason for this is because my project is comparing webservice to servlet performance (hence the poorly named package for my web service) and I want to use TestDataBean across both my webservices package and my servlets package. If in config.xml I use packagename servletconnect, my generated stubs end up in the wrong package. If I use packagename servletconnect.webservice, then the methods returning TestDataBean return servletconnect.webservice.TestDataBean in the stub code, though servletconnect.webservice.TestDataBean doesn't exist.
Short-term I'll create a copy of TestDataBean in the webservices package. Longer term, is there any other workaround? Looking at the Bug Parade, this looks like it might be related to 4729466, but figured I'd see if someone else had run into/solved this before I poke at it further.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!