cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <>
Subject Re: wsproxy and request parameters
Date Mon, 22 Sep 2003 18:06:30 GMT
Jeff Ramsdale wrote:


> It hadn't occured to me that this was a problem with wsproxy. I just thought
> I needed to do something to convert the format. But then I realized that I
> had to manually change my all my "&"s to "&amp;"s. Which format should the
> user be expected to use for the src attribute of the generator? It seems to
> me the more human-readable form makes the most sense, with encoding
> happening in the wsproxy.


Could you try the following test and tell me if you get search results?

In your sitemap (Note the YOUR_AMAZON_KEY in the global-variables):



  <map:match pattern="*.html">
   <map:read src="{1}.html" mime-type="text/html"/>

  <map:match pattern="actorSearch">
   <map:generate type="wsproxy" 
   <map:serialize type="xml"/>



And then use the following form.html file:

<form method="post" action="actorSearch">
     <input type="text" name="ActorSearch" />
     <input type="submit"/>

I think what is happening in your example is that when you use {request-param:actor}, that
is being 
decoded by the RequestParameterInputModule, and is therefore being sent unencoded to Amazon
(I could 
be wrong on this). The WSProxy automatically sends all request parameters which were sent
from the 
original form, so if you have a field called "ActorSearch" in your field, the WSProxy will
also send 
ActorSearch=foo to the remote service.

This is nice, but it's not always useful if you don't want to use Amazon's form field names,
so I 
can see why you might have wanted to use the different input name in your form.   AFAIK, it's
up to 
the "sender" of the URL to make sure that request parameter names and values are URL-encoded,
so I 
am debating whether this might warrant an input module which performs URL encoding.




To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message