Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ResponseWrapper in cxf

 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using cxf in grails. In my service method I want to return status of the request (SUCCESS/FAILURE) and all the fields of new object created by that service. I have created a custom object which has all these fields and also annotated with @XmlAccessorType. I have also defined this object as a @ResponseWrapper in the service method. Now I am confused what should I return from my method? Wrapper object ? I tried returning wrapper object but I couldn't get anything in the response. Can anybody help me for this?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I am not entirely familiar with web service development in Grails, but if they are adhering to JAX-WS (which I suspect), then you should not return the response wrapper, but the result from the method. The following example shows a method which adds two numbers and has a response wrapper:

The com.ivan.javax.AddResponse wrapper class will be generated by JAX-WS.
Hope this is of any help!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic