HTTP Client Module/Saxon

From EXPath Community Group

The implementation of HTTP Client for Saxon.

  • Use Apache HTTP Component (HTTP Core and HTTP Client) series 4 for the HTTP layer.
  • Use mime4j for parsing multipart responses.

Streamability

Theoretically, the SequenceIterator returned by HttpClient.doSendRequest() should allow it to be streamable. For instance to not parse the response content if the user does: http:send-request(...)[1] (that is, if he/she does not actually access the content). See if we can use that...

Setup project

The project in the Http Client module Subversion repository is a NetBeans project. It has the following dependencies:

  • a Java library named apache-commons-httpclient-4.0
  • a Java library named apache-commons-httpcore-4.0
  • a Java library named apache-commons-logging-1.1.1
  • a Java library named apache-commons-codec-1.4
  • a Java library named apache-mime4j-0.6
  • a Java library named tagsoup-1.2
  • a Java library named saxon-he
  • the project pkg-saxon (see instructions on the implementation page)
  • a Java platform named JDK_1.5

For detailed instructions, see setup info in Saxon:Packaging. TagSoup is downloadable from this webpage. For the dependency on the project pkg-saxon, add the following to [trunk-dir]/saxon/zip-saxon/nbproject/private/private.properties (create the file if it does not exist yet, and adapt the following path to the actual location of the project pkg-saxon):

project.pkg-saxon=../../../pkg/saxon/pkg-saxon

Todo

  • Adapt to the latest draft.
  • Create a sequence diagram of a simple but complete request, to have a precise idea of the sequence of events (and when the connection can be released, when the response content should have been read, streamibility opportunities, etc.)