org.apache.cocoon.generation
Class WebServiceProxyGenerator
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.generation.AbstractGenerator
org.apache.cocoon.generation.ServiceableGenerator
org.apache.cocoon.generation.WebServiceProxyGenerator
- All Implemented Interfaces:
- Poolable, Recyclable, Disposable, Component, LogEnabled, Serviceable, Generator, SitemapModelComponent, XMLProducer
public class WebServiceProxyGenerator
- extends ServiceableGenerator
The WebServiceProxyGenerator is intended to:
1) Allow easy syndication of dynamic interactive content as a natural extension of the currently popular static content syndication with RSS.
2) Allow transparent routing of web service request through GET, POST, SOAP-RPC and SOAP-DOC binding methods.
3) Allow almost full control through sitemap configuration.
4) Allow use of Cocoon components for content formatting, aggregation and styling through a tight integration with the Cocoon sitemap.
5) Require 0 (zero) lines of Java or other business logic code in most cases.
6) Be generic and flexible enough to allow custom extensions for advanced and non-typical uses.
7) Support sessions, authentication, http 1.1, https, request manipulation, redirects following, connection pooling, and others.
8) Use the Jakarta HttpClient library which provides many sophisticated features for HTTP connections.
9) (TBD) Use Axis for SOAP-RPC and SOAP-DOC bindings.
- Version:
- CVS $Id: WebServiceProxyGenerator.html 1304258 2012-03-23 10:09:27Z ilgrosso $
- Author:
- Ivelin Ivanov, June 30, 2002, Tony Collen, December 2, 2002
Fields inherited from interface org.apache.cocoon.generation.Generator |
ROLE |
Method Summary |
byte[] |
fetch()
Forwards the request and returns the response. |
void |
generate()
Generate XML data. |
protected org.apache.commons.httpclient.HttpClient |
getHttpClient()
Create one per client session. |
void |
recycle()
Recycle this component. |
void |
setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
Set the SourceResolver , object model Map ,
the source and sitemap Parameters used to process the request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WebServiceProxyGenerator
public WebServiceProxyGenerator()
setup
public void setup(SourceResolver resolver,
Map objectModel,
String src,
Parameters par)
throws ProcessingException,
SAXException,
IOException
- Description copied from class:
AbstractGenerator
- Set the
SourceResolver
, object model Map
,
the source and sitemap Parameters
used to process the request.
- Specified by:
setup
in interface SitemapModelComponent
- Overrides:
setup
in class AbstractGenerator
- Throws:
ProcessingException
SAXException
IOException
generate
public void generate()
throws IOException,
SAXException,
ProcessingException
- Generate XML data.
- Throws:
IOException
SAXException
ProcessingException
recycle
public void recycle()
- Recycle this component.
All instance variables are set to
null
.
- Specified by:
recycle
in interface Recyclable
- Overrides:
recycle
in class AbstractGenerator
fetch
public byte[] fetch()
throws ProcessingException
- Forwards the request and returns the response.
The rest is probably out of date:
Will use a UrlGetMethod to benefit the cacheing mechanism
and intermediate proxy servers.
It is potentially possible that the size of the request
may grow beyond a certain limit for GET and it will require POST instead.
- Returns:
- byte[] XML response
- Throws:
ProcessingException
getHttpClient
protected org.apache.commons.httpclient.HttpClient getHttpClient()
throws ProcessingException
- Create one per client session.
- Throws:
ProcessingException
Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.