Easy web services with eZ Publish
One of the things I love about eZ publish is that it's so configurable and often settings can be used in ways that were not thought of when introduced.
In version 3.8 the ability to add and override HTTP headers was introduced (from what I can tell to allow for fine tuning of cache related headers).
In the most basic terms a web service is the ability to provide machine readable data (typically XML) over a network.
eZ publish has the ability to provide RSS feeds which is contained within it's own module. However this is quite limited. eZ also come with a SOAP library that would allow the coding of services.
The introduction of the httpd header overwrite feature allows for eZ Publish to use the templating system and the content within the site to produce any data you require, i.e. no php coding required. It also allows for the data feeds to be dynamic and relative to the existing web content.
The process in a nutshell is:
In version 3.8 the ability to add and override HTTP headers was introduced (from what I can tell to allow for fine tuning of cache related headers).
In the most basic terms a web service is the ability to provide machine readable data (typically XML) over a network.
eZ publish has the ability to provide RSS feeds which is contained within it's own module. However this is quite limited. eZ also come with a SOAP library that would allow the coding of services.
The introduction of the httpd header overwrite feature allows for eZ Publish to use the templating system and the content within the site to produce any data you require, i.e. no php coding required. It also allows for the data feeds to be dynamic and relative to the existing web content.
The process in a nutshell is:
- create a layout for the webservice (layout.ini)
- overwrite the "Content-Type" header for this layout so that the ouput is presented as XML (site.ini)
- create templates to produce the desired output
Hi Bruce,
ReplyDeleteI'm very interested for some example about podcast.
It's cool if you share this.
Cheers.
Stephane.
Hey Bruce,
ReplyDeleteI'd also be interested in seeing some example code for this. I"m doing an ezPublish implemenation now where we'll be outputting object data in XML format to then be styled with XSLT via another webservice.