I am trying to consume a SSL secured web service and I need to use a certificate to even get to the WSDL.
I was doing changes in the SCA_Bindings_soap_Proxy to accept the local_cert and passphrase, but after the first attempt I realized that it may not be enough to do the job, as I believe the SDO_DAS_XML is responsible for parsing the contents of the WSDL and thus it needs to use the certificate as well.
Please let me know if I am wrong in my assumption, otherwise, does anyone know a way to get around this problem? (So far I am trying to download all the WSDL by hand and modifying the "import"s in the XSD's to point to my server. No luck so far.)
Appreciate you help. This is a high priority for me.
[19-Nov-2008 12:42:27] PHP Fatal error: Uncaught
SCA_RuntimeException: SDO_Exception in setWSDLTypes :
SDO_DAS_XML::create - Unable to parse the supplied xsd file
1 parse error(s) occurred when parsing the file 'https://URL/WS.wsdl': 1. xmlSAXUserParseFile returned an error -1
thrown in /usr/share/pear/SCA/Bindings/soap/Proxy.php on line 104
Silvano
On 19 nov, 12:12, "Silvano Girardi Jr" <silvan...@gmail.com> wrote:
> I am trying to consume a SSL secured web service and I need to use a
> certificate to even get to the WSDL.
> I was doing changes in the SCA_Bindings_soap_Proxy to accept the
> local_cert and passphrase, but after the first attempt I realized that
> it may not be enough to do the job, as I believe the SDO_DAS_XML is
> responsible for parsing the contents of the WSDL and thus it needs to
> use the certificate as well.
> Please let me know if I am wrong in my assumption, otherwise, does
> anyone know a way to get around this problem? (So far I am trying to
> download all the WSDL by hand and modifying the "import"s in the XSD's
> to point to my server. No luck so far.)
> Appreciate you help. This is a high priority for me.
The way I _think_ this works (though it is 2 years since I last looked
at this bit of the code) is as follows:
1. the Soap_Proxy calls setWSDLTypes
2. setWSDLTypes calls the SDO_DAS_XML::create (as shown in the message
below)
3. the SDO_DAS_XML code calls the Tuscany SDO code passing the URL
4. The Tuscany SDO code calls fopen() or something similar
5. This is picked up by the PHP file wrapper (see e.g. http://uk3.php.net/fopen)
6. PHP looks at the scheme (hhtps) and handles the open
So, I _think_ this comes down to the same behaviour that you would get
from fopen directly from PHP.
> [19-Nov-2008 12:42:27] PHP Fatal error: Uncaught
> SCA_RuntimeException: SDO_Exception in setWSDLTypes :
> SDO_DAS_XML::create - Unable to parse the supplied xsd file
> 1 parse error(s) occurred when parsing the file 'https://URL/WS.wsdl': > 1. xmlSAXUserParseFile returned an error -1
> thrown in /usr/share/pear/SCA/Bindings/soap/Proxy.php on line 104
> Silvano
> On 19 nov, 12:12, "Silvano Girardi Jr" <silvan...@gmail.com> wrote:
> > Lady and Gentlemen :)
> > I am trying to consume a SSL secured web service and I need to use a
> > certificate to even get to the WSDL.
> > I was doing changes in the SCA_Bindings_soap_Proxy to accept the
> > local_cert and passphrase, but after the first attempt I realized that
> > it may not be enough to do the job, as I believe the SDO_DAS_XML is
> > responsible for parsing the contents of the WSDL and thus it needs to
> > use the certificate as well.
> > Please let me know if I am wrong in my assumption, otherwise, does
> > anyone know a way to get around this problem? (So far I am trying to
> > download all the WSDL by hand and modifying the "import"s in the XSD's
> > to point to my server. No luck so far.)
> > Appreciate you help. This is a high priority for me.
> The way I _think_ this works (though it is 2 years since I last looked
> at this bit of the code) is as follows:
> 1. the Soap_Proxy calls setWSDLTypes
> 2. setWSDLTypes calls the SDO_DAS_XML::create (as shown in the message
> below)
> 3. the SDO_DAS_XML code calls the Tuscany SDO code passing the URL
> 4. The Tuscany SDO code calls fopen() or something similar
> 5. This is picked up by the PHP file wrapper (see e.g. http://uk3.php.net/fopen)
> 6. PHP looks at the scheme (hhtps) and handles the open
> So, I _think_ this comes down to the same behaviour that you would get
> from fopen directly from PHP.
> On 19 Nov, 17:43, silvanojr <silvan...@gmail.com> wrote:
>> Adding the error message.
>> [19-Nov-2008 12:42:27] PHP Fatal error: Uncaught
>> SCA_RuntimeException: SDO_Exception in setWSDLTypes :
>> SDO_DAS_XML::create - Unable to parse the supplied xsd file
>> 1 parse error(s) occurred when parsing the file 'https://URL/WS.wsdl': >> 1. xmlSAXUserParseFile returned an error -1
>> thrown in /usr/share/pear/SCA/Bindings/soap/Proxy.php on line 104
>> Silvano
>> On 19 nov, 12:12, "Silvano Girardi Jr" <silvan...@gmail.com> wrote:
>> > Lady and Gentlemen :)
>> > I am trying to consume a SSL secured web service and I need to use a
>> > certificate to even get to the WSDL.
>> > I was doing changes in the SCA_Bindings_soap_Proxy to accept the
>> > local_cert and passphrase, but after the first attempt I realized that
>> > it may not be enough to do the job, as I believe the SDO_DAS_XML is
>> > responsible for parsing the contents of the WSDL and thus it needs to
>> > use the certificate as well.
>> > Please let me know if I am wrong in my assumption, otherwise, does
>> > anyone know a way to get around this problem? (So far I am trying to
>> > download all the WSDL by hand and modifying the "import"s in the XSD's
>> > to point to my server. No luck so far.)
>> > Appreciate you help. This is a high priority for me.
OK so that's useful information and makes sense. How would you go
about connecting to an https URL from PHP? I have never tried it. Is
there a way to give the userid and password to the file wrapper?
Matthew
On 20 Nov, 20:44, "Silvano Girardi Jr" <silvan...@gmail.com> wrote:
Matthew Peters wrote: > OK so that's useful information and makes sense. How would you go > about connecting to an https URL from PHP? I have never tried it. Is > there a way to give the userid and password to the file wrapper?
I've forgotten a lot of what I knew about this too, but Matthew's approach of getting the connection working first without SCA is a good one. The first obvious question is do you have OpenSSL compiled in?
> OK so that's useful information and makes sense. How would you go
> about connecting to an https URL from PHP? I have never tried it. Is
> there a way to give the userid and password to the file wrapper?
> Matthew
For this specific case I need to get it via cURL, where I can specify the cert:
or, like I resolved, using the SoapClient, but it was a pain to
convert all XSD types into classes. I'd love to be able to use SCA_SDO
with cases like these, so count on me to try to get this thing working
with SCA.
I wonder if there is any way to specify the certificate to PHP
somewhere else, so it would work with fopen() as well.
On Mon, Nov 24, 2008 at 1:32 PM, Caroline Maynard <c...@php.net> wrote:
> Matthew Peters wrote:
>> OK so that's useful information and makes sense. How would you go
>> about connecting to an https URL from PHP? I have never tried it. Is
>> there a way to give the userid and password to the file wrapper?
> I've forgotten a lot of what I knew about this too, but Matthew's
> approach of getting the connection working first without SCA is a good
> one. The first obvious question is do you have OpenSSL compiled in?
I wonder too. I suggest one of us put a question on one of the PHP
mailing lists, or maybe on the page to do with fopen(). Are you happy
to do that, Silvano?
Matthew
On Nov 24, 3:40 pm, "Silvano Girardi Jr" <silvan...@gmail.com> wrote:
> I wonder too. I suggest one of us put a question on one of the PHP
> mailing lists, or maybe on the page to do with fopen(). Are you happy
> to do that, Silvano?
> > I wonder too. I suggest one of us put a question on one of the PHP
> > mailing lists, or maybe on the page to do with fopen(). Are you happy
> > to do that, Silvano?
> Yes. I will talk to the core developers directly.
> I will let you know.
> Silvano
> > On Nov 24, 3:40 pm, "Silvano Girardi Jr" <silvan...@gmail.com> wrote:
> >> I wonder if there is any way to specify the certificate to PHP
> >> somewhere else, so it would work with fopen() as well.
Hey all, while not all that active around here, I still lurk and try
to follow whats going on around here :)
Have you tried creating a stream context and setting the SSL options
there?
not only can this be passed to fopen, but it should also work if you
set it as the default stream context as well.