Sunday, January 10, 2010

Re: [Rails] OAI-PMH problem with more than one parameter.

Hi,

As you know the OAI-PMH standard is pretty specific about what are
acceptable parameters to requests and "test" is definitely not one. I
have a pretty customized version of the OAI lib running on the Kete
project and though it answers properly formed requests correctly it
gives a 500 error when passed "&test=test", too.

You seem to indicate that you have tried other second parameters, but
are they definitely valid. Here's a valid URL query string, for
example:

http://yoursite.com/oai?verb=ListRecords&from=2010-01-01

and here is one with a valid third parameter:

http://yoursite.com/oai?verb=ListRecords&from=2009-12-01&until=2010-01-01

You may get "no records match" type message, but it should be a well
formed XML response.

Hopefully it is just a matter of testing with valid parameters and
things will come right. At the least it is good to narrow down your
issue.

Cheers,
Walter
----
Walter McGinnis
Kete Project Lead (http://kete.net.nz)
Katipo Communications, Ltd. (http://katipo.co.nz)
http://twitter.com/wtem

On Sun, Jan 10, 2010 at 1:48 AM, Szymon Maka <lists@ruby-forum.com> wrote:
> Hello.
>
> I'm trying to make my site work with OAI-PMH (http://
> oai.rubyforge.org/). Whilst running the tests on http://re.cs.uct.ac.za/
> it seems that it can't process more than two parameters. For example:
>
> http://mysite.com/oai?verb=Identify    works fine, but
> http://mysite.com/oai?verb=Identify&test=tes  end ups with an error
> with any second parameter
>
> Processing OaiController#index (for 0.0.0.0:3030 at 2010-01-09
> 00:47:21) [GET]
>  Parameters: {"verb"=>"Identify", "test"=>"tes"}
>
> TypeError (can't convert nil into Array):
>  oai (0.0.12) lib/oai/provider/response.rb:67:in `-'
>  oai (0.0.12) lib/oai/provider/response.rb:67:in `valid?'
>  oai (0.0.12) lib/oai/provider/response.rb:31:in `initialize'
>  ...
>
> Line 67 is: return false unless (@options.keys -
> self.class.valid_options).empty?
> where, ofcourse, self.class.valid_options is nil. But why?
> Any thoughts?
>
> --
> szymszy
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>
>
>

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate