• Post Reply Bookmark Topic Watch Topic
  • New Topic

Common Response wrapper with generics  RSS feed

Mike Kon
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I must be googling the wrong things.. I cannot be the first person that's tried this.
I have to implement the services for a front end that's controled by a 3rd party. As such they reqeusted that all responses be wrapped in a common structure like this:
   code (enum, changes depending on service interface)
   data (changes depending on operation)

So I devised a nice generic style wrapper class

and then defined a service method like this:

It works.. but the vendor has one issue, and that's with the wsdl that's coming out of Jax-ws; all the methods have the code and data as "anyType" and they would like them to be the concrete type.

I'm not sure what annotations to put where to get the correct wsdl output.

Any hints would be greatly appreciated
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!