W3C home > Mailing lists > Public > www-rdf-interest@w3.org > October 2004

Novel HTTP methods and the standard Sun Java SDK (was RE: Revised draft of CBD)

From: <Patrick.Stickler@nokia.com>
Date: Thu, 7 Oct 2004 09:50:56 +0300
Message-ID: <1E4A0AC134884349A21955574A90A7A50A1DDB@trebe051.ntc.nokia.com>
To: <stefano@apache.org>
Cc: <www-rdf-interest@w3.org>

I was not referring to the creation of a servlet responding
to URIQA requests, but for using the Java API to *make*
requests to other URIQA-englightened servers.

If you try to set the request method to anything other than
one of the "standard" methods, an exception is thrown, but
*without* the side effect, so you can't just catch and 
disregard the exception (meaing "I know what I'm doing")
and proceed.

I tried to get a simple change made to the SDK where a
single line of code was moved (not changed) such that the
method was set prior to the test and thrown exception, so
that careless or naiive users would still have the "protection"
of the exception being thrown but savvy (or careless ;-)
users could disregard the exception and proceed with the
request, using the specified "non-standard" method.

The change wouldn't even impact any existing applications,
which would presume the exception in any case.

See the attached slides. It's trivially simple.

At present, you can't use the standard Java SDK for URIQA,
WebDAV, or any other solution employing "non-standard"
methods, which is a great pity.



> -----Original Message-----
> From: ext Stefano Mazzocchi [mailto:stefano@apache.org]
> Sent: 06 October, 2004 20:34
> To: Stickler Patrick (Nokia-TP-MSW/Tampere)
> Cc: www-rdf-interest@w3.org
> Subject: Re: Revised draft of CBD
> Patrick.Stickler@nokia.com wrote:
> > I use curl a great deal to interact with our 
> URIQA-enlightened servers
> > using the URIQA HTTP methods (it's unfortunate that the Sun Java API
> > is so anal about the use of novel methods -- I've tried to get that
> > addressed, but it seems like a "religious" crusade to 
> protect programmers
> > from themselves... maybe it's time to (again) try to push 
> that issue...)
> doGet() and doPost() are just convenience methods, the real 
> method that 
> the servlet engine invokes is service() which then dispaches 
> to do***() 
> methods, but you can totally overload that method yourself 
> call, if you 
> like, your doMget() method after reacting on request.getAction()
> There is no need to change the API.
> -- 
> Stefano

Received on Thursday, 7 October 2004 06:51:37 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:53 UTC