• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

ResponseWrapper in cxf

 
Ranch Hand
Posts: 419
Mac jQuery Objective C
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Those are the largest trousers in the world! Especially when next to this ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic