I don't know REST much but I would think the JAX-RS XML structure would
follow the JAX-RS specification, just as the SOAP structure follows the
JAX-WS specification, and that the two XML structures would indeed be
different between the two specifications.  It would probably be best to code
your REST clients to the JAX-RS specification, helps keep things portable
anyway should you wish to move to another JAX-RS implementation.

Glen


Kampf, Eric wrote:
> 
> Hello.
> 
> I am working on an OSGI web application that uses CXF.  We have a number
> of existing  service classes exposed via SOAP.  We would now like to
> expose REST versions of these  services.  When I built the first REST
> service, I was surprised to see that the XML it produced did not match the
> XML of its SOAP counterpart.  Element name casing differed and collections
> were represented differently.
> 
> While it is not an absolute requirement that the XML structures match, it
> is highly desirable.  We have used the SOAP XML to predict the REST XML
> and coded clients against this.
> 
> One obvious solution would be to use JAXB annotations, but that is not an
> allowable option at this time.
> 
> What I am looking for is a way to configure CXF so that it uses the same
> marshaling "mode" for both REST and SOAP.  I have read the section of the
> CXF manual on JAXB configuration, but it did not have the detail I was
> looking for.  My JAXB knowledge is a bit light.
> 
> I have seen this behavior with CXF 2.2.6 and 2.2.10.
> 
> Any guidance would be greatly appreciated.  Thanks.
> 
> -Eric
> 
> 

-- 
View this message in context: 
http://cxf.547215.n5.nabble.com/REST-XML-Structure-Does-not-Match-SOAP-XML-tp2849790p2849918.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to