I've attached http-tags.jar which contains a HTTP tag library implementation
I'd like to submit to the jakarta-taglibs project.

The jar contains the full source and build system following the
jakarta-taglibs guidelines and all source code has the Apache licence
applied. (There are no dependencies on external software other than the JDK,
servlets & JSP).

The http tag library allows HTTP requests to be performed using JSP custom
tags. I've found this particularly useful for doing HTTP GETs of external
resources and performing HTTP POST operations to call SOAP or XML-RPC web
services.

The notation is currently very simple. It consists of a <http:request> tag
for the request with optional child <http:header> tag for specifying HTTP
headers and a single <http:body> tag for specifying a body for HTTP POSTS.

For example to perform a HTTP GET:-

<http:request url="http://jakarta.apache.org" action="GET"/>

For a HTTP POST (to call a SOAP Babelfish service to translate some text):-

<http:request url="http://services.xmethods.net:80/perl/soaplite.cgi"
action="POST">
 <http:header name="SOAPAction" value="urn:xmethodsBabelFish#BabelFish"/>
 <http:header name="Content-Type" value="text/xml"/>
 <http:body>
  <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
      <m:BabelFish xmlns:m="urn:xmethodsBabelFish">
        <translationmode>en_fr</translationmode>
        <sourcedata>SOAP is quite easy with JSP.</sourcedata>
      </m:BabelFish>
    </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>
 </http:body>
</http:request>


Ultimately I'd like to extend the tag library to allow multipart posting of
files and such like.

Also I'd like to plug in a standard input / output sink mechanism (similar
in essence to Pierre's iotransformer tag library proposal) - though I'd
prefer to decouple the transformer into an 'InputSink' and an 'OutputSink'
as a HTTP request may have input.and/or output.

Any comments?

<James/>


James Strachan
=============
email: [EMAIL PROTECTED]
web: http://www.metastuff.com

__________________________________________________________________

If you are not the addressee of this confidential e-mail and any 
attachments, please delete it and inform the sender; unauthorised 
redistribution or publication is prohibited. 
Views expressed are those of the author and do not necessarily 
represent those of Citria Limited.
__________________________________________________________________
  

http-tags.jar

Reply via email to