Link to home
Start Free TrialLog in
Avatar of ldhbeheer
ldhbeheer

asked on

soapclient call with tomcat 5.5 Self Signed Certificate

I tried to connect to my wdsl service with php5 soapclient function. To port 80, no problem. But connecting to port 443 with a self signed certificate won't work.

I get no error returned from the wdsl service.
Maybe I am using the wrong cert.cer to connect ?

Can anyone help me with this ?
global $pir_soap_wsdl, $pir_soap_port, $pir_soap_options;
 
$pir_soap_wsdl = "https://172.27.66.48/SpringWebService/services/Version/";
$pir_soap_port = "443";
$pir_soap_options= array('local_cert'=>'./server.cer', 
'exeptions'=>'true','trace'=>'true');
 
 
// Gebruik de soap library 
uuse("soap");
 
// definieer client
$soapclient = new soapclient($pir_soap_wsdl, 'wsdl', $pir_soap_options);
// extra debugging optie(mogelijk niet noodzakelijk, zie uuse_soap.txt)
$soapclient->debug_flag = 1;
 
// extra encoding regel(niet noodzakelijk,zie uuse_soap.txt)
$soapclient->soap_defencoding = "utf-8";
 
// Aanroep SOAP server
$result = $soapclient->call("getVersion", "");
 
//Toon result
T_EO ($result);

Open in new window

Avatar of hernst42
hernst42
Flag of Germany image

Are you using the native php soap client, because that works perfect with self signed certificates. Or are you trying to use a certificate to authenticate against the webservice with the server.crt and are  you sure the server.crt is in the valid format (the examples show it must be .pem on the php-site)
Avatar of ldhbeheer
ldhbeheer

ASKER

how do I know, that I use the native PHP soap client ?
check if the soap extension of php is loaded ( check the output of phpinfo())
--enable-soap is not enabled on my server yet.
I am using php4, not php5, futher we are using nusoap.
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial