0

I've created a RESTful web service using jersey and JAX-RS annotations. It's also documented using enunciate and looks great. However, SOAP support has been requested as an option. I noticed in this outdated enunciate example JAX-WS and JAX-RS annotations in the same class. Is this possible? I've tried it myself and enunciate generates documentation correctly, but the services don't actually work.

I'd prefer to have the exact same class support both interfaces rather than two separate classes (one soap one rest) pointing to the business logic class. This would prevent possibly having code in two places.

Here's the example on outdated software versions: http://docs.codehaus.org/display/ENUNCIATE/A+Rich+Web+service+API+for+Spring

I'm using Jersey 1.8 Spring 3.0.5 Weblogic 11g

Thanks! /Chip

Chip
  • 1,439
  • 3
  • 15
  • 29

2 Answers2

0

I'm not sure what might not be working, but a lot of the Enunciate example modules use both the SOAP and REST annotations on the same class.

Ryan Heaton
  • 1,173
  • 7
  • 11
0

We ended up making a separate service for SOAP than the REST service. We also found it best to have interfaces for each that enunciate could generate from. This way we could control what documentation it generated. It also started functioning smoother. Still having a problem with the namespaces though as they're all default and ns0 is generated but enunciate links are to ns2/3/4/5/etc. So many links are broken.

Chip
  • 1,439
  • 3
  • 15
  • 29