# SOAP4R connection to a secured link(https)

**URL:** <https://www.ruby-forum.com/t/soap4r-connection-to-a-secured-link-https/151146>\
**Category:** Rails\
**Created:** [October 17, 2008, 12:03pm UTC](https://www.ruby-forum.com/t/soap4r-connection-to-a-secured-link-https/151146 "2008-10-17T12:03:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![g\_pallavi1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@g\_pallavi1](https://www.ruby-forum.com/u/g_pallavi1)\
**Post date:** [October 17, 2008, 12:03pm UTC](https://www.ruby-forum.com/t/soap4r-connection-to-a-secured-link-https/151146/1 "2008-10-17T12:03:03Z")

</div>

Hi

I have been trying to connect to a secured link(https) which is  
pointing to a wsdl file. I am using SOAP4R for this. But it is giving me  
an exception which says " hostname was not match with the server  
certificate". I really cant figure out what is the problem. Would like  
to know how to go about with the connection to the server also. Any help  
would be appreciated

Thanks and Regards,  
Pallavi

---

<div class="post-metadata">

**Author:** ![g\_pallavi1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@g\_pallavi1](https://www.ruby-forum.com/u/g_pallavi1)\
**Post date:** [October 17, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/soap4r-connection-to-a-secured-link-https/151146/2 "2008-10-17T18:35:09Z")

</div>

On Fri, Oct 17, 2008 at 3:03 AM, Pallavi Gawas  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I have been trying to connect to a secured link(https) which is  
> pointing to a wsdl file. I am using SOAP4R for this. But it is giving me  
> an exception which says " hostname was not match with the server  
> certificate". I really cant figure out what is the problem.

The error message seems pretty straightforward to me. 🙂

Have you tried accessing the URL with a browser to see if you get  
alerted to a name conflict?

–  
Hassan S. ------------------------ removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![g\_pallavi1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@g\_pallavi1](https://www.ruby-forum.com/u/g_pallavi1)\
**Post date:** [October 18, 2008, 9:24am UTC](https://www.ruby-forum.com/t/soap4r-connection-to-a-secured-link-https/151146/3 "2008-10-18T09:24:40Z")

</div>

Hassan S. wrote:

> On Fri, Oct 17, 2008 at 3:03 AM, Pallavi Gawas  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > I have been trying to connect to a secured link(https) which is  
> > pointing to a wsdl file. I am using SOAP4R for this. But it is giving me  
> > an exception which says " hostname was not match with the server  
> > certificate". I really cant figure out what is the problem.
> 
> The error message seems pretty straightforward to me. 🙂
> 
> Have you tried accessing the URL with a browser to see if you get  
> alerted to a name conflict?
> 
> –  
> Hassan S. ------------------------ removed\_email\_address@domain.invalid

Yes I have tried accessing the URL with a browser and it gives me  
website’s security certificate error. What to do in this case? Actually  
I am a newbie to ruby on rails so dont know much how to go about things.

---

<div class="post-metadata">

**Author:** ![g\_pallavi1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@g\_pallavi1](https://www.ruby-forum.com/u/g_pallavi1)\
**Post date:** [October 18, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/soap4r-connection-to-a-secured-link-https/151146/4 "2008-10-18T17:10:02Z")

</div>

On Sat, Oct 18, 2008 at 12:24 AM, Pallavi Gawas  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > > I have been trying to connect to a secured link(https) which is  
> > > pointing to a wsdl file. I am using SOAP4R for this. But it is giving me  
> > > an exception which says " hostname was not match with the server  
> > > certificate". I really cant figure out what is the problem.

> Yes I have tried accessing the URL with a browser and it gives me  
> website’s security certificate error. What to do in this case? Actually  
> I am a newbie to ruby on rails so dont know much how to go about things.

The options I can see are:

1. get the site to fix the problem with the cert,
2. access the site using the name on the cert,
3. rescue the exception being thrown and ignore it 🙂

## HTH!

Hassan S. ------------------------ removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![g\_pallavi1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/cab0a1/32.png) [@g\_pallavi1](https://www.ruby-forum.com/u/g_pallavi1)\
**Post date:** [October 23, 2008, 3:01pm UTC](https://www.ruby-forum.com/t/soap4r-connection-to-a-secured-link-https/151146/5 "2008-10-23T15:01:41Z")

</div>

Hassan S. wrote:

> On Sat, Oct 18, 2008 at 12:24 AM, Pallavi Gawas  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > > > I have been trying to connect to a secured link(https) which is  
> > > > pointing to a wsdl file. I am using SOAP4R for this. But it is giving me  
> > > > an exception which says " hostname was not match with the server  
> > > > certificate". I really cant figure out what is the problem.
> 
> > Yes I have tried accessing the URL with a browser and it gives me  
> > website’s security certificate error. What to do in this case? Actually  
> > I am a newbie to ruby on rails so dont know much how to go about things.
> 
> The options I can see are:
> 
> 1. get the site to fix the problem with the cert,
> 2. access the site using the name on the cert,
> 3. rescue the exception being thrown and ignore it 🙂
> 
> ## HTH!
> 
> Hassan S. ------------------------ removed\_email\_address@domain.invalid

Hi,

Actually the problem I was facing got solved.The was I was connecting  
was correct. Probably there was some issue with the certificate of the  
URL that I was trying to connect to.I connected to another url now from  
which I can access the methods .Thanks alot for the help. 🙂

Regards,  
Pallavi
