Hi Lars,
I'm not familiar with the WSProxy generator, but I'll try to help out as
much as possible.
Lars Huttar wrote:
Hello,
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.
What I think they mean is that you will have to send them in your
request. It should look something like:
http://user:[EMAIL PROTECTED]:{port}/path
That's at least the normal http syntax of sending a username and
password with your request.
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?
Yes I think the above method only works for 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?
No as far as I can see in the source code of the generator you cannot
explicitly specify the username and password.
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.
Did you look at the generator tutorial page?
http://cocoon.apache.org/2.1/tutorial/tutorial-generator.html
It describes a bit what the Parameters object does.
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?)
I wasn't able to find the wsproxy-session as well. It might be that the
README.txt file is outdated?
On the more general level, am I looking in the right place to find
definitive information about parameters for a sitemap component?
Yes looking at some code and perhaps trying to create your own component
always works out best for me.
I guess you missed this page, which explains a bit how to create your
own sitemap component (in this case a generator).
http://cocoon.apache.org/2.1/tutorial/tutorial-generator.html
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?
I'm not 100% sure, but I think most generators can handle basic
authentication like I described above.
Thanks,
Lars
Kind regards,
Jeroen Reijn
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]