Re: [Cppcms-users] CppCMS handle SOAP or RESTful like Web Services?
Brought to you by:
artyom-beilis
From: Artyom B. <art...@ya...> - 2012-04-17 10:14:24
|
>Hi, >If I want to use CppCMS framework provide web services like SOAP or RESTFul etc, >Shall I need to use cppcms::http::request::raw_post_data() and parse the XML by myself? > Yes, raw_post_data() created exactly for this purpose and for example JSON-RPC API uses it. > > >CppCMS has built-in support for JSON-RPC, and any recommendation for handle other web services? :) > JSON-RPC is provided as most lightweight and efficient services, that can be easily integrated with client (both Browser and other client that generates JSON-RPC requests) (Note that JSON is much more lightweight format then XML...) If you want to create other services you may want to use your favorite XML library (tinyxml, libxml2 etc) and you may generate responses as XML using both CppCMS templates language or generate XML using your favorite XML library. Also note that for RESTFul services the url-dispatching/mapping services fit very well as it allows to handle proper hierarchy easily. Artyom |