RE: Problems with https vs http on soap request

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ok... one problem solved, another one popping up, ugh!

This whole problem is stemming from the use of Squirrel Cart's UPS module, which uses SOAP. The developer says that the two scripts below should work identically, and yet they don't.  There aren't any error messages being thrown now, so I have no ideas where to look. This is what the developer says:

//
Ultimately, your server is having issues accepting the SSL certificate used by the URL that the UPS request is sent to, when that request is made with the built-in PHP SOAP client. That URL is:
https://onlinetools.ups.com/webservices/Registration

I created to test scripts that re-create the SOAP request made to UPS. Unfortunately they are nowhere near as simple as the other test because it takes a lot of extra code to get to the point where you can make the request.

This script simulates the request exactly as it is made by Squirrelcart, and fails (only on your server):
http://www.uswingnuts.com/store/test-ups.php

This script is identical with the exception that some SOAP options were added to tell the soap client to not verify the SSL certificate of the host:
http://www.uswingnuts.com/store/test-ups-no-verify.php

That script is working and returns a response. That is proof that your server is not negotiating the SSL connection properly, likely because it is refusing to accept the SSL certificate for onlinetools.ups.com. This is something your host will need to fix for you.
//

If you try http://www.uswingnuts.com/store/test-ups-no-verify-https.php vs http://www.uswingnuts.com/store/test-ups-no-verify.php  you'll see that the response between the 2 is quite different, and the only difference is the https vs. http request to the URL.

$header = new SoapHeader('http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0','UPSSecurity',$security_info);
VS.
$header = new SoapHeader('https://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0','UPSSecurity',$security_info);

Any ideas where to look next? 

Thanks!


-----Original Message-----
From: Don O'Neil [mailto:lists@lizardhill.com] 
Sent: Tuesday, February 02, 2016 12:55 PM
To: 'Aziz Saleh' <azizsaleh@gmail.com>
Cc: 'Peter Brunnengräber' <pbrunnen@bccglobal.com>; soap@lists.php.net
Subject: RE:  Problems with https vs http on soap request

That was the trick... as soon as I pointed it to the curl CA file then it worked.

Thanks!

-----Original Message-----
From: Aziz Saleh [mailto:azizsaleh@gmail.com]
Sent: Tuesday, February 02, 2016 12:41 PM
To: Don O'Neil <lists@lizardhill.com>
Cc: Peter Brunnengräber <pbrunnen@bccglobal.com>; soap@lists.php.net
Subject: Re:  Problems with https vs http on soap request

On Tue, Feb 2, 2016 at 3:26 PM, Don O'Neil <lists@lizardhill.com> wrote:

> Yes... a simple curl statement from the CLI opens the https site ok 
> without any problems;
>
> curl 'https://ws.cdyne.com/ip2geo/ip2geo.asmx?wsdl'
>
> <?xml version="1.0" encoding="utf-8"?> <wsdl:definitions 
> xmlns:s="http://www.w3.org/2001/XMLSchema";
> xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; xmlns:http="
> http://schemas.xmlsoap.org/wsdl/http/"; xmlns:mime="
> http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:tns="http://ws.cdyne.com/";
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:tm="
> http://microsoft.com/wsdl/mime/textMatching/"; xmlns:soapenc="
> http://schemas.xmlsoap.org/soap/encoding/"; targetNamespace="
> http://ws.cdyne.com/"; xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
> .......
>
> Any other ideas?
>
> -----Original Message-----
> From: Peter Brunnengräber [mailto:pbrunnen@bccglobal.com]
> Sent: Tuesday, February 02, 2016 12:22 PM
> To: Don O'Neil <lists@lizardhill.com>
> Subject: Re:  Problems with https vs http on soap request
>
> Hi Don,
>   Did you look at Darko's response yet?   I would next try to load the
> page using curl in PHP without the SOAP side of thing yet and see what 
> happens.
>
>   See> http://php.net/manual/en/curl.examples.php
>
>
> -With kind regards,
>  Peter Brunnengräber
>
>
> ----- Original Message -----
> From: "Don O'Neil" <lists@lizardhill.com>
> To: "Peter Brunnengräber" <pbrunnen@bccglobal.com>, soap@lists.php.net
> Sent: Tuesday, February 2, 2016 3:15:01 PM
> Subject: RE:  Problems with https vs http on soap request
>
> I verified that I can indeed get there ok with a wget statement. I get 
> the same correctly expected results from a wget using http or https.
>
>
> ---
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
>
> --
> PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: 
> http://www.php.net/unsub.php
>
>
I could be wrong, but you might need the following 2 configs set to the correct paths:

openssl.cafile => no value => no value
openssl.capath => no value => no value

For SSL to work.


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux