You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Lars Huttar <la...@sil.org> on 2007/01/29 18:18:04 UTC

parameters for wsproxy, or generators in general

Hello,

I asked this page on the cocoon users list, but haven't received an 
answer, so am bringing it to the dev list (it is relevant to dev).

The doc page for Web Services Proxy,
http://cocoon.apache.org/2.1/userdocs/wsproxy-generator.html, says
    "If the remote site requires authentication, then the developer of
the local web site has to pass the user credentials as parameters to the
WebServiceProxyGenerator."

I've searched around without success for documentation on what those
credentials parameters are called. (This is a documentation gap that I'd
be willing to correct, if I can find the right answers.)
In samples/blocks/proxy/README.txt, two parameters to wsproxy are
listed: wsproxy-method and wsproxy-session. Cool.

However I can't find anything about user credentials for authentication.
Maybe the wsproxy docs mean that I should send user credentials as
*request* parameters in the src attribute of the wsproxy generator? But
that sounds like I'd have to send the password in plaintext... right?
Does this only work for http basic authentication?

If the answer to that is no, it's not talking about *request*
parameters, there are <map:parameter> parameters for the wsproxy
generator for username and password... then where can I find out what
they're called, or verify that they're recognized?

This generalizes to a question I've often had, when the Cocoon docs
don't list the parameters for a sitemap component: how do you find out
what they are? The Javadoc for the component class (e.g.
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/generation/WebServiceProxyGenerator.html) 

generally doesn't tell you, unless somebody thought to enter it in the
description. All you get is the fact that the setup() method takes a
"Parameters" argument.

So I looked in the source code. (By the way, it's a bad sign when the
documentation leaves you with "Look at the demo... Then study the source
code and if you still have questions, join the ... email list"! And
Cocoon is a webapp framework I'm supposed to be able to use without
programming?? :-))

Anyway, having found the source file at
src\blocks\proxy\java\org\apache\cocoon\generation\WebServiceProxyGenerator.java, 

I searched for "parameter".
There is definitely recognition of the wsproxy-method parameter:
        this.configuredHttpMethod = par.getParameter("wsproxy-method",
METHOD_GET);

However, I can find no mention of wsproxy-session. Does this mean the
README.txt is wrong? (Surely the wsproxy-session parameter isn't
processed by some other class?)
And what about authentication credentials?

On the more general level, am I looking in the right place to find
definitive information about parameters for a sitemap component?

If the wsproxy generator can't handle user authentication, I'd like to
find out if the file generator or HTML generator can. But none of the
documentation pages for these generators lists parameters for
authentication. Any hints?

Thanks,
Lars