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:
  • 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
I'm working on a site that uses this method to produce podcasts and will post some code examples once the site is complete.

Comments

  1. Hi Bruce,

    I'm very interested for some example about podcast.
    It's cool if you share this.

    Cheers.

    Stephane.

    ReplyDelete
  2. Hey Bruce,

    I'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.

    ReplyDelete

Post a Comment

Popular posts from this blog

eZ Publish Admin Prototype extension

eZ Publish Admin redesign - Dashboard = OpenSocial?

eZ Publish 5 Virtual Machine