# Connecting to XML/SOAP feed that requires pkcs12 certificate

**URL:** <https://www.ruby-forum.com/t/connecting-to-xml-soap-feed-that-requires-pkcs12-certificate/72824>\
**Category:** Rails\
**Created:** [October 19, 2006, 5:55am UTC](https://www.ruby-forum.com/t/connecting-to-xml-soap-feed-that-requires-pkcs12-certificate/72824 "2006-10-19T05:55:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Davoice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8e8cbc/32.png) [@Davoice](https://www.ruby-forum.com/u/Davoice)\
**Post date:** [October 19, 2006, 5:55am UTC](https://www.ruby-forum.com/t/connecting-to-xml-soap-feed-that-requires-pkcs12-certificate/72824/1 "2006-10-19T05:55:40Z")

</div>

All,

I’m stumped. I need to connect to an XML/SOAP feed… that’s normally  
not an issue. But this one has a hoop that threw me for a loop. Some  
corporate security geek implented it such that a client certificate  
(pkcs12) is required to validate my identity before their system will  
talk to me.

The remote system is, of course, running J2EE w/ EJB inside their  
firewall. But for external parties, they require the certificate on  
top of the SSL connection.

I know how to do it on .Net/IIS (basically we have to create a Java  
keystore and import the PKCS#12 Token).

Problem is we’re in the process of leaving .Net and are doing all our  
new apps in RoR. By mid-2007 we won’t be a MS shop anymore. But this  
one has me stumped. I can’t for the life of me figure out how to make  
RoR pass a client certificate in the connection stream.

Ideas?

Thanks in advance!

- Daniel

---

<div class="post-metadata">

**Author:** ![Davoice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8e8cbc/32.png) [@Davoice](https://www.ruby-forum.com/u/Davoice)\
**Post date:** [October 19, 2006, 6:11am UTC](https://www.ruby-forum.com/t/connecting-to-xml-soap-feed-that-requires-pkcs12-certificate/72824/2 "2006-10-19T06:11:41Z")

</div>

On 10/18/06, Davoice [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> All,
> 
> I’m stumped. I need to connect to an XML/SOAP feed… that’s normally  
> not an issue. But this one has a hoop that threw me for a loop. Some  
> corporate security geek implented it such that a client certificate  
> (pkcs12) is required to validate my identity before their system will  
> talk to me.
> 
> Ideas?

soap4r comes with an example that demonstrates how you can use  
certificates on the client side.

[http://dev.ctor.org/soap4r/browser/trunk/sample/soap/ssl](http://dev.ctor.org/soap4r/browser/trunk/sample/soap/ssl)

## – Kent

> **[DATANOISE.COM](https://www.datanoise.com/)**
>
> DATANOISE.COM - Contact us for any business inquiries

---

<div class="post-metadata">

**Author:** ![Davoice](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/8e8cbc/32.png) [@Davoice](https://www.ruby-forum.com/u/Davoice)\
**Post date:** [October 19, 2006, 8:46am UTC](https://www.ruby-forum.com/t/connecting-to-xml-soap-feed-that-requires-pkcs12-certificate/72824/3 "2006-10-19T08:46:07Z")

</div>

Thanks much! I wasn’t aware that soap4r supported client  
authentication using certificates.

I’ll reply back once we’ve tested it to let everyone know if we had  
success.

- Daniel
