Hi
On 02/08/12 16:01, dallam wrote:
Hello,

I would like to know please how the parsing object/XML or object/JSON is
done in cxf at the receipt and at the emission of messages from a java
application to the network or from the network to a java application (for
REST and SOAP services).
Typically this done with the help of so called data bindings. CXF JAX-WS implements a number of data bindings, JAXB-based one is the mostly used one. Similarly for JAX-RS, where data bindings are called message body readers/writers.
Are there some specific classes to accomplish these conversions? Does this
parsing is based on the generated WSDL (for SOAP services) or WADL (for REST
services) or these are just some specification files which are used to
describe the web service without being involved in the type checking of
messages at receipt and emission?

In the document-first approach, the JAXB classes are generated from the schemas, otherwise a data class is expected to have JAXB annotations. The data bindings/providers will know how to convert data to/from input/output streams

Another question please, how it is possible to define a new type system to
cxf in order to type check messages at their parsing from java object to xml
or JSON for example (and inversely)?

Do you mean something different from XMLSchema ? I'm only aware of WADL optionally supporting RelaxNG, which is not supported yet at the code generation level

HTH, Sergey

Best Regards,

Diana ALLAM



--
View this message in context: 
http://cxf.547215.n5.nabble.com/parsing-object-XML-or-object-JSON-in-REST-and-SOAP-cxf-services-tp5711924.html
Sent from the cxf-user mailing list archive at Nabble.com.


--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com

Reply via email to