Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Odata, client certificate authentication in java client

Posted on 2013-01-09
6
Medium Priority
?
756 Views
Last Modified: 2013-01-17
Dear experts,

I am trying to build an application that gets OData from a OData website. to do this i have to use Client certificate authentication to access the data. I however don't know how to get this done and make a connection to the site. Does someone have an example for me?.

Thanks,

Mark Vrenken
0
Comment
Question by:MarkVrenken
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 16

Expert Comment

by:Valeri
ID: 38758543
and after that:
ODataConsumer.newBuilder(serviceUri).setClientBehaviors(OClientBehaviors.allowSelfSignedCerts()).build();

I think this is what you are asking about?! You are using odata4j aren't you?
0
 
LVL 1

Author Comment

by:MarkVrenken
ID: 38758558
Hi Valerie,

Thanks for your responces! Yes i am using OData4j. I will try this. Thanks very much, hope it works.

Regards,

Mark Vrenken
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:MarkVrenken
ID: 38758902
Hi Valeri,

Can you please explain me why I have to add this key to the keystore? I have installed the server certificate to my pc, is this enough or is it necessary to also add it to the keystore? because then i have to ask the system admin (cacerts access is denied in cmd)

Cheers,

Mark
0
 
LVL 16

Accepted Solution

by:
Valeri earned 1500 total points
ID: 38759701
Actually I have never used this type of authentication. I have used only base authentication. But I think you have to add it, because of this code. It looks like the certificates are loaded from there.

http://code.google.com/p/odata4j/source/browse/odata4j-core/src/main/java/org/odata4j/consumer/behaviors/AllowSelfSignedCertsBehavior.java?name=0.5
0
 
LVL 1

Author Closing Comment

by:MarkVrenken
ID: 38786965
I have not yet got this far because of some issues with connectivity but thanks for your help. I am trying to use the Odata4j package but have to use a proxy and don't know how to do this in combination with the ODataConsumer.

THanks for your help!
0

Featured Post

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question