RE: [SOAP] Problems with https vs http on soap request

[email protected] ("Don O'Neil") Sun, 7 Feb 2016 09:44:25 -0800
Newsgroups php.soap
Message-ID <[email protected]>
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 thr=
own 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. Unfo=
rtunately they are nowhere near as simple as the other test because it take=
s 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, an=
d 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 add=
ed 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 serv=
er is not negotiating the SSL connection properly, likely because it is ref=
using to accept the SSL certificate for onlinetools.ups.com. This is someth=
ing 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 =3D new SoapHeader('http://www.ups.com/XMLSchema/XOLTWS/UPSS/v1.0',=
'UPSSecurity',$security_info);
VS.
$header =3D 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:[email protected]] 
Sent: Tuesday, February 02, 2016 12:55 PM
To: 'Aziz Saleh' <[email protected]>
Cc: 'Peter Brunnengr=C3=A4ber' <[email protected]>; [email protected]=

Subject: RE: [SOAP] 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 w=
orked.

Thanks!

-----Original Message-----
From: Aziz Saleh [mailto:[email protected]]
Sent: Tuesday, February 02, 2016 12:41 PM
To: Don O'Neil <[email protected]>
Cc: Peter Brunnengr=C3=A4ber <[email protected]>; [email protected]
Subject: Re: [SOAP] Problems with https vs http on soap request

On Tue, Feb 2, 2016 at 3:26 PM, Don O'Neil <[email protected]> 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=3D"1.0" encoding=3D"utf-8"?> <wsdl:definitions 
> xmlns:s=3D"http://www.w3.org/2001/XMLSchema"
> xmlns:soap12=3D"http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http=3D"
> http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime=3D"
> http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns=3D"http://ws.cdyne.com/"=

> xmlns:soap=3D"http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm=3D"
> http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc=3D"
> http://schemas.xmlsoap.org/soap/encoding/" targetNamespace=3D"
> http://ws.cdyne.com/" xmlns:wsdl=3D"http://schemas.xmlsoap.org/wsdl/">
> .......
>
> Any other ideas?
>
> -----Original Message-----
> From: Peter Brunnengr=C3=A4ber [mailto:[email protected]]
> Sent: Tuesday, February 02, 2016 12:22 PM
> To: Don O'Neil <[email protected]>
> Subject: Re: [SOAP] 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=C3=A4ber
>
>
> ----- Original Message -----
> From: "Don O'Neil" <[email protected]>
> To: "Peter Brunnengr=C3=A4ber" <[email protected]>, [email protected]=
et
> Sent: Tuesday, February 2, 2016 3:15:01 PM
> Subject: RE: [SOAP] 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 cor=
rect paths:

openssl.cafile =3D> no value =3D> no value
openssl.capath =3D> no value =3D> 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://w=
ww.php.net/unsub.php


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