You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by phantomjinx <p....@phantomjinx.co.uk> on 2018/12/13 11:13:48 UTC

Olingo4 serviceUri as query

Hi,

I am wondering if there is a bug in the olingo4 component/endpoint. The documentation[1] states that
the serviceUri can be used as a query hence

  from("olingo4://read/Products?serviceUri=" + serviceUri);

However, adding this to a simple test script[2], this results in an exception[3] that the serviceUri
has not been set. Digging into the code it seems that the Olingo4Configuration is applied to the
endpoint but only has the apiName and methodName set. Consequently, when the call
configuration.getServiceUri() is called, the value is null.

Any help much appreciated.

Paul

[1]
https://github.com/apache/camel/blob/master/components/camel-olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc
[2] https://gist.github.com/phantomjinx/085df03915c5813a1f04b32e09d00049#file-simpleolingo4test-java
[3] https://gist.github.com/phantomjinx/085df03915c5813a1f04b32e09d00049#gistcomment-2784671

-- 
Paul Richardson

  * “Confronted by the great record of this country, and the tremendous promise of its future, all
    they do is croak, ‘socialism.’"

Harry Truman



Re: Olingo4 ... sorry another one!

Posted by phantomjinx <p....@phantomjinx.co.uk>.
Hey Andrea,

Happy to lodge JIRA issues once they are confirmed as bugs. I would like to think I have a handle on
the problems but would still prefer some confirmation first.

Cheers

PGR

On 13/12/2018 13:43, Andrea Cosentino wrote:
> Hello,
>
> Can we please track everything on JIRA issues?
>
> This way we can have better vision of what has to be done :-)
>
> Thanks.
>
> --
> Andrea Cosentino 
> ----------------------------------
> Apache Camel PMC Chair
> Apache Karaf Committer
> Apache Servicemix PMC Member
> Email: ancosen1985@yahoo.com
> Twitter: @oscerd2
> Github: oscerd
>
>
>
>
>
>
> On Thursday, December 13, 2018, 2:41:26 PM GMT+1, phantomjinx <p....@phantomjinx.co.uk> wrote: 
>
>
>
>
>
> Hi Dmitry,
>
> Wonder if you would mind looking at this issue as well, please. Again, I may been misunderstanding
> something but I just cannot make headway.
>
> So have come up with a test[1] that demonstrates the problem.
>
> Essentially, after replacing the component in the context to bypass the null serviceUri issue, the
> route moves on to initialising the Olingo4Consumer. The latter tests the 'read' method to ensure all
> properties have been set [2]. However, this fails due to the properties 'edm' and 'responseHandler'
> being missing.
>
> These properties are not documented (since they appear to be output properties). However, they are
> added into the property names collection of the endpoint [3]. This collection is compared against
> the method signatures in the Olingo4AppEndpointConfiguration and neither s/getEdm or
> s/getResponseHandler exist hence the exception thrown.
>
> If you want any help in trying to solve either of the issues I've raised then let me know as I've
> had my head in them for a couple of days now.
>
> Thanks and regards
>
> Paul
>
> [1] https://gist.github.com/phantomjinx/90ee08a989ddff4366d792cc621b36a9#file-properties-issue-java
> [2]
> https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/util/component/ApiConsumerHelper.java#L55
> [3]
> https://github.com/apache/camel/blob/master/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java#L150

Re: Olingo4 ... sorry another one!

Posted by Andrea Cosentino <an...@yahoo.com.INVALID>.
Hello,

Can we please track everything on JIRA issues?

This way we can have better vision of what has to be done :-)

Thanks.

--
Andrea Cosentino 
----------------------------------
Apache Camel PMC Chair
Apache Karaf Committer
Apache Servicemix PMC Member
Email: ancosen1985@yahoo.com
Twitter: @oscerd2
Github: oscerd






On Thursday, December 13, 2018, 2:41:26 PM GMT+1, phantomjinx <p....@phantomjinx.co.uk> wrote: 





Hi Dmitry,

Wonder if you would mind looking at this issue as well, please. Again, I may been misunderstanding
something but I just cannot make headway.

So have come up with a test[1] that demonstrates the problem.

Essentially, after replacing the component in the context to bypass the null serviceUri issue, the
route moves on to initialising the Olingo4Consumer. The latter tests the 'read' method to ensure all
properties have been set [2]. However, this fails due to the properties 'edm' and 'responseHandler'
being missing.

These properties are not documented (since they appear to be output properties). However, they are
added into the property names collection of the endpoint [3]. This collection is compared against
the method signatures in the Olingo4AppEndpointConfiguration and neither s/getEdm or
s/getResponseHandler exist hence the exception thrown.

If you want any help in trying to solve either of the issues I've raised then let me know as I've
had my head in them for a couple of days now.

Thanks and regards

Paul

[1] https://gist.github.com/phantomjinx/90ee08a989ddff4366d792cc621b36a9#file-properties-issue-java
[2]
https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/util/component/ApiConsumerHelper.java#L55
[3]
https://github.com/apache/camel/blob/master/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java#L150


-- 
Paul Richardson

  * “Confronted by the great record of this country, and the tremendous promise of its future, all
    they do is croak, ‘socialism.’"

Harry Truman

Olingo4 ... sorry another one!

Posted by phantomjinx <p....@phantomjinx.co.uk>.
Hi Dmitry,

Wonder if you would mind looking at this issue as well, please. Again, I may been misunderstanding
something but I just cannot make headway.

So have come up with a test[1] that demonstrates the problem.

Essentially, after replacing the component in the context to bypass the null serviceUri issue, the
route moves on to initialising the Olingo4Consumer. The latter tests the 'read' method to ensure all
properties have been set [2]. However, this fails due to the properties 'edm' and 'responseHandler'
being missing.

These properties are not documented (since they appear to be output properties). However, they are
added into the property names collection of the endpoint [3]. This collection is compared against
the method signatures in the Olingo4AppEndpointConfiguration and neither s/getEdm or
s/getResponseHandler exist hence the exception thrown.

If you want any help in trying to solve either of the issues I've raised then let me know as I've
had my head in them for a couple of days now.

Thanks and regards

Paul

[1] https://gist.github.com/phantomjinx/90ee08a989ddff4366d792cc621b36a9#file-properties-issue-java
[2]
https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/util/component/ApiConsumerHelper.java#L55
[3]
https://github.com/apache/camel/blob/master/components/camel-olingo4/camel-olingo4-component/src/main/java/org/apache/camel/component/olingo4/Olingo4Endpoint.java#L150

-- 
Paul Richardson

  * “Confronted by the great record of this country, and the tremendous promise of its future, all
    they do is croak, ‘socialism.’"

Harry Truman


Olingo4 serviceUri as query

Posted by Dmitry Volodin <dm...@gmail.com>.
Hi Paul!

Thanks for pointing.
I will look at this issue more detail and provide feedback or open jira
ticket.

четверг, 13 декабря 2018 г. пользователь phantomjinx написал:

> Hi,
>
> I am wondering if there is a bug in the olingo4 component/endpoint. The
> documentation[1] states that
> the serviceUri can be used as a query hence
>
>   from("olingo4://read/Products?serviceUri=" + serviceUri);
>
> However, adding this to a simple test script[2], this results in an
> exception[3] that the serviceUri
> has not been set. Digging into the code it seems that the
> Olingo4Configuration is applied to the
> endpoint but only has the apiName and methodName set. Consequently, when
> the call
> configuration.getServiceUri() is called, the value is null.
>
> Any help much appreciated.
>
> Paul
>
> [1]
> https://github.com/apache/camel/blob/master/components/camel
> -olingo4/camel-olingo4-component/src/main/docs/olingo4-component.adoc
> [2] https://gist.github.com/phantomjinx/085df03915c5813a1f04b32e
> 09d00049#file-simpleolingo4test-java
> [3] https://gist.github.com/phantomjinx/085df03915c5813a1f04b32e
> 09d00049#gistcomment-2784671
>
> --
> Paul Richardson
>
>   * “Confronted by the great record of this country, and the tremendous
> promise of its future, all
>     they do is croak, ‘socialism.’"
>
> Harry Truman
>
>
>

-- 
--
Best regards,
Dmitry Volodin