You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@olingo.apache.org by Pablo Leira <pl...@denodo.com> on 2016/04/01 14:42:03 UTC

Odata client through a proxy

Hi,
I have to make a service that consumes data from a odata 4.0 server in
java. And I would like to know:
How can I consume an OData4 service using either Olingo or the SDL OData
Framework through a proxy in the connection to the server?

Thanks
Regards
Pablo

Re: Odata client through a proxy

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 05/04/2016 10:36, Pablo Leira wrote:
> Hi, I found the class  ProxyWrappingHttpClientFactory to access 
> through a proxy  but I don´t how i can use this class with 
> BasicAuthHttpClientFactory. Is there any example?

By taking a look at the source code:

https://github.com/apache/olingo-odata4/blob/master/lib/client-core/src/main/java/org/apache/olingo/client/core/http/ProxyWrappingHttpClientFactory.java

it seems quite straightforward:

new ProxyWrappingHttpClientFactory(
   proxyURI,
   proxyUsername, // possibly null
   proxyPassword, // possibly null
   new BasicAuthHttpClientFactory(username, password),
);

HTH
Regards.

> 2016-04-01 15:08 GMT+02:00 Ramesh Reddy <rareddy@redhat.com 
> <ma...@redhat.com>>:
>
>     Pablo,
>
>     If you are using Java for your service development then you can
>     use Olingo client libraries to develop an application that can
>     issue request to a OData V4 service. Olingo also has Java Script
>     libraries for doing the same. Having a proxy in between should not
>     affect the result, as long as you have right endpoint to invoke
>     you should be fine.
>
>     Ramesh..
>
>     ------------------------------------------------------------------------
>
>         Hi,
>         I have to make a service that consumes data from a odata 4.0
>         server in java. And I would like to know:
>         How can I consume an OData4 service using either Olingo or the
>         SDL OData Framework through a proxy in the connection to the
>         server?
>
-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Involved at The Apache Software Foundation:
member, Syncope PMC chair, Cocoon PMC, Olingo PMC, CXF committer
http://home.apache.org/~ilgrosso/


Re: Odata client through a proxy

Posted by Pablo Leira <pl...@denodo.com>.
 I have solved my problem.
I have found the contructor that i needed:
ProxyWrappingHttpClientFactory(proxy, proxyUsername, proxyPassword, wrapped)
Thanks
Pablo

2016-04-05 10:36 GMT+02:00 Pablo Leira <pl...@denodo.com>:

> Hi, I found the class  ProxyWrappingHttpClientFactory to access through a
> proxy  but I don´t how i can use this class with BasicAuthHttpClientFactory.
> Is there any example?
>
> Thanks
> Pablo
>
> 2016-04-01 15:08 GMT+02:00 Ramesh Reddy <ra...@redhat.com>:
>
>> Pablo,
>>
>> If you are using Java for your service development then you can use
>> Olingo client libraries to develop an application that can issue request to
>> a OData V4 service. Olingo also has Java Script libraries for doing the
>> same. Having a proxy in between should not affect the result, as long as
>> you have right endpoint to invoke you should be fine.
>>
>> Ramesh..
>>
>> ------------------------------
>>
>> Hi,
>> I have to make a service that consumes data from a odata 4.0 server in
>> java. And I would like to know:
>> How can I consume an OData4 service using either Olingo or the SDL OData
>> Framework through a proxy in the connection to the server?
>>
>> Thanks
>> Regards
>> Pablo
>>
>>
>>
>>
>
>
> --
>
> *Pablo Leira Canedo*
> Service Engineering
> Denodo Technologies
> (+34) 981 100 200 Phone
> (+34) 981 100 205 Fax
> pleira@denodo.com
> <http://briefcase.denodo.com/content/operations/Document%20Templates/Email%20Signatures/DT-STAFF-TPL-en-Standard%20Email%20Signature-20141003-medium.html#>
> www.denodo.com
> 15011 A Coruña, Galicia
> Spain
> Legal Notice
> The message is intended for the addresses only and its contents and any
> attached files are strictly confidential.
> If you have received it in error, please remove this mail and contact
> postmaster@denodo.com.
> Thank you.
>



-- 

*Pablo Leira Canedo*
Service Engineering
Denodo Technologies
(+34) 981 100 200 Phone
(+34) 981 100 205 Fax
pleira@denodo.com
<http://briefcase.denodo.com/content/operations/Document%20Templates/Email%20Signatures/DT-STAFF-TPL-en-Standard%20Email%20Signature-20141003-medium.html#>
www.denodo.com
15011 A Coruña, Galicia
Spain
Legal Notice
The message is intended for the addresses only and its contents and any
attached files are strictly confidential.
If you have received it in error, please remove this mail and contact
postmaster@denodo.com.
Thank you.

Re: Odata client through a proxy

Posted by Pablo Leira <pl...@denodo.com>.
Hi, I found the class  ProxyWrappingHttpClientFactory to access through a
proxy  but I don´t how i can use this class with BasicAuthHttpClientFactory.
Is there any example?

Thanks
Pablo

2016-04-01 15:08 GMT+02:00 Ramesh Reddy <ra...@redhat.com>:

> Pablo,
>
> If you are using Java for your service development then you can use Olingo
> client libraries to develop an application that can issue request to a
> OData V4 service. Olingo also has Java Script libraries for doing the same.
> Having a proxy in between should not affect the result, as long as you have
> right endpoint to invoke you should be fine.
>
> Ramesh..
>
> ------------------------------
>
> Hi,
> I have to make a service that consumes data from a odata 4.0 server in
> java. And I would like to know:
> How can I consume an OData4 service using either Olingo or the SDL OData
> Framework through a proxy in the connection to the server?
>
> Thanks
> Regards
> Pablo
>
>
>
>


-- 

*Pablo Leira Canedo*
Service Engineering
Denodo Technologies
(+34) 981 100 200 Phone
(+34) 981 100 205 Fax
pleira@denodo.com
<http://briefcase.denodo.com/content/operations/Document%20Templates/Email%20Signatures/DT-STAFF-TPL-en-Standard%20Email%20Signature-20141003-medium.html#>
www.denodo.com
15011 A Coruña, Galicia
Spain
Legal Notice
The message is intended for the addresses only and its contents and any
attached files are strictly confidential.
If you have received it in error, please remove this mail and contact
postmaster@denodo.com.
Thank you.

Re: Odata client through a proxy

Posted by Ramesh Reddy <ra...@redhat.com>.
Pablo, 

If you are using Java for your service development then you can use Olingo client libraries to develop an application that can issue request to a OData V4 service. Olingo also has Java Script libraries for doing the same. Having a proxy in between should not affect the result, as long as you have right endpoint to invoke you should be fine. 

Ramesh.. 

----- Original Message -----

> Hi,
> I have to make a service that consumes data from a odata 4.0 server in java.
> And I would like to know:
> How can I consume an OData4 service using either Olingo or the SDL OData
> Framework through a proxy in the connection to the server?

> Thanks
> Regards
> Pablo