Hi Juan,

the components parameters are different from the actual generated URL. You could prefix parameters that are needed for consumer configuration with the component name. But this is actually no needed, since the valid OAI-PMH parameters are known. All other URI parameters must therefore be either component configuration or URL specific extra parameters.

On the HTTP vs HTTPS problem: Why not simply allow a http:// or https:// prefix for the target URL? The default could later be that the component automatically figures out which protocol to use. But for starters the URL could look like this:

oaipmh:https://revista.uisrael.edu.ec/index.php?page=oai&camel-param1=X&camel-param2=Y...

Regards,
Ralf

On 6/14/20 12:29 AM, Juan Segarra wrote:
Hi all.

I have been importing the code from the camel-oaipmh project [1] of Carlos
Badenes to my project [2] and testing it against some servers that I know.

The URI of the endpoints of the component looks like this.
oaipmh://oa.upm.es/perl/oai2?camel-param1=mock&camel-param2=foo.....
And it assumes that the servers run only over HTTP, because the "http://";
prefix is added to the server domain before executing the requests.

During my tests I noticed that some servers run over HTTPS and my mentors
suggested to me that I could add a 'ssl=true' param in the URI in order to
add support for HTTPS within the component. However, I found out that some
servers need params in the query string in order to work.

For example:
https://revista.uisrael.edu.ec/index.php?page=oai

In this case my URI would look like this:
oaipmh://
revista.uisrael.edu.ec/index.php?page=oai&ssl=true&camel-param1=X&camel-param2=Y...
..

I was wondering how I should deal with this. How could camel divide
sections of the query string that belongs to the oai server request and the
parameters of the camel component.

I would really appreciate your suggestions and ideas.

[1] https://github.com/cbadenes/camel-oaipmh
[2] https://github.com/juanksega/camel/tree/master/components/camel-oaipmh


Best,
Juan

Reply via email to